...
We could have done this a bit quicker - there was no need to execute the fc_an_diff icon. If you right-click the icon and choose clear result, you can now directly choose visualise - the execute action is performed in the background, as it is required before visualisation can occur.
Putting it into a Macro
Ensure that the difference fieldset is visualised with the contouring applied. One way to generate a Metview Macro script from this plot is to click the Generate Macro button (also available from the File menu). A new Macro script will be generated - have a look at it to confirm that it contains code to read the data, compute the difference and plot the result. Run the macro to obtain the plot, either by using the Run button from the Macro Editor, or by selecting visualise from the icon's context menu). By default, the macro is written so that it will produce an interactive plot window; it will generate a PostScript file if it is run with the execute command, or if it is run from the command line.
...
The variables temperature_forecast
and temperature_analysis
are fieldset variables, coming, as they do, from GRIB data. Any operation on or between fieldsets is applied to every grid point in every field in the fieldset. Metview Macro has a large set of functions and operators on fieldsets.
Computing a Forecast - Observation Difference
This time we'll compare two very different data types: gridded forecast data in a GRIB file, with scattered observation data described in a BUFR file. We will use the t2m_forecast icon (the gridded forecast data), and the observation data is in a BUFR file represented by the obs icon. Examine and visualise both icons to confirm what they contain.
Extracting the 2 metre temperature
The first step to comparing GRIB data with BUFR data is to extract just the parameter we want from the BUFR data and convert it to the geopoints format. Then the computation will be simple.
Create a new Observation Filter icon and rename it to filter_obs_t2m.
Data | Drop the obs icon here |
Output | Geographical Points |
Parameter | 012004 |
Note that 012004 is the code for 'Dry bulb temperature at 2m'. Confirm that the result of this icon's filtering is a set of geopoints with temperature values.
Computing the forecast-observation difference
This is just the same as before, using a Simple Formula icon; create a new one and rename it to fc_obs_diff. Drop t2m_forecast into the Parameter 1 box, and filter_obs_t2m into the Parameter 2 box. Visualise the result - you will see that the result of a field minus a scattered geopoints data set is another geopoints data set. For each geopoint location, the interpolated value from the field was extracted before performing the computation. From the solutions folder, drop both the diff_symb_hot and the diff_symb_cold icons together into the plot in order to get a more graphical representation of the result.
XXXXX
Extra Tasks
Computing relative differences
...