Some Sample Programs Using the I/O API
Here are three 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
Executables for these programs are available for
each supported workstation architecture
in the directories /env/proj/(SunOS5 | IRIX5 | alphaOSF1)/bin.
Before you run the programs, you need to assign
logical names to the physical file
names of output files and the GRIDDESC
file according to Models-3 conventions, using the operation
"setenv <lname> <pname>"
The programs will prompt you for the logical names
you have chosen for the input files, and then for the run
specifications (in these cases, mainly for the
specifications of grid and coordinate system to be used. The
prompts will have default responses indicated in square brackets
[LIKE THIS] which can be accepted by hitting <RETURN>.
To build the programs:
next: NCDUMP
Up: Related Programs
To: Models-3/EDSS I/O API: The Help Pages