Versions Compared

Key

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

...

Save the changes, and visualise this new icon. See how the settings in the visualiser icon correspond to the variable names in the data. Now visualise another field from the same file. Use the supplied shading_20_levels icon on the plots.

Exporting Cross Sections and Profiles as netCDF

Metview uses netCDF internally for the results of some computations. In particular, the analysis views (e.g. Cross Section ViewVertical Profile View) do this, but their result data is not available to the user. Therefore, each of these views has a corresponding Data view. If the intention is to simply plot the result, then the View icons are more useful. But to store the result data, the Data icon is required.

Create both a Vertical Profile View and a Vertical Profile Data icon and edit both to see the differences. All the parameters related to the visualisation of the result are only in the View icon, and the Data parameter exists only in the Data icon.

Dealing only with the Data icon now, drop the supplied input GRIB icon t_atmos.grib into the Data parameter box. Set the Point to whatever you like and save the icon. Now if you right-click and examine the icon, you will see the resulting netCDF file in the NetCDF Examiner. You can also save the result into a file for storage.

All of this can also be put into a macro, where the resulting netcdf variable can be further manipulated before being written to file (or visualised).

Write a short macro which computes a vertical profile from the data (use the Vertical Profile Data icon that you already set up) and writes the result to a file. To write a netcdf variable to a file, the syntax is the same as for any other data type:

Code Block
languagepy
write('output_file', data)

Your macro should be 3 lines long (well, 3 commands anyway) - one to read the input GRIB file, one to compute the profile and one to write the result to disk.

Geopoints

Format overview

Geopoints is the ASCII format used by Metview to handle spatially irregular data (e.g. observations). There are a number of variations on the format, but the default one is a 6-column layout. The columns do not have to be aligned, but there must be at least one whitespace character between each entry.

...