Program M3TPROC

Usage

    setenv  <infile>  <path name>
    setenv  <outfile> <path name>
    m3tproc [<infile> <outfile>]
        <and respond to the prompts>
where infile is the logical name of the input file, and outfile is the logical name of the output file (to which the cell-wise (usually gridded) aggregates are written). If the file-name arguments are not present, the program will prompt the user for both logical names.

Summary

The M3TPROC program computes time-aggregation for selected variables from time-stepped I/O API files of types BOUNDARY , CUSTOM , or GRIDDED. For each output time step for each selected variable, the program writes the selected aggregate value of that variable to the output file, optionally renaming it in the process. For example, the program allows you to construct a file of daily gridded 08:00-16:00-maximum ozone selected from a standard AQM-output concentration file.

Modified November, 2002: the previous edition would silently generate garbage for variables of type INTEGER or DOUBLE, or for files not of the types listed above. The new version handles all three types of variables correctly, and generates meaniangful error messages for the inappropriate file types.

Before you run the program, you need to assign a logical name to the physical file names of both the input and output files, according to EDSS/Models-3 conventions, using the operation

        "setenv <lname> <value>"
    
The program also uses the following optional environment variables for control of the aggregation operation to be performed: The program will prompt you for any control options not set by environment variables: the logical names you have chosen for the input and output files, and then extensively for the options to choose; the prompts will have default responses which can be accepted by hitting <RETURN>. The specification of starting date and time, duration, and aggregation time period specifications follow EDSS/Models-3 date and time conventions.

Note that the set of aggregations which can be performed by one execution of M3TPROC is quite complex, being dependent upon the variables and other structures in the file being analyzed, as well as the aggregation specifications. If you want to run this program in batch mode (i.e., from a script), the recommended way to develop the script is to run the program once interactively while noting the pattern of responses to prompts which generate the particular analysis you want. The pattern of responses then becomes either a command-input file which is redirected into the program's execution by the script, or becomes a "here-document" fed into the execution. The following is an excerpt of a script which computes daily 4 AM - 4 PM OZONE averages in /tmp/myfile.A, using the here-document approach:

    ...
    setenv FOO  /tmp/hourfile.A         !  input file
    setenv BAR  /tmp/maxfile.A          !  output file
    setenv M3TPROC_ALLV F               !  all variables:  false
    setenv M3TPROC_TYPE         2       !  agg type:  AVERAGE
    m3tproc  FOO BAR <<  !DONE
    OZONE                               !  variable to be aggregated
                                        !  do not rename OZONE
!DONE
    ...

Source code for program m3tshiftis available under the GNU GPL License, Version 2, and can be downloaded here from CMAS or here from GitHub.


Previous: M3TOTXT

Next: M3TSHIFT

Up: Related Programs

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