Getting Started with VAPOR and Ocean Data

VAPOR has built-in support for three ocean models: POP, MOM, and ROMS. 

To create a VAPOR VDC from POP, ROMS, or MOM Data, use VDCWizard, a graphical tool that will walk a user through the steps of .vdf file creation, and VDC data population.  Alternatively vaporgui supports direct import of output files from these ocean models.

There are also command-line applications to perform the conversion. Use the momvdfcreate command to create the vdf file, and then use the mom2vdf command to convert model data (from either MOM or POP) into a VAPOR VDC.  To create a VAPOR VDC from ROMS data, you can first use the romsvdfcreate command to create the vdf file and then use the roms2vdf command to convert the model data into a VAPOR VDC.

POP and MOM data use a vertically stretched grid, whereas ROMS data uses a layered grid.  All three of these models use missing values to indicate areas over terrain or under the seabed.  Consequently these models are properly displayed only using VDC type II, which is the default.

Images, 2D Data, and Barbs can be vertically displaced by the terrain height, so as to follow the sea floor.  This capability requires having a "height" variable indicating the height above sea level.  These models do have bathymetry variables indicating ocean depth, such as "h" (in ROMS) "ht" (in MOM), or "HT" (in POP).  To create a height variable, one can simply negate the bathymetry variable using a 1-line Python script.

VAPOR displays ROMS, MOM, and POP data on a longitude/latitude grid.   The domain extents and coordinates are specified in meters (ROMS or MOM) or centimeters (POP) at the equator, with origin at latitude = 0, longitude = 0. 

To perform flow integration of these ocean models in VAPOR, it is necessary to modify the horizontal velocity fields (e.g. u and v), taking into account the rotation of the grid cells and also to account for the east-west stretching of longitude away from the equator.  The VAPOR Python module "vapor_utils" includes a Python method "vector_rotate" for this purpose.  To use this, define a python script in the VAPOR Python editor with the following four lines:

import vapor_utils

newVars = vapor_utils.vector_rotate(angleRad,latDeg,u,v)

umod = newVars[0]

vmod = newVars[1]

In the above script, u and v are the 3D horizontal flow velocity variables, angleRad and latDeg are 2D rotation and latitude variables (provided in the VAPOR VDC). The modified flow variables umod and vmod are the 3D variables output from the script.  The variables umod and vmod should be used as the horizontal flow variables in the VAPOR flow panel.