setenv  INFILE    <path name>
setenv  REPORT    <path name> or "LOG"
mpasstat  <and respond to the prompts>
where INFILE is the logical name of the input MPAS-format-netCDF file and REPORT is the logical name of the report file (to which the statistical comparisoon report is printed). If REPORT is LOG, then the statistics-report will be written to standard output (or the program log).


The MPASSTAT program computes statistics (mean, sigma, max and its location, min and its location) for a specified variable or layer-range of a 3-D variable, and writes the statistical result to the program-log or to a specified ASCII REPORT file.

Note that the program refers to the variables by number rather than by name. It will at least give you a numbered menu, in any case; however, you may also want to look at output of the following command to see in advance what the variables are:

ncdump -h ${INFILE}

The program will prompt you for the variable-name, and (as appropriate) for the starting and ending date&time for the report period, and for the layer range for the variable.

Note that the set of analyses which can be performed by one execution is quite complex and context-dependent (being determined by the file being analyzed). If you want to run this program in batch mode (from a script), 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 analysis 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 following is an excerpt of a script which does an analysis on layers 4-7 of 3-D time stepped variable-43 from /tmp/myfile.A, with statistics written to the program-log, the time period being the entire duration of the file, using the here-document approach for the scripting:

setenv INFILE   /tmp/myfile.A
setenv REPORT   LOG
mpasstat <<  !DONE
43              # use variable-43 from INFILEA
                # use default starting date for this variable
                # use default starting time for this variable
                # use default   ending date for this variable
                # use default   ending time for this variable
4               # use layer-4 as the starting layer for this variable
7               # use layer-4 as the   ending layer for this variable

Note also that one may analyze vertex- or edge-subscripted variables, or variables whose vertical dimension is different from nVertLevels or nVertLevelsP1 — e.g., nEmisLevels — unlike certain other unnecessarily-brittle A&V packages.

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

Copyright © 2017 Carlie J. Coats, Jr.

See Also:

Copyright © 2017 Carlie J. Coats, Jr., Ph.D.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
Previous: MPASDIFF


Up: Related Programs

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