Versions Compared

Key

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

...

Some formats, such as GRIB, are easy to visualise in Metview - just right-click, Visualise. This is because they are quite constrained in their contents and have enough standardised meta-data for a program to understand how they should be plotted. Some other formats, such as netCDF and tables of ASCII data are not easily interpreted for automatic plotting (which variables/columns should be selected and what do they represent?). Metview introduces the concept of the Visualiser icon, which we will use in some of the following examples.

NetCDF

NetCDF is a binary file for storing multi-dimensional arrays of data and has enjoys wide academic usage.

Examining netCDF

Right-click on the supplied netcdf.nc icon and choose examine to see its structure. It consists of multi-dimensional variables, each of which has its own set of attributes; the file also has a set of global attributes.

...

The only difference between this and the original file should be in the values of the variable v2d. Visualise the new file to check that its values are in Celsius.

Operations can also be performed between two netCDF files (e.g. diff = nc1 - nc2), noting that the operation is performed using only the current variable in each.

Various meta-data can be extracted from a netCDF - try the following in a macro:

Code Block
languagepy
nc = read('netcdf.nc')
print('Variables: ', variables(nc))
print('Global attributes: ', global_attributes(nc))