Some Sample Programs Using the I/O API
Here are four sample programs to show normal usage of the
I/O API. These programs were designed to show some typical
uses in a meaningful fashion (i.e., the programs really do
compute something useful). These programs also use a number of the
utility and coordinate transformation routines. Along with these
programs, a number of I/O API data manipulation programs are
also distributed, in the m3tools subdirectory of the
release;m they are documented here in the
I/O API User Manual.
These sample programs are:
- LATLON
computes single-layer time-independent gridded and/or
boundary files containing variables "LAT"
and "LON" containing latitudes and longitudes
at cell centers for the specified grid and/or its boundary
(the choice of which file (or both) to generate is a
user option). Uses
- PRESZ
optionally reads in a file containing gridded terrain
heights, prompts the user for a (hydrostatic) vertical
grid, and then constructs a time-independent layered
gridded file containing variables
- ZH (meters), hypsometric-approximation heights
at the half-levels (i.e., at layer centers).
- ZF(meters), heights at the full levels (i.e.,
at layer-tops).
- PRESH, pressures at the half-levels.
- PRESF, pressures at the full levels.
Uses
- SFCMET reads
in an ASCII hourly surface meteorology observation file
in the format used by the National Climactic Data Center,
and puts out its data in an ID-referenced-type hourly
time-stepped I/O API file. Workstation only. Uses
- VERTINTEGRAL
computes the vertical-column integral mass for each timestep
of each variable in a user-specified GRIDDED Models-3 CMAQ CONC
file and writes the result to a user-specified 1-layer GRIDDED
output file. It requires the use of an MCIP output
MET_CRO_3D file on the same grid and for the
same time period, for variables
DENS
and ZF
used in the calculation. This program also demonstrates OpenMP
parallelism and how to use command line arguments.
next: NCDUMP
Up: Related Programs
To: Models-3/EDSS I/O API: The Help Pages