Program MPASTOM3

Usage

setenv  LLFILE    <path name for input gridded I/O API Lat-Lon file>
setenv  MPFILE    <path name for MPAS-format-netCDF input file>
setenv  OUTFILE   <path name for output gridded I/O API file>
mpastom3  <and respond to the prompts>
where LLFILE is the logical name of a gridded I/O API Lat-Lon file (e.g., GRID_CRO_2D), MPFILE is the logical name of an MPAS-format-netCDF input file with the variables to be interpolated, and OUTFILE is the logical name of the output gridded I/O API file.

Summary

The MPASTOM3 program interpolates sets of REAL or INTEGER variables from an MPAS-format-netCDF input file to a regular I/O API grid using barycentric-linear interpolation, and writes the results to a gridded I/O API file. All the variables for a particular run must have the same dimensionality (either layered or non-layered, either time-stepped or time independent, and with horizontal dimension MODMPASFIO/MPCELLS). See routine MPINTERP() in module MODMPASFIO.

REAL variables are interpolated using barycentric-linear nterpolation on the dual-cell (triangle whose corners are MPAS-cell centers) that contains the requested point(s). See https://codeplea.com/triangular-interpolation for a reference on the interpolation formulas.
INTEGER variables use the "incidence matrix" approach: if grid-cells (C,R) are in MPAS-cells K(C,R), then the gridded output for MPAS-variable IZ(:) is IZ(K(C,R)).

Note that use of this program to convert data to a Lat-Lon based output grid is an important intermediate step in the use of KML to display MPAS data on the web, etc. Also its interpolation of MPAS files to "regular" I/O API GRIDDED files makes it useful with various "brittle" hard-coded-to-meteorology analysis-and-visualization programs that do not accept, e.g., MPAS based emissions or ocean files.

The program will prompt you for the list of variable-names, their units, and descriptions, and (as appropriate) for the starting and ending date&time for the processing period.

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 processed and variables selected). 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.

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

Copyright © 2017 UNC Institute for the Environment, and 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: MPASSTAT

Next: MPASWTEST

Up: Related Programs

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