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 12 Next »

 

Case description

In this exercise we will use Metview to explore the ways ensemble forecast 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.

Waves crash against a lighthouse in Newhaven, East Sussex

The plots we want to produce with Metview are as follows:

 

  
  

The first three plots show the precipitation forecast for the period of August 24 00UTC - 25 00UTC from various model runs preceding the event by 1, 3 and 5 days, respectively. The last plot shows the observed rainfall for the same period.

We will use both Macro and icons to  ....

 

This exercise involves:

  • reading and visualising ENS forecast in GRIB data
  • using the date functions in Macro
  • performing fiieldset computations in Macro

Preparations

XXX Download data

Verify that the data are as expected.

Remember to give your icons useful names!

Setting the map View

With a new Geographical View icon, set up a cylindrical projection with its area defined as

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.

Part 1: Evaluating the forecasts

In this part of the exercise we will create the plot shown below:

In this plot each map contains the forecasts for the 10 m wind gust in a 6-hour period from various model runs:

  • top left: the closest forecast to the event
  • top right: the forecast run 4 days before the event
  • bottom left: the ensemble mean for the ENS (Ensemble Prediction System)  forecast run 4 days before the event
  • bottom right: the ensemble spread for the ENS forecasts run 4 days before the event

Defining the layout

With a new Display Window icon define a 2x2 layout so that each plot should contain your view. 

Visualising the latest forecast

The GRIB file fc_latest_oper.grib contains the latest forecast run preceding the event. Drag it into the top left map and customise it with the wgust_shade Contouring icon and the title_oper Text Plotting icon. Animate through the fields to see the location of the areas heavily hit by the storm.

Visualising the operational forecast

The GRIB file fc_oper.grib contains the operational forecast run at 7 August 00 TC (four days before the event). Drag it into the top right map and customise it in the same way as the previous plot. You will see that the wind storm was not present in the forecast.

Visualising the ensemble mean

The GRIB file fc_ens.grib contains the control forecast and the 50 perturbed and 1 control forecast member of the ENS run at 7 August 00 TC (four days before the event). We will compute and visualise the mean of the ensemble members.

The computations will be done in Macro, so create a new Macro and edit it. First, read the GRIB file in:

g=read("fc_ens.grib")

Our GRIB contains three time steps (84, 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:

e_mean=nil

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

tsLst=[84,90,96]

loop step in tsLst

    ...your code will go here ...

end loop

Within the loop, first, read all the 51 ENS members for the given time step

f=read(data: g,
		step: step
	)	

Next, compute their mean with the mean() macro function

f = mean(f)

and add it field to the resulting fieldset:

e_mean = e_mean & f

By doing so the loop's body is completed. We finish the macro by returning the resulting fieldset:

return e_mean

By using the return statement our Macro behaves as if it were a fieldset (GRIB file). Drag it into the bottom left map and customise it with the wgust_shade Contouring icon. You would also need a custom Text Plotting icon. Take a copy of the one used for the previous plots (called title_oper) and tailor it to your needs. When you analyse the plot you will notice that the ensemble mean hints for higher wind gusts in the area of interest.

Visualising the ensemble spread

The ensemble spread is the standard deviation of the ENS members. You can compute it in a very similar way to the ensemble mean. The only difference is that this time you need to use the stdev() function instead of mean(). Now it is your task to write a Macro for it. Once you finished your Macro drag it into the bottom right map and customise it with the wgust_spread_shade Contouring icon and with a custom Text Plotting icon. You will see that the ensemble spread is fairly high in the investigated area indicating that ...

Part 2: Checking the probabilities

In this part we will estimate the risk of the wind gust being higher than certain thresholds. We will compute the probability of the wind gust exceeding 22 m/s (that is really stormy weather) and generate the plot shown below:

You can compute the probabilities with a Macro very similar to the ones you wrote for the ensemble mean or standard deviation. Basically you need to loop through time steps and for each time steps you need to derive a new field. The difference is that this time you need to compute a probability. Supposing that all the ENS members are stored in fieldset f and the threshold value in variable threshold the computation should go like this:

f=f > threshold	
f=100*mean(f)

Here the first line performed a logical operation on the fieldset and resulted in a new fieldset having 1s in each gridpoint where condition met (i.e. the value is larger than the threshold) and 0s in all other gridpoints. The probability is simply the mean of these fields. We multiplied the result by 100 to scale it into the 0-100 range for an easier interpretation.

Now it is your task to write a Macro and compute the probabilities. Once you finished your Macro drag it into the bottom right map and customise it with the wgust_spread_shade Contouring icon and with a custom Text Plotting icon. You will see that the ensemble spread is fairly high in the investigated area indicating that ...

Part 3: Creating a stamp plot

In this part we will look into the individual ENS members and create a plot showing all the ENS members for a given time step on the same page like this:

These plots, for an obvious reason, are called stamp plots. This a complex plot so we will work in Macro again.

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

dw=plot_super_page(pages: mxn_layout(my_view,9,6))

Next, drop your wgust_shade Contouring icon into the Macro editor and tidy up the generated code, We will apply this icon to all the fields in the stamp-plot.

Continue with reading the GRIB file with the ENS forecasts in:

g=read("fc_ens.grib")

Define a variable to hold the time step we want to plot:

step = 90

The first plot will contain the control forecast. We need to filter it out with following read() command: 

f=read(
	data: g,
	step: step,
	type: "cf"	
)

The available space for the title in the plot will be confined so we try to use a very short titlet:

title = mtext(
	text_line_1	: "control"
)

Now we willfor i=1 to 50 do ...your code will go here ... end for

Within the loop, simply read all the members for the given timestep

f=read(data: g,
		step: step,
		number: i
 )	

then compute their mean with the mean() macro function

title = mtext(
		text_line_1	: "member: " &i,
		text_font_size: 0.2 
	)

and add it to the resulting fieldset:

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

We finish the macro by returning the resulting fieldset:

return e_mean

By using the return statement our Macro behaves as if it were a fieldset (GRIB file). Drag it into the bottom left map and customise it with the wgust_shade Contouring icon and the title_mean Text Plotting icon. You will see that the ensemble mean hints that high wind speed can happen.

 

Part 4: Creating a spaghetti plot

We finish the exercise by looking into predictability of the large scale flow pattern by generating spaghetti plots for 500 hPa geopotential from the same ENS run we investigated before.  A spaghetti plot is composed by plotting each ENS member into the same map using a single contouring value. The plot we want to generate is shown below:

These plots, for an obvious reason, are called stamp-plots. This a complex plot so we will work in Macro again.

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

dw=plot_super_page(pages: mxn_layout(my_view,9,6))

Next, drop your wgust_shade Contouring icon into the Macro editor and tidy up the generated code, We will apply this icon to all the fields in the stamp-plot.

Continue with reading the GRIB file with the ENS forecasts in:

g=read("fc_ens.grib")

Define a variable to hold the time step we want to plot:

step = 90

The first plot will contain the control forecast. We need to filter it out with following read() command: 

f=read(
	data: g,
	step: step,
	type: "cf"	
)

The available space for the title in the plot will be confined so we try to use a very short titlet:

title = mtext(
	text_line_1	: "control"
)

Now we willfor i=1 to 50 do ...your code will go here ... end for

Within the loop, simply read all the members for the given timestep

f=read(data: g,
		step: step,
		number: i
 )	

then compute their mean with the mean() macro function

title = mtext(
		text_line_1	: "member: " &i,
		text_font_size: 0.2 
	)

and add it to the resulting fieldset:

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

We finish the macro by returning the resulting fieldset:

return e_mean

By using the return statement our Macro behaves as if it were a fieldset (GRIB file). Drag it into the bottom left map and customise it with the wgust_shade Contouring icon and the title_mean Text Plotting icon. You will see that the ensemble mean hints that high wind speed can happen.

 

 

 

 

 

  • No labels