Marine Data Literacy 2.0

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data or model simulations, and mapped remote sensing imagery

 

 

 

 

Home > 6. Motion Vectors > 6.2 U & V Grids

6.2 Plotting Vector Arrows from U and V Component Grids with Saga

  • Exercise Title:  Plotting Vector Arrows from U and V Component Grids with Saga

  • Abstract:  This is a simple and relatively fast method for creating motion vector arrows in a GIS system, from the usual source data, i.e. U and V component vector grids.  The vast majority of source datasets for wind and current data are in U/V form, often in ESRI Arc Grid ASCII format.

  • Preliminary Reading (in OceanTeacher, unless otherwise indicated):

  • Required Software:

  • Other Resources: 

    • National Virtual Ocean Data System (NVODS) - Major collection of climatological datasets, with a very flexible user interface and useful download format options.  Geographic location window has been upgraded, and is now much easier to use.

    • ICOADS 2-Degree Data - The most extensive collection of surface marine data spanning the past three centuries, together with simple gridded monthly summary products extending from 1800 forward.  Contained within NVODS.

    • Marine Data Product Atlases - Great resources for checking the reasonableness of scalar and vector marine parameter visualizations

  • Author:  Murray Brown

  • Author's Note:  Need to update this exercise to include the return of vectors (as a product option) and export of Google Earth-compatible images.

  • Version:  April 2012

1.  Open the NVODS website, and look around to see what it contains and how it works.  This is arguably the finest example of a Live Access Server installation, based on the OPeNDAP protocol.

Immediately put a check by UPDATE PLOT (near the top left).

2.  Notice that there is a control for the geographic area, and that it allows 0-360 or -180 to +180 conventions.

You can drag the map sideways to change the coordinates, or you can enter new values.  For a map centered on the Greenwich Meridian, enter 180 W and 180 E.  For a map centered in the Pacific, use the coordinates shown here.

3.  A number of different graphic formats is supported, as indicated here.  The last two controls (DATE, DEPTH) change automatically for various types of data.

Click on UPDATE PLOT to see the default data product navigated so that Liberia in the mid-field.

4.  This is what you should be seeing in the main plot area.
5.  On the main control and graphic page, select CHOOSE DATASET.

Then click on the + next to BY DATASET NAME to open a long list of dataset options.

6.  Now, we'll get some typical average WIND DATA data products from the NVODS climatology collections (i.e. long-term averages).
7.  Select COADS MONTHLY CLIMATOLOGY (you can read about its successor project, ICOADS, above, to get an overview).

To get the U vector grid, click on ZONAL WIND COMPONENT (the east-west vector component of the wind).

8.  Main main graphic window re-draws, with the January grid (the average of all January's).
9.  Carefully enter the limits of the Liberia area in the map coordinates boxes.  The graphic should re-draw itself.

NOTE:  The author has found that if you have trouble getting the LAS to focus in on any exact box, then use the ZOOM tool to draw a box larger than the actual target.  Then enter the coordinates in this order:

  • TOP
  • BOTTOM
  • LEFT
  • RIGHT
10.  Select SAVE AS to begin the data-saving process.

Make sure Arc Grid is the selected format for saving, then click OK.

 

11.  It's very important at this point to check that file to make certain it has the desired geographic coordinate convention (-180 to +180 is required, and NOT 0 to 360).  If the coordinate convention is wrong (i.e. 0 to 360), go back to the main NVODS interface and adjust the map.  It is a trial-and-error process, so we can't tell you exactly how to get it right.  Just keep trying.
12.  If the file has the right coordinate system, select FILE > SAVE PAGE AS to save it.
13.  Navigate to the folder DATA > OCEAN and save the file as wind_u_jan_liberia_coads_nvods.asc
14.  To obtain the V component, simply drop down the COADS sub-menu, and select MERIDIONAL WIND COMPONENT (the north-south vector component).
15.  This entirely different graphic appears.
16.  Save this component grid in the same folder, with the filename wind_v_jan_liberia_coads_nvods.asc
17.  OPTION:  Also download the U and V wind grids for July.  Make sure you check all four ASC file for their header accuracy, as mentioned in Panel 13, above.
18.  You can close the NVODS website now, if you wish.  Come back later to explore the huge number of datasets available there.
19.  Run Saga. 
20.  Select GRID IMPORT/EXPORT > IMPORT ESRI ARC GRID.

For FILE, select the JANUARY U wind grid.  Then make the other selections you see here.  NVODS grids have a very unusual NO DATA value, requiring these settings to recognize it and replace it with Saga's usual -99999 value.

Then click OK.

21.  Load the other grids in order.  Here you can see both JANUARY and JULY wind grids.
22.  Select MODULES > SHAPES-GRID > GRADIENT VECTORS FROM DIRECTIONAL COMPONENTS.
23.  Make these settings:
  • Select the winds grid system
  • For X COMPONENT select the U grid for January
  • For Y COMPONENT select the V grid for January

You can accept the rest of the defaults, and click OK.

24.  If everything is OK, then a new line shape will appear.  Select ADD TO MAP to plot it.

 

NOTE:  The older command "Show Shapes" has been dropped.

25.  These are the January winds offshore Liberia.  Notice the very marked area of wind convergence near 5 degrees N.
26.  We took some default settings above in Panel 23.  If your figure does not look right, or if the arrows are too large or too small (such as tiny dots) then try some different settings.  Each time you run the module it will overwrite the existing line shape file, and the map should change automatically at the same time.
27.  Right-click on the new shape, and select SAVE SHAPE AS.  then navigate to the folder PRODUCTS > SAGA > VECTORS, and save as wind_vecs_jan_liberia_coads_nvods_saga.shp

Because shapefiles always occupy at least 3 separate files (*.SHP, *.SHX, *.DBF) sometimes it's a good idea to zip all of them into a file named *_shp.zip for safekeeping.  Do that for this new shape, and name the result wind_vecs_jan_liberia_coads_nvods_saga_shp.zip

28.  Here you can see the July vectors (below), which are very different from the January wind field (above).
29.  Similarly, save the July vectors with appropriate filenames, based on the above example.
30.  You can use MODULES > IMPORT/EXPORT - GDAL/OGR > OGR: EXPORT VECTOR DATA to save these vector arrows in KML format for use with Google Earth.  Save them in the same folder with the shapes.