...
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.
Notice how simple the computation of the field differences is:
Code Block | ||
---|---|---|
| ||
fc_an_diff = temperature_forecast - temperature_analysis |
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.
Extra Tasks
Computing relative differences
Adapt the macros from this tutorial so that they compute relative differences rather than absolute differences between the values. By this we mean compute the differences as percentages of the original analysis values. You will need to create new Contouring and Symbol Plotting icons to plot these nicely.