Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial explains how to convert ECMWF GRIB data into VAPOR format and how to visualise the resulting data in VAPOR.

 

Info

Please note that this tutorial requires Metview version 4.4.4. Also the Metview VAPOR interface should be properly set up as described here.

 

Table of Contents

What is VAPOR?

VAPOR stands for Visualization and Analysis Platform for Ocean, Atmosphere, and Solar Researchers. It is a software system providing an interactive 3D visualization environment. The home of the software is https://www.vapor.ucar.edu.

VAPOR vertical grid types

It is crucially important to understand the vertical coordinate types of the input data VAPOR can use. Here we discuss only the types that the Metview VAPOR interface supports. These are as follows: layered and regular 

For layered grids VAPOR expects a parameter specifying the elevation of each 3D level in the input data. This is typically the case for  pressure or model level (η levels) data with height or geopotential available (or it can be computed).

For regular grids the 3D levels are supposed to be equidistant (in the user coordinate space). This type can be used when the data is available on equidistant hight levels.

The situation when pressure or model level data is present without height information is somewhat special. The grid in this case is not layered but can be be regarded as regular in its own coordinate space (pressure or model levels) the letting z axis representing simply represent pressure or model levels in the 3D scene rendered in VAPOR.

Pressure level data with elevation

This exercise demonstrate how to use pressure level ECMWF GRIB data with VAPOR when elevation (as geopotential) is available). We will work with fields from yesterday's forecast on a low resolution grid over Europe.

Getting the GRIB data

First, we retrieve our GRIB data from MARS. We will need two MARS retrieval icons: one for the surface and one for pressure levels.

Now create a MARS Retrieval icon for the surface fields. Rename it 'ret_pl_surf', then apply the following settings:

Paramz/2t/10u/10v
Levelsfc
Date

-1

Time0
Step0/12
Area35/-10/65/30
Grid1/1

Create another MARS Retrieval icon for the pressure level fields. Rename it 'ret_pl' and edit it in the following way:

Paramz/t/r/u/v
Levelpl
Levelist1000/950/925/900/850/800/700/600/500/400/300/250/200/150/100
Date

-1

Time0
Step0/12
Area35/-10/65/30
Grid1/1

Running Vapor Prepare

Having set up the retrievals we can focus on converting the conversion of the data into the VAPOR format.

Now, create a VAPOR Prepare icon.

Rename it 'vapor_pl' and open up its editor.

First, we need to ensure that Vapor Input Mode is set to 'Icon' then drop the two Mars Retrieval icons into the Vapor Input Data field.

Second, we define the list of GRIB parameters we want to see in VAPOR.

Vapor 2d Paramsz/2t/10u/10v
Vapor 3d Paramst/u/v/r
Info

Internally, VAPOR Prepare converts surface geopotential to metres and rename it HGT.

Third, we set the vertical coordinate system:

Vapor Vertical Grid TypeLayered
Vapor Elevation Param
z
Vapor Bottom Coordinate0
Vapor Top Coordinate16000

Here we set the vertical grid type to 'Layered' and defined geopotential (z) as the parameter holding the elevation of the vertical layers (pressure levels). We also specified the vertical coordinate range (in metres) that VAPOR will display.

Info

Internally, VAPOR Prepare converts geopotential to metres and rename it ELEVATION (this is required by VAPOR).

Last, we specify the name and location of the results of the conversion:

Vapor Vdf Name
tut_pl
Vapor Output Path
your_path_on_the_filesystem
Vapor Reuse VdfOn

With these settings a VDF file called 'tut_pl.vdf' will be created in the directory you specified. All the other VAPOR data files will be placed into this directory into a subdirectory called 'tut_pl_data'. By setting Vapor Reuse Vdf to 'On' we told VAPOR Prepare not to run the conversion if a VDF file already exits in the target location.

Now save your VAPOR Prepare icon then right click Execute to run the conversion. The icon will first turn orange then green when the conversion finishes.

Anchor
visualisation
visualisation
Visualisation

Right click Visualise your VAPOR Prepare icon to start up VAPOR. You will see this window popping up:

Now go to the DataLoad a Dataset into Current Session menu and load the vdf file you have just created with your VAPOR Prepare (here you need to find use the path you specified in Vapor Output Path).

Having loaded the vdf file you get something like this:

