Hosted by "1PLs Agency"

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 > 5. Gridded Data > 5.11 IDV 180/360

5.11 Converting Between 0-to-360 and -180-to-180 Grid Views in IDV

  • Exercise Title:  Converting Between 0-to-360 and -180-to-180 Grid Views in Integreated Data Viewer (IDV)

  • Abstract:  In this exercise you'll learn how to convert global NetCDF grids from Atlantic-centered to Pacific-centered, or the reverse.  If the grid is truly "global" (i.e. exactly wraps the earth, with a very small margin of error), then it is a very easy process in IDV.  Other format grids have not yet been tried.

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

    • N/A

  • Required Software:

  • Other Resources: 

  • Author:  Murray Brown with lots of gratefully appreciated help from Yuan Ho at IDV

  • Version:  9-5-2014

1.  Download the above 2 example files to a convenient workspace.  You can examine them in ncBrowse if you want.
2.  Run IDV and get a global map.
3.  Use the DATA CHOOSER on the dashboard to load the wave data grid.
4.  You can see the types of data, by making htese selections and clicking CREATE DISPLAY.
5.  Here's a map of the MAXIMUM MEDIAN SEA WAVE HEIGHT VALUES.  The color palette is the author's usual favorite RADAR > DBZ

6.  To convert to an Atlantic-centered view, select TOOLS > FORMULAS > GRIDS > DEFINE A GRID DIAGNOSTIC


7.  There seems to be no reason why the IDV authors have chosen the term DIAGNOSTIC for software modules that are obviously TOOLS.  The whole notion of analysis or diagnosis is alien to the function of performing an action on the data, so this term DEFINE A GRID DIAGNOSTIC is clearly an impediment to easy understanding of IDV's parts.  The author humbly beseeches IDV to consider a term, such as TOOL, that matches well with usual terms in the GIS world.
8.  Here you are asked to specify how you want to see the data after the "diagnostic" has been applied.  The author suggests the same view as the above.

Then click OK.

9.  Be very careful here.  There is a whole family of named tools, which you can study on your own later at IDV USER'S GUIDE > 7.3.4 JYTHON LIBRARY > MODULE: GRID

Enter this tool name carefully, exactly as you see it her, with a capital-F in the middle.

Then click OK.

10.  Now you're asked to specify the grid variable for display.  Select this one, and click OK.
11.  This new grid object appears in the LEGEND list.  You must either uncheck or delete the original map (the lower one), due to numeric interference with the new map
12.  And here is the new map, centered on the Atlantic.  The left and right borders are -180 and +180, respectively, which confirms successful conversion.
13.  If you want to save this new grid, then use the method in 5.10 Basic Grid Operations, Calculations and Subsetting in IDV
14.  Now we'll perform a parallel conversion with the Atlantic-centered grid (above).

15.  Here's a map of the ANALYSED SST.  The color palette is the author's usual favorite RADAR > DBZ.  Notice that IDV has automatically starting stepping through the data grid to use only every 2nd point.

16.  Use exactly the same steps as you did above.   When you come to the place where it asks you to identify the FIELD, make sure you select the correct grid and this variable.

Then click OK.

17.  Where does IDV find out if you're going from Pacific to Atlantic, or the reverse?  It's automatic, based on the coordinates of the grid.
18.  And here you see the final Pacific-centered product.  Even with 2-step decimation, the detail is amazing., so take a minute to see the features. 
19.  If you want to save this new grid, then use the method in 5.10 Basic Grid Operations, Calculations and Subsetting in IDV
20.  Finally, if any grid you try to use with the lonFlip tool is not exactly 360 degrees wide, then you'll get this error message.

The author got this error message for most NetCDF grids in MDL, so the tolerance of the algorithm is very tight.  This doesn't seem to be a really useful feature, in view of how much it is needed, and how many grids "out there" are slightly bigger or smaller than 360.  For a 1000-cell grid, if the allowable global grid width error is only 0.0005 degrees (see above), then the largest cell-size error that can be accepted is 0.0005/1000 or 0.0000005 degrees. 

Think about it.