Versions Compared

Key

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

Setup

Start Metview

Log onto a machine and start a new terminal. Start Metview by simply typing on the command line:

...

Right-click on some empty space and select Create New Folder - call it intro.

Grab a GRIB file (and the solutions)

Metview's home folder maps to $HOME/metview, so we will copy some data into our new folder (we could also create symlinks).

...

Within Metview's GUI, navigate into the new metview_intro folder and notice the new GRIB icon called t_fc.grib.

Simple visualisation

To visualise this data, right-click on its icon and select visualise. You will now see the Display Window. Its toolbars can all be moved, docked, undocked and hidden to suit your preferences. The plot uses a simple default styling. Try the following features from the toolbar:




Zoom

display_window_zoom_toolbar_diagram.png


Magnifier

Toggles the magnifier tool on and off. Unlike Zoom, this is a purely graphical enlargement of the plot. It is used mainly to inspect small text such as contour labels. The magnifying glass can be moved and resized using the mouse, and the magnification scale on its left-hand side can also be adjusted.
Cursor data

  

Toolbar toggles a panel which follows the mouse cursor. Click with the left mouse button to 'dock' or 'undock' this floating panel. It provides information about the data point closest to the mouse cursor.
Animation

The Frames tab to the right of the plot shows the set of fields contained in the GRIB file. You can move between fields by clicking within this tab, by using the animation control buttons or by using the cursor keys. Note that each plot is computed and cached only when you select a field.
Layer metadata

Select the Data tab in the right-hand panel. This reveals a page of meta-data for the visible data in the current layer, including a histogram.

Retrieve data from MARS

Create a new icon - select Mars Retrieval from the list. Edit the icon and set the following parameters to retrieve relative humidity on a 1x1 degree grid on the standard MARS pressure levels:

...

Right-click on get_t and choose Save Result to save the GRIB data as a file called my_t.grib in the current directory. There is normally no need to do this unless you plan to use the data outside of this Metview session.

Putting it into a script

Right-click somewhere on the Metview desktop and select Create New Python Script. Edit the new icon to bring up Metview's code editor. You may have to re-arrange your windows slightly, but drop the get_t icon into the code editor. The Python equivalent code is generated, and the result is stored in a variable with the same name as the icon (get_t). Use the mv.write() command as shown in the screenshot, then run the script using the Run button in the editor. Your new GRIB file should appear! You should also be able to run this from the command line the same as any Python script.

If you have extra time...

Look at the North pole

Right-click somewhere on the Metview desktop and select Create New Icon. From the list, select Geographical View and click OK.. Right-click the new icon and choose Edit. Set the following parameter:

...