Vgrid/applications

From Wiki
Jump to: navigation, search


The applications provided with the Vertical Grid Descriptors package are described here.

Contents

[hide]

1 Upgrading/adding Vertical Descriptors

A number of different vertical coordinate descriptors have been implemented in RPN Standard Files. A set of applications are provided to assist with the translation of these descriptors into the updated format used by the Vertical Grid Descriptors module. To get access to these applications type :

# Version 5 and up
. ssmuse-sh -d /ssm/net/cmdn/vgrid/5.0.3/intel13sp1u2
# Adjust the version and the compiler to your need
#
# Version 4
. s.ssmuse.dot ENV/d/x/modelutils/modelutils_1.1.0-a8
(for 32 bits do : . s.ssmuse.dot ~armnsch/SsmBundles/ENV/d/x/modelutils/1.1.0-a4)
. s.ssmuse.dot CMDN/vgrid/4.3.0

1.1 add_toctoc

This application can be used to add the record !! in a FST file that do not have one. This is the case for all files produced before GEM4. There are two ways to use this program:

add_toctoc -s SOURCE_FILE -d DESTINATION_FILE

In this mode the !! is written in the DESTINATION_FILE. The user may put it in the SOURCE_FILE using editfst. To avoid these manipulations, a user can call the add_toctoc application using the -samefile argument.

add_toctoc -s SOURCE_FILE -samefile

In this mode the !! will be written in file SOURCE_FILE.

1.2 convert_toctoc_5002

This application is only useful for GEM 4.0.0 outputs. The Vancouver Olympics runs 15km, 2.5km and 1km were produce with this version of GEM. The !! records in these output files are not compatible with the vgrid_descriptors module. The program convert_toctoc_5002 was created in order to convert these output files to the vgrid_descriptors module format. This program reads the non standard !! and !!SF and convert these to the the stantard !! abd P0. There are two ways to use this program:

convert_toctoc_5002 -s SOURCE_FILE -d DESTINATION_FILE

The user must remove the !! and !!SF from the SOURCE_FILE with editfst (exclure) and add the !! contained in file DESTINATION_FILE with editfst (desire). To avoid these manipulations, a user feeling particularly brave can call the convert_toctoc_5002 application using the -samefile argument.

convert_toctoc_5002 -s SOURCE_FILE -samefile

In this mode, the program removes the non-standard !! and !!SF from the source_file and puts the standard !! in it. The user do not have to do anything else. It is strongly suggested to make preliminary tests before doing this on many valuable files since it is not possible to undo the changes done to the SOURCE_FILE.

2 compute_pressure

One of the primary functionalities of the Vertical Grid Descriptors module is the calculation of vertical level information. While it is relatively simple for users to write their own level calculation programs, a set of applications is provided with the module that provide one-step access to level information. The program compute_pressure computes the hydrostatic pressure (nomvar PX) in hPa from the vertical grid descriptor !! and the surface pressure P0. If record !! is not present in the file, like it is the case for many vintage fst files from GEM3, the !! will be constructed on the fly by the vgrid_descriptors module. Call the program as follow:

compute_pressure -s source_file -d destination_file -var (NOMVAR,THERMO,MOMENTUM,ALL_LEVELS)
Argument Description
-s source_file A fst file with or without a !!
-d destination_file A fst file that will contain the output PX -var NOMVAR (TT,UU,...)
-var (TT,UU,...) The NOMVAR that will be used to get the list of output PX levels.
-var MOMENTUM PX will be computed on MOMENTUM levels only, for GEM3 this is the same as ALL_LEVELS.
-var THERMO PX will be computed on THERMO levels only, for GEM3 this will return an error since the THERMO levels are not defined.
-var ALL_LEVELS PX will be return for all levels.
NOTE: If a file contains only the records !! and P0, it is possible to use compute_pressure with -var (MOMENTUM, THERMO or ALL_LEVELS).

3 print_toctoc

This is a very useful program that allows to print to standard output the content the !!. Call the program as follow:

print_toctoc -fst rpn_file

Options

Argument Description
-fst source_file A fst file with or without a !!
-no_box Do not print the boxes at the beginning and end of program.
-ip1m_only Print ip1 for the momentum levels only.
-ip1t_only Print ip1 for the thermodynamic levels only.
-out output_file.txt (Version 3.1.0 and up) Print output in output_file.txt. This option is valid with key -ip1m_only and -ip1t_only.
-kind (level kind, possible values are 1,2 or 5) Only print level information for level kind given to key -kind. This is useful if more than one !! is present in file (like pressure and hybrid level for example).

If the !! record do not exist in the file, it will be construct from the content of the file and a message similar to the following will be output along with the vertical grid description:

WARNING: cannot find !! with the following: ip1=        -1,ip2=        -1
Trying to construct vgrid descriptor from legacy encoding (PT,HY ...)
Found 158 unique ip1 of kind 2 among the 1703 records in file to construct the vertical descriptor
hybrid (un-normalized) coordinate found
NOTE: Recomputing ptop in order to make it consistant with hyb top
Vertical descriptor successfully reconstructed

4 See also

  • toc2nml the program toc2nml can be used to printout GEM namelist informations on the vertical grid contained in the record !!. See the GEM documentation for more informations (version 4.4.0-b10 and up).