Versions Compared

Key

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

...

When you first start Metview, you will see something like this:

Image RemovedImage Added

This sort of window is called a Metview desktop.

Scroll pdf ignore
Panel
titleDownload
Expand
titleClick here for files to download...

Excerpt

Download the icons for this session from the link below. Create a sub-directory called training inside your Metview home directory, $HOME/metview, and save the .tar.gz file there. Then, from Metview, navigate to this folder and right-click on the tar.gz icon; choose Extract to uncompress the files into their folder. Work from there. The main instructions are written for participants of the Data analysis and visualisation using Metview training course at ECMWF. Any files to be copied from the file system will also be downloadable from this page.

Attachments
uploadfalse
oldfalse
patterns*.tar.gz,*.grib,*.grb
sortByname

 

  Metview desktop.

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

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

You If you navigate Metview to the training/day_1 you should now see a new GRIB icon in your Metview window:

...

If it does not appear immediately, press F5 (or View | Reload).

Move the icon into the folder 'a quick tour' by dragging and dropping it there. Enter the folder and do this exercise there.

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

...

We will investigate these features in more detail later, but for now close the Display Window.

Image Modified

Creating and Editing an Icon

...

Edit the newly-created icon by either double-clicking on it or else right-click, edit (double-clicking an icon performs the edit action for most icon types). This brings up the icon editor for coastline plotting. All user-selectable parameters for plotting coastlines are here. Set the following parameters:

Map Coastline Thickness

2
Note: an undo button now appears beside this parameter

Map Coastline Land ShadeOn
Map Coastline Land Shade ColourCream

For colour-based parameters, there are two small arrows - the one on the right reveals a drop-down list of predefined colours (use this one); then one on the left reveals an advanced colour selection tool.

...

Create a new Geographical View icon and rename it to polar_europe. Edit the icon and change the following parameter:

Map ProjectionPolar Stereographic

Save the changes and visualise the icon. Drop the GRIB data icon into the Display Window to see it on the new map. It is also possible to visualise the GRIB icon and then drop the Geographical View icon into the plot to achieve the same effect. Have a look at some of the other projections on offer, then go back to polar stereographic.

...

Code Block
languagepy
# Metview Macro

t1000 = read("/path/to/user/metview/training/day_1/metviewa quick tour/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)

...

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

Contour Shade

On

Contour Shade Method

Area Fill

Contour Shade Max Level Colour

Red

Contour Shade Min Level Colour

Blue

Contour Shade Colour Direction

Clockwise

Apply the changes, visualise the data icon again (t1000.grb) and drag the shade icon into the Display Window.

...

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

Legend

On

Fixing the Contour Levels

Now zoom in and out of different areas. What happens to the palette - does it stay constant? The default behaviour is to create contours at 10 levels within the range of data actually plotted. As the area changes, so does the range of values being plotted.
Let's create a palette which will not be altered when we change the area. Copy the shade icon (either right-click + duplicate, or drag with the middle mouse button), and rename the copy 'fixed_t' by clicking on its title. Edit the icon and make the following changes:

Contour Level Selection Type

Level List

Contour Level List

-35/-20/-10/-5/0/5/10/20/35

Contour Shade Colour Direction

Clockwise

Now when you apply this icon you will see that the palette is fixed wherever you zoom. There will probably be parts of the plot which are not filled; this is because our range of contour levels does not cover the whole range of values in the data. Change the list of contour levels so that the whole plot will be covered - you only need to add one number to each end of the level list to do this (or else change the current numbers at the ends of the list).

...

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

...

We will now change these isolines to black. Create a new Contouring icon and rename it to black_contour. Edit it and set the following:

Contour Line Thickness2
Contour Line ColourBlack
Contour HighlightOff

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.

...