Modelling Air Mass Time Over Water with Hysplit, SAGA GIS, and Python

From CUOSGwiki
Revision as of 11:51, 3 December 2020 by Erinturnbull (talk | contribs) (adding initial setup section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
  1. Introduction

In this tutorial, we will explore how to combine a vector line with raster surface information to extract quantitative information about the conditions underneath the line. There are numerous possible applications for this: we can look at an air mass moving over different land cover types, the impact of pollutants on river currents, or the habitats an animal prefers to travel through. Here, we will focus on one particular application, that of how long an air mass spends over water. However, the techniques can be applied to many different problems.

For our purposes, the line will represent the trajectory of an air mass, with each segment representing a certain amount of time. We are interested in how long the air mass spent over water. This is of interest since air masses that spend a long time over water tend to have higher humidity which can affect how much evaporation occurs at further points.

Given a raster grid that determines whether a cell is water or not, we can evaluate this by the following general process:

1. Split the line into segments based on the raster grid 2. Determine whether or not the segment is over water and how much time it represents 3. Sum the length of time represented by segments that are over water.

Here, I will briefly demonstrate how to use a National Oceanic and Atmospheric Administration (NOAA) tool called Hysplit to determine the backtrajectory of an air mass from a point in time and space over a week. I will then show how Python can be used to extract that data and, using SAGA GIS, calculate the amount of time spent over water for the trajectory. The process can be adapted with minimal changes to use other trajectories and raster data.

  1. Prerequisites

Thorough comfort with Python and command line tools would be greatly beneficial. You might find [tutorial on SAGA and Python] useful to start learning with. Comfort with your operating system is recommended. The optional Hysplit component requires some comfort with FTP servers. This tutorial is focused on the Windows environment, but all the software described should also work in a Unix environment with suitable modifications.

  1. Setup
    1. Demonstration Files

You can download these demonstration files which contain the code and some sample files to run it with.

    1. Hysplit

I have provided an example Hysplit data file in the demonstration files if you’d rather not follow these steps. However, if you are interested in air mass trajectory analysis, you may find these useful.

1. Visit https://www.ready.noaa.gov/HYSPLIT_util.php and install the Tcl/Tk graphical user interface and the Ghostscript / Ghostview postscript viewer. Make sure you install Ghostscript and GSview to their default directories to avoid complications. 2. You can then download and install Hysplit https://www.ready.noaa.gov/HYSPLIT_hytrial.php 3. To run Hysplit on Windows, you’ll need to edit the shortcut to tell it to run the Hysplit Tcl code with the Tcl interpreter. Right click on the shortcut to Hysplit on your desktop or start menu and click Properties. Edit the “Target” field to have the path to the Tcl executable called wish86t.exe. On other platforms, you may have to take similar steps. 4. You can then test that you can launch Hysplit.

    1. SAGA GIS

SAGA GIS can be installed from this link: https://sourceforge.net/projects/saga-gis/

    1. Python

Python can be installed from this link: https://www.python.org/downloads/