If you rotate the cube in the display window (middle mouse button) you will see it is flat. We need to scale the vertical axis to get a better view of the whole 3D volume. Go to the Edit Edit Visualiser Features menu and set the Z Scene Stretch Factor to 200:

Now the full 3D volume is visible:

Next, we load a pre-installed map image to get a better geographical reference for the domain we are looking at. Open the Image tab and load 'BigBlueMarble.tiff' by using the Select Installed Image button. Then tick Instance: 1, tick Apply to Terrain and set Z to 0. The scene has now changed like this:

Info

The current scene settings can be saved into a VAPOR session file (with a .vss suffix) by using the File Save Session (As) menu. Then next time we start up VAPOR the saved session files can be loaded to initialise the scene with the saved settings.

Having set up the view we can now visualise our data. E.g. try the DVR (Direct Volume Rendering) tab, select Variable to relative humidity (r), tick Instance 1. Then set Refinement Level to 2 and change the opacity in Transfer Function editor to get this scene:

Giving further instructions and explaining further details about VAPOR visualisation goes beyond the scope of this tutorial. Here we just show a few snapshots made with VAPOR to demonstrate the different ways VAPOR can visualise 3D data. For an in depth introduction please study the VAPOR tutorials at:

https://www.vapor.ucar.edu/docs/vapor-tutorials

Gallery
includedoc7.png, doc6.png, doc5.png, doc4.png
columns2
sortname

Model level data with elevation

This exercise demonstrate how to use model level ECMWF GRIB data with VAPOR when elevation available/can be derived. We will work with fields from yesterday's forecast on a low resolution grid over Europe. The steps required are very similar to the previous exercise (with pressure levels) to only exception is the handling of geopotential.

Getting the GRIB data

First, we retrieve our GRIB data from MARS. We will need two three MARS Retrieval icons: one for the surface and , one for model levels and one for lnsp.

Now create a MARS Retrieval icon for the surface fields. Rename it 'ret_surf_ml', then apply the following settings:

Paramz/2t/10u/10v
Levelsfc
Date

-1

Time0
Step0/12
Area35/-10/65/30
Grid1/1

Create another MARS Retrieval icon for the model level fields up to level 60. Rename it 'ret_ml' and edit it in the following way:

Paramt/q/u/v/lnsp
Levelml
Levelist137/to/60
Date

-1

Time0
Step0/12
Area35/-10/65/30
Grid1/1

Create a third MARS Retrieval icon for lnsp on the bottommost model level. Rename it 'ret_ml_lnsp' and edit it in the following way:

Paramlnsp
Levelml
Levelist1
Date

-1

Time0
Step0/12
Area35/-10/65/30
Grid1/1
Info

Geopotential on model levels is not archived in MARS. However, VAPOR Prepare can derive it if tempreature (t), specific humidity (q) and logarithm of surface pressure (lnsp) are available. So we need needed to ensure that these fields are were present in the retrieval. 

Running Vapor Prepare

Having set up the retrievals we can focus on converting the data into the VAPOR format.

Now, create a VAPOR Prepare icon. Rename it 'vapor_ml' and open up its editor.

First, ensure that Vapor Input Mode is set to Icon then drop your two three Mars Retrieval icons into the Vapor Input Data field.

Image RemovedImage Added

Second, define the list of GRIB parameters you want to see in VAPOR.

Vapor 2d Paramsz/2t/10u/10v
Vapor 3d Paramst/u/v/q

Third, set the vertical coordinate system:

Vapor Vertical Grid TypeLayered
Vapor Elevation Param
z
Vapor Bottom Coordinate0
Vapor Top Coordinate16000

Here we set the vertical grid type to layered and defined geopotential (z) as the parameter holding the elevation of the vertical layers (model levels). We also specified the vertical coordinate range (in metres) that VAPOR will display for this data.

Info

Although geopotential (z) is not available on model levels in the input data  VAPOR Prepare computes it automatically if tempreature (t), specific humidity (q) and logarithm of surface pressure (lnsp) are available. Geopotential is then gets converted into metres units and renamed to ELEVATION.

Last, we specify the name and location of the results of the conversion:

Vapor Vdf Name
tut_ml
Vapor Output Path
your_path_on_the_filesystem
Vapor Reuse VdfOn

Now save your VAPOR Prepare icon then right click Execute to run the conversion. The icon will first turn orange then green when the conversion finishes.

Visualisation can be done similarly to what was discussed for pressure level data here.