Metview's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Exercise 1: forecast - analysis difference

Starting Metview

This short exercise will demonstrate some basic functionality of Metview, showing how to retrieve data from MARS, examine its structure, compute the differences between fields and visualise them.

First start Metview; at ECMWF, the command to use is metview4_new (see Metview at ECMWF for details of Metview versions). You should see a Metview desktop which looks something like Figure 1.

 

Figure 1 - the Metview desktopFigure 2 - the Mars Retrieval icon editor

In Metview, all operations can be performed via icons. Most icons are available in the tabbed drawers at the bottom of the Metview desktop.

Retrieving the analysis data

To perform a MARS retrieval in Metview, click the Data Access tab to open it, and drag the Mars Retrieval icon onto your Metview desktop; this will create a copy of the icon for you to customise. Rename the new icon to temperature_analysis by clicking on its name. Edit your icon (right-click & edit, see Figure 2) and set the following parameters:

Param

T

Note: sets the desired meteorological parameter to Temperature
Date-3Note: sets the analysis base time to 3 days ago
Grid1.5/1.5Note: interpolates the result onto a 1.5-degree grid

To save these settings, click the Apply button at the bottom-left of the icon editor.

Inspecting the analysis data

Perform the data retrieval by choosing execute from the icon's context menu. The icon name should turn orange whilst the retrieval takes place, then green to indicate success (if the name turns red, then the retrieval failed and you should look in the output log, available from the output entry in the context menu). The data is now cached locally. To see what was retrieved, right-click examine the icon. This brings up Metview's GRIB Examiner tool (Figure 3). Here we can see that we retrieved six vertical levels of data; this is as expected if we look at the Levelist parameter in the icon editor.

Figure 3 - the GRIB ExaminerFigure 4 - a default map plotFigure 5 - map plot with shaded contours

Click to enlarge

Click to enlarge

Click to enlarge

 

Now visualise the data, again using the icon's context menu. You will see a map plot with the default contouring style in the Display Window (Figure 4).

To plot the data with shaded colours, go to the Visual Definitions drawer (if this drawer is not visible, you may have to either expand your Metview desktop window to the right, or else click on the dots which appear to the right of the last visible drawer). Drop the Contouring icon onto your Metview desktop, rename it shade and edit it, providing these parameters:

LegendOn
Contour ShadeOn
Contour Shade MethodArea Fill
Contour Shade Max Level ColourRed
Contour Shade Min Level ColourBlue
Contour Shade Colour DirectionClockwise

Save the icon settings (Apply) and drop this into the Display Window (re-visualise the data if you have closed the plot window). The result should resemble Figure 5. Metview's Contouring icon provides much flexibility in choosing how to display gridded fields; this tutorial uses only simple colour schemes. The Display Window provides a number of facilities for further inspection of the data, not covered here.

Retrieving the forecast data

Create a copy of your temperature_analysis icon (right-click, duplicate) and rename the copy to temperature_forecast. Edit this icon and set the following parameters:

TypeFC
ParamT
Date-5
Step48
Grid1.5/1.5

The analysis data was valid for 3 days ago; this new icon retrieves a 48-hour forecast data generated 5 days ago, so it is also valid for 3 days ago. You don't need to separately execute and visualise the icon - if you visualise it, the data will automatically be retrieved first. The plot title will verify that this data is valid for the same date and time as the analysis data. It also contains the same set of vertical levels.

Compute the forecast-analysis difference

Create a new Simple Formula icon by taking a copy from the Macros icon drawer. Rename the copy to fc_an_diff. Edit the icon, ensure that the first tab is selected (F+G) and that the operator is minus ( - ). Drop your temperature_forecast icon into the Parameter 1 box, and drop temperature_analysis into the Parameter 2 box. Save the icon and visualise it. The difference will be computed and the result plotted. Note that all 6 fields in each data icon are used in the computation - the result is a set of 6 fields.

Automating the whole procedure

Ensure that the difference fieldset is visualised with the contouring applied. To generate a Metview Macro script from this plot, click the Generate Macro button (also available from the File menu). A new Macro script will be generated - have a look at it to confirm that it contains code to retrieve all the data, compute the difference and plot the result. Run the macro to obtain the plot. By default, the macro is written so that it will produce an interactive plot window; it will generate a PostScript file if it is run with the execute command, or if it is run from the command line:

metview4 -b  <macro-name>

Metview Macro is a rich, powerful scripting language designed for the high-level manipulation and plotting of meteorological data. For example, see List of Operators and Functions.

 

Exercise 2: forecast - observation difference

This exercise builds on exercise 1, but uses observation data in BUFR format instead of analysis fields.

Retrieving the observation data

Create a new Mars Retrieval icon and rename it to obs. Edit it and set the following parameters:

TypeOb
RepresBufr
Date-3

Retrieve the data and examine it. Metview's BUFR Examiner displays the contents of the BUFR data. Each message contains many readings. If you visualise the data, you will see a standard display of synoptic observations.

Extracting the 2 metre temperature

Create a new Observation Filter icon from the Filters icon drawer, and rename the copy to filter_obs_t2m. With this icon we will extract just the 2m temperature into Metview's custom ASCII format for scattered geographical data - geopoints. Set these parameters:

DataDrop your obs icon here
OutputGeographical Points
Parameter012004

If you examine this icon now, you will see the result: a table of geo-located temperature values. When you visualise the data, you will see that the actual values are plotted as text on the screen; we can do better than this. From the solutions folder, drop the coloured_symbols icon into the Display Window. The dark_land_sea_shading icon may also help make the points easier to see.

Retrieving the forecast data

Create a new Mars Retrieval icon, rename it to t2m_forecast, and set these parameters:

TypeFc
LevtypeSfc
Param2t
Date-5
Step48
Grid1.5/1.5

The retrieved data is the 48-hour forecast made 5 days ago for 2-metre temperature.

Computing the forecast-observation difference

This is just the same as before, using a Simple Formula icon. Drop t2m_forecast into the Parameter 1 box, and filter_obs_t2m into the Parameter 2 box. Visualise the result - you will see that the result of a field minus a scattered geopoints data set is another geopoints data set. For each geopoint location, the interpolated value from the field was extracted before performing the computation.

 

  1. Overlay with the original temperature field?
  2. Generate a macro from the plot
  • No labels