Program PRESTERP

Usage

    setenv  <infile>      <path name>
    setenv  <presfile>    <path name>
    setenv  <outfile>     <path name>
    presterp [<infile> <presfile> <outfile> [<interp-mode>]]
        <and respond to the prompts>
where infile, presfile, and outfile are the logical names of the input data file, the input presssure-coefficient file, and output data files, respectively, and interp-mode is one of the following:
LIN:
do linear-in-pressure interpolation from sigma vertical coordinate inputs to pressure vertical coordinate outputs
LOG:
do log(pressure) interpolation from sigma vertical coordinate inputs to pressure vertical coordinate outputs
POW:
do pressurealpha interpolation from sigma vertical coordinate inputs to pressure vertical coordinate outputs
If these command-line arguments are not present, the program will prompt the user for them. If the interp-mode is not present, the program will prompt the user for it on a varaible-by-variable basis.

Summary

The PRESTERP program uses the interpolation indices and interpolation coefficients from the PRES_CRO_3D or PRES_DOT_3D files produced by the mcpl output module for MM5 to interpolate the variables in its input data file from sigma coordinates to pressure coordinates, and then write the result to its output data file, for every time step in the input data file. The input data file and the pressure-coefficient file must have the same horizontal coordinate system and grid, and the pressure-coefficient file must cover the time period covered by the input-data file.

If you want to run this program in batch mode (from a script) with variable-by-variable choice of interpolation mode, the recommended way to develop the script is to run the program once interactively noting the pattern of responses to prompts which generate the particular windowing you want. The pattern of responses then becomes either a command-input file which is redirected into the program in the script, or becomes a "here-document" fed into the execution. The simplest form (where all variables use the linear-in-pressure mode of interpolation) looks like the following:

#!/bin/csh
setenv  <infile>      <path name>
setenv  <presfile>    <path name>
setenv  <outfile>     <path name>
presterp [[<infile> <presfile> <outfile>] LIN] << EOF
Yes, continue with the program
EOF
The first three command line arguments, if supplied, must be the names of the input, pressure, and output files, respectively; the fourth, if supplied, must be one of the following, to indicate method of interpolation: LIN, LOG, or POW. If the fourth command line argument is supplied, then below-terrain pressure-grid locations will be filled with BADVAL3 from PARMS3.EXT. Otherwise, you will be prompted on a variable-by-variable basis for the value to be used for that purpose.


Previous: MTXCPLE

Next: SELMRG2D

Up: Related Programs

To: Models-3/EDSS I/O API: The Help Pages