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>whereLLFILE
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, andOUTFILE
is the logical name of the output gridded I/O API file.
TheSee Also:MPASTOM3
program interpolates sets ofREAL
orINTEGER
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 dimensionMODMPASFIO/MPCELLS
). See routineMPINTERP()
in moduleMODMPASFIO
.
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-cellsK(C,R)
, then the gridded output for MPAS-variableIZ(:)
isIZ(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.
MODULE
MODMPASFIO
with state-variables for MPAS
unstructured-grid description, utilities for computations
on those grids, and routines for input and output of data
in MPAS-format-netCDF files.
MODULE MODMPASFIO
.
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
To: Models-3/EDSS I/O API: The Help Pages