Georeferencing and terrain in non-WRF VDCs

Terrain elevation and geo-referencing are automatically supported in VAPOR when the VAPOR VDC is created from WRF data using the wrfvdfcreate command. If your VDC was not created from wrfvdfcreate, these capabilities are still available by appropriate settings in the VDC.    This can be done as follows:

Support for terrain elevation grids:

VAPOR supports mapping of images, 2D data, and Barbs to terrain, whether or not geo-referencing is used. To map an image to the terrain, there must be a 2D variable in the VDC indicating distance above sea-level. The value of this variable is the height of the terrain in whatever units are used in the vertical extents of the data.  With ocean models, the ocean depth must be negated (e.g. in a Python script) to provide the height above sea level.


Support for geo-referencing: VAPOR’s support for geo-referencing and mapping projections can be used in visualization of any VDC dataset. Geo-referencing requires the following two steps:

  • Specify the map projection, using the –mapprojection option of vdfcreate or vdfedit.
  • Ensure the domain extents are specified as coordinates in the mapping projection space. 

VAPOR supports several map projections, including lat/long, Lambert conformal conic, Mercator, polar stereographic, and rotated lat-long. The argument to the –mapprojection option is specified using the Proj4 projection string syntax, as described at the Proj4 wiki. For example, using Lambert conformal conic projection, a valid Proj4 projection string is: “+proj=lcc +lat_0=40 +lat_1=20 +lat_2=60 +lon_0=-120 +ellps=sphere”

The above Lambert conformal conic projection is centered at latitude 40°, longitude -120°. The projection is “true”; i.e. distances are not distorted, at latitudes 20° and 60°. The string “+ellps=sphere” indicates that the mapping uses a spherical earth model.

The domain extents must be specified relative to the center of the projection. For this example, suppose the full domain is 500 km on a side (horizontally) and goes from elevation 0 to 10km. If the center of the domain is the center of the projection (lon/lat at 120°, 40°) then the domain extents (by default these are in meters) would go from (-250000, -250000, 0) to (250000, 250000, 10000).    If the projection is not centered at the center of the domain, then the domain extents can be found by converting the latitude and longitude values at the corners of the domain to the corresponding values in meters. The proj application (see the Proj4 wiki ) can be used to convert lat/lon values of the lower-left and upper-right corners of the domain to meters in the projection space.

When using a lat/lon projection (currently used in VAPOR to display MOM, POP, and ROMS data) the extents are always specified in meters at the equator, assuming a spherical earth.  The origin is at latitude=0, longitude=0.   The conversion factor (meters per degree) is 111177.  Note that the east-west distance is not attenuated at latitudes above or below the equator so that field velocity variables must be corrected to do flow integration.


The domain extents can be set using either the vdfcreate or vdfedit commands.  When geo-referencing is specified in the VDC, geo-referenced images will be properly positioned in the VAPOR scene. Latitude/Longitude coordinates in degrees will also be displayed in the Probe, Region, 2D, View, and Image panels.