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 7 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. The system has picked up moisture and energy left over from Hurricane Bertha on the other side of the Atlantic.

Waves crash against a lighthouse in Newhaven, East Sussex

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 we will generate ...

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_pf.grib contains the 50 perturbed 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 to see how the ENS predicted the event. The computations will be done in Macro.

Create a new Macro and edit it. First, read the GRIB file in:

g=read("fc_pf.grib")

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

e_mean=nil

Next, add this piece of code for 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 50 members for the given time step

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

then compute their mean with the mean() macro function

f = mean(f)

and add it to the resulting fieldset:

e_mean = e_mean & f

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.

Filedset f now contains 50 fields. Next, compute the probability in as follows:

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

In t

Last, add it to the resulting fieldset:

e_prob = e_prob & f

We finish the macro by returning the resulting fieldset:

return e_prob

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 prob_shade Contouring icon and the title_prob Text Plotting icon. You will see that the ensemble mean hints that high wind speed can happen.

Visualising the ensemble spread

The ensemble spread is the standard deviation of the perturbed forecast members. You can compute 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 do it.

Drag it into the bottom right map and customise it with the wgust_spread_shade Contouring icon and the spread_mean Text Plotting icon. . You will see that the ensemble ....

Part 2: checking the probabilities

The next step is to estimate the risk of the wind gust being higher than certain thresholds: i.e. we will compute some probabilities.  We will write a macro to compute the probability of the wind gust exceeding 20 m/s,

So create a Macro and edit it. First, read the GRIB file with the perturbed forecasts in:

g=read("fc_pf.grib")

Since this GRIB contains several time steps we need to write a loop to compute the probability for each time step individually. First, define the fieldset that will contain the resulting probabilities:

e_prob=nil

Next, we define the threshold for wind gust (in m/s units). We will store it in a variable:

val=20

Now we can process the fields in a loop going through the time steps:

tsLst=[84,90,96]

loop step in tsLst

    ...your code will go here ...

end loop

Next, compute the probability in as follows:

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

Here the first line turned set ech gridpoint hiegher value than val 1 and all the others zero, Last, add it to the resulting fieldset:

e_prob = e_prob & f

We finish the macro by returning the resulting fieldset:

return e_prob

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 prob_shade Contouring icon and the title_prob Text Plotting icon. You will see that the ensemble mean hints that high wind speed can happen.

Part 3: ensemble members

We will create a stamp plot for a selected timestep i.e. we will plot the all the 50 ENS members.

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, read the GRIB file with the perturbed forecasts in:

g=read("fc_pf.grib")

Since this GRIB contains several time steps we need to write a loop to compute the probability for each time step individually. First, define the fieldset that will contain the resulting probabilities:

e_prob=nil

Next, we define the timestep we want to plot. We will store it in a variable:

val=90

Now we will

for 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