Versions Compared

Key

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

...

This sort of window is called a Metview desktop.

 

Scroll pdf ignore

If doing this tutorial outside of the ECMWF training course, download all data files and icons by clicking here:

They should be saved into your $HOME/metview folder. In the Metview user interface you should see an icon representing the downloaded files, which are compressed into a tarball. Right-click the icon and choose execute to uncompress the files.

 

Copy a To get started, copy a GRIB data file into your Metview directory (~/metview); if you are attending the training course at ECMWF, then you can instead should carefully type the following command in a terminal window:

Code Block
languagebash
 cp ~trx/mv_data/t1000.grb ~"$HOME/metview

 

/training/day 1"

Ensure you are viewing your Metview home directory. You should now see a new GRIB icon in your Metview window:

...

If it does not appear immediately, press F5 (or View | Reload).Move this icon into the folder you are working in.

When you right-click on an icon, a context-sensitive menu appears.

...

  • drop the t1000.grb icon into the Macro Editor; a variable called t1000_2e_grb is assigned to the value of the read() command, which reads the GRIB data. Such variable names are based on the names of the icons used ti to generate them, but with non-permitted characters replaced by their hexadecimal code (in this case, the dot in the filename is replaced with 2e).

  • rename the variable to simply be t1000
  • drop your polar_europe icon into the Macro Editor
  • underneath the generated code, type the following line:

...

Code Block
languagepy
# Metview Macro

t1000 = read("/path/to/user/training/day 1/metview/t1000.grb")

land_shade = mcoast(
    map_coastline_thickness         : 2,
    map_coastline_land_shade        : "on",
    map_coastline_land_shade_colour : "cream"
    )

polar_europe = geoview(
    map_projection      : "polar_stereographic",
    map_area_definition : "corners",
    area                : [30,-25,50,65],
    coastlines          : land_shade
    )

plot(polar_europe, t1000)

Now run the macro to generate the plot.

Note that we can put a relative path into the read() command:

Code Block
languagepy
t1000 = read("t1000.grb")

Modifying Layers

Now look at the Layers tab again. Drag the shaded Coastlines layer so that it is above the t1000.grb layer – a quick way to mask out the sea points! Imagine looking down through the layers from the top to the bottom in order to understand how they work. You can also select the Coastlines layer and change its transparency value. You can also toggle layers on and off using the checkboxes next to them. Note that these adjustments are not carried through to the various export image formats (see later).

...

Metview provides many ways to style the contours when plotting data. These are controlled via the Contouring icon. Create a new instance of this icon and rename it to shade. Edit it, setting the following parameters:

...

Create a legend by changing the first parameter in the Contour editor and dragging the icon into the Display Window again:

...

Code Block
languagebash
 cp ~trx/mv_data/z500.grb ~"$HOME/metview
Scroll pdf ignore

Otherwise, download the file here XXXX.

/training/day 1"

 

You should see the new GRIB icon in your Metview home working folder. Move this icon into the folder you are working in.

...

Drop this into the Display Window - the result is not as intended! The new Contouring definition was applied to both fields, not just the geopotential. Close the Display Window and re-run the macro to get us back to the point before we added the geopotential. This time, select both the z500.grb and black_contour icons and drop them together into the Display Window. This forces the association between the data and the visual definition. You might want to remove the temperature isolines by setting Contour to Off in the macro.

Extra Work

Contouring

Spend some time exploring the Contouring icon. Here are some suggestions:

  • shade only the values which are below freezing point
  • try different types of shading by setting Contour Shade Method and Contour Shade Technique

Coastlines

Spend some time exploring the Coastlines icon. Here are some suggestions:

  • adjust the grid lines
  • plot country boundaries
  • plot rivers