Versions Compared

Key

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

...

Most of these functions work on each gridpoint value of each field in the fieldset. For example, if we add 1 to a fieldset which contains 3 fields, this will return a new fieldset with 3 fields, the values of which are 1 greater than their respective input fields, as shown below:

Gliffy Diagram
namemetview-fieldset-plus-one

 

The situation is similar for operations between two fieldsets:

Gliffy Diagram
namefieldset-plus-fieldset

This example also illustrates what happens when missing values are in the data, represented here by an "x". In most cases it is not valid to use the missing value in the result, so that point in the result will itself be set to the missing value indicator.XXX diagram of how fieldset operations are done?

Computing a Forecast - Analysis Difference

XXXXImage Added

As a simple example, let's compute the difference between a set of forecast fields and the corresponding set of analysis fields for the same time step.

Have a look at the supplied GRIB files (right-click, examine) to confirm that temperature_forecast.grib contains, at multiple vertical levels, 48-hour temperature forecasts for the same date and time as the analysis data in temperature_analysis.grib.

Create a new Simple Formula icon and rename it to fc_an_diff. Edit the icon, ensure that the first tab is selected (F+G) and that the operator is minus ( - ). Drop your temperature_forecast GRIB .grib icon into the Parameter 1 box, and drop temperature_analysis.grib into the Parameter 2 box. Save the icon and execute it. The icon should turn green, indicating the result has been computed and cached. Further operations on this icon will not re-compute the result unless either of its input icons are modified. If you simply wanted the result to be stored, you could right-click and choose save result to bring up a file save dialogue, ; but instead choose visualise to plot it. Note that all 6 fields in each data icon are used in the computation - the result is a set of 6 fields.

The solutions folder contains two Contouring icons which can be used to show the differences: select both . Drop pos_shade and then neg_shade into the Display Window. Notice that the second one replaces the first one - this is not what we want! Select both icons with the mouse and drop them both together into the Display Window. It is also possible to drop them one at a time, but they do not accumulate - one will replace the otheruse them both in the plot. Edit the icons to see which parameters were used to create the positive and negative shading effects. There is also a Contouring icon called rainbow_diffs - this uses Metview's ability to draw isolines of different colours rather than using shading. This can be useful if it is important to see another layer underneath the temperature.

...

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.bufr icon and contains observations over Europe, valid at the same time as the GRIB data. Examine and visualise both icons to confirm what they contain.

...

Create a new Observation Filter icon and rename it to filter_obs_t2m.

DataDrop the obs.bufr icon here
OutputGeographical Points
Parameter012004

...

Write a macro which takes U and V wind components from a GRIB file and plots the wind speed as shaded contours with wind arrows overlaid on top.