Vgrid descriptors

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher

This package contains a set of applications and a library of Fortran functions designed to assist with the manipulation and interpretation of the vertical coordinate (the '!!' record) in RPN Standard Files (FST). Descriptors and vertical coordinates can be created, queried and written using either the applications provided, or high- or low-level Fortran APIs.

Background

A full set of 3D grid descriptors is needed to position a point in space. These descriptors are >>, ^^, and !! for the x-dimension, y-dimension and z-dimension, respectively. Each field in an FST file is linked to a set of horizontal grid descriptors using the convention:

field:ig1 <-> horizontal_descriptor:ip1
field:ig2 <-> horizontal_descriptor:ip2

Linking of the vertical grid descriptor follows a similar strategy The iv1 and iv2 values used for vertical coordinate linking are stored in a secondary record header. This feature is currently unimplemented in RPN Standard files.:

field:iv1 <-> vertical_descriptor:ip1
field_iv2 <-> vertical_descriptor:ip2

The Vertical Grid Descriptor Module (see below) is a Fortran90 module that provides a simple interface for reading and interpreting vertical grid descriptors (!!).

Vertical Coordinate Descriptor

The vertical coordinate descriptor in GEM v4.0.0 and above is !! (toc-toc). This record contains a table of information that is needed to establish the vertical coordinate. This descriptor is backwards-compatible, in that it can be used to describe any coordinate that is currently in use at RPN/CMC. For vertical coordinates that depend on a surface reference field, information about the reference name is contained in the descriptor record, and allows the user to reconstruct the position of each vertical level in the coordinates corresponding to the level type (i.e. pressure, height, etc).

Vertical Grid Descriptor Module

The vertical grid descriptor module is use-associated with

use vGrid_Descriptors

and gives the user access to a both a high-level interface and a lower-level interface for dealing with vertical grid descriptors in FST files. The high-level interface is used to compute grid positions levels in the vertical in an easy one-step call. For example, computing the pressures at all levels of a set of hybrid coordinate levels produced by the GEM model is as simple as a single call to the levels method of the high-level interface. The majority of users will probably be satisfied with the functionality of this level of interface.

Access High-Level Interface Documentation

The fundamental component of the lower-level interface to the module is the vgrid_descriptor derived type, which contains all of the information necessary to read / write / manipulate the vertical descriptors of a file, along with providing some basic functionality such as computing vertical coordinate positions.

Access Low-Level Interface Documentation

In addition to the interface documentation accessible above, a Developer's Corner is provided to support further development of the Vertical Grid Descriptors module. This page contains information about the internal workings of the module that is of use to those actively developing the module, but that is not applicable to users.

Compiling and Linking Against the Module

The libraries for the Vertical Grid Descriptors package currently reside in an Ssm package, you may access it with:

Modèle:Vgrid/setup

Using etagere (the build system supported at RPN/CMC), a program (called foo.ftn90 in this example) that can makes use of the Vertical Grid Descriptors module through use-association can be compiled and linked against a specific version of the module (in this case 1.0.1) with the following command.

# version 5
r.compile -o foo -src foo.ftn90 -libappl descrip -librmn rmn_015
# version 4
r.compile -o foo -src foo.ftn90 -libappl descrip modelutils_base -librmn rmn_015

If an error message during compilation warns about an incompatible module version, check the release notes page for directions on which compiler version to acquire before compiling.

Release Notes

Vertical coordinates in fst files