Versions Compared

Key

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

...

Code Block
plot(your_view,f,cont) 

By default, if no title definition is specified, Metview adds a title line for each filed 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:

 

 

...

Code Block
title=mtext(text_line_1: "Value: 560 gpm T+<grib_info key='step' where='number=50' /> h" )

 

If Here we ran the Macro we would see far too many titles in the plot (one for each layer i.e. 50!). To prevent the titles from popping up we need to define a Text Plotting inside the loop and add it to your plot() command:

Code Block
title=mtext(text_line_1: "your custom title ....")

plot(your_view,f,cont,title)

As for the custom title's text, the idea is that you should use the 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 field with out contour settings and title:

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

Now visualise your Macro (it will take half a minute or so) Once you sorted the the title out visualise your plot again and animate through the steps to see how the spaghetti is spreading out over time.

...

  • plot the control forecast into map 51 the 51st (dw[51]). The control forecast is stored in the same file as the perturbed forecast members: fc_ens.grib. To access it (via the read() function) you need to omit the number parameter and set type to "cf".
  • plot the operational forecast into map 52 the 52nd (dw[52]). The operational forecast is stored in fc_oper.grib. For the read() command you just need to specify the step.
Info

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

...

The spaghetti plot only shows the perturbed ENS members. Try to add the control forecast (from ENS) and the operational forecast to it as well. You should use different isoline colours for itthem.

Hints:

  • plot the control forecast with a thick green isoline. The control forecast is stored in the same file as the perturbed forecast members: spag_ens.grib. To access it (via the read() function) you need to omit the number parameter and set type to "cf".
  • plot the operational  forecast with thick red isoline. The operational forecast is stored in spag_oper.grib. You just need to read it in with the read() command. 
Info

While setting up these extra layers it is a good idea to temporarily comment out the whole loop processing the perturbed forecasts members.