Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected the list of steps
Scroll pdf ignore
Panel
titleDownload
Expand
titleClick here for files to download...
Excerpt Include
A Quick Tour of Metview
A Quick Tour of Metview
nopaneltrue

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

Case description

In this exercise we will use Metview to explore the various ways ensemble forecasts can be processed and visualised. The case we will investigate is related to a low pressure system crossing the UK on 10 August 2014: it caused high winds and heavy rain especially in the South-Western part of the country.

...

Code Block
South/West/North/East: 43/-20/60/10

Set up a new Coastlines icon with the following:

  • the land coloured in cream
  • the coastlines thick black
  • use grey grid lines at every 5 degrees.

...

Our GRIB contains three time steps (78, 84 , and 90 and 96 hours, respectively) and we would like to compute the ensemble mean for each one separately. To achieve this goal we will write a loop going through the time steps. First, define the fieldset that will contain the results

...

Next, add this piece of code to define the loop (we store the time steps in a list):

Code Block
tsLst=[78,84,90,96]

loop step in tsLst

    ...your code will go here ...

end loop

...

Create a new Macro and edit it. Drop your Geographical View and the Coastlines icons into the Macro editor. Once you've tidied up the code, define a 6x9 layout so that each plot should contain your view:

Code Block
dw=plot_super_pagesuperpage(pages: mxn_layout(my_view,9,6))

...

The stamp plot will be generated by plotting each perturbed forecast member into a separate map, so we need to write a loop like this:

Code Block
for numberi=1 to 50 do 

    ...your code will go here ...

end loopfor

Within the loop, simply read the current perturbed forecast member for the given time step:

Code Block
f=read(data: g,
		number: numberi,
		type: "pf",
		step: step
	  )	

...

Code Block
title = mtext(text_line_1 : "PF: " & numberi)

Finish the loop by plotting the Last, plot the field into the right map in our layout:

Code Block
plot(dw[i],title,f,wgust_shade)

Having done so , run we have finished the code inside the loop. Now visualise your Macro (this will take a minute or so) and try to identify the ENS members predicting high wind speeds in our area.

...

Create a new Macro and edit it. Drop your Geographical View and the Coastlines icons into the Macro editor and change the map area to

...

The "spaghetti" will be generated by plotting each perturbed forecasts member as a separate layer into the same map. To achieve this goal we need to write a loop like this:

Code Block
for numberi=1 to 50 do 

    ...your code will go here ...

end loopfor

Within the loop, read all the perturbed forecast members for the all the time steps:

Code Block
f=read(data: g,
	type: "pf", 
	number: numberi
 )	

By default, if no title definition is specified, Metview adds a title line for each field in the plot. Since we are about to plot 50 fields into the same map this would result in 50 titles in the plot! To avoid having too many titles we use a custom Text Plotting icon:

...

Here we used the where statement inside the grib_info tag (as described here)  to make the title appear for one member (the 50th member) only.

We finish the loop by plotting the Last, plot the field with our contour settings and title (inside the loop) :

Code Block
plot(your_view,f,cont_spag,title) 

Having done so we have finished the code inside the loop. Now visualise your Macro (it will take half a minute or so) and animate through the steps to see how the spaghetti is spreading out over time.

...

  • plot the control forecast into the 51st map (dw[51]). The control forecast is stored in the same file as the perturbed forecast members: fc_ens.grib. Read it in with this code:

    Code Block
    f = read(data: g, type: "cf", step: step)
  • plot the operational forecast into the 52nd map (dw[52]). The operational forecast is stored in fc_oper.grib. Read it in with this code:

    Code Block
    f =read(source: "fc_oper.grib", step: step)

...

NOTE: While setting up these extra plots it is a good idea to temporarily comment out the loop processing the perturbed forecast members.

Add more fields to the spaghetti plot

...

  • use thick green contour line. The operational forecast is stored in spag_oper.grib. Read it in with this code:

    Code Block
    f = read("spag_oper.grib")

...

 

NOTE: While setting up these extra plots it is a good idea to temporarily comment out the loop processing the perturbed forecast members.