Plotting scripts for
MPAS-A global simulations

Python Plotting

With NCAR's decision to end further development of NCL and move towards Python as the main language for scripting and visualisation a new GitHub repository has been created to host examples and tutorials on creating MPAS-A visualizations, which can be found at the link below:

MPAS Python Plotting

There, you can find examples visualization scripts and references to modules involved in Python visualization including the script 'mpas-patches/', which can help with the creation of plotting individual MPAS grid cells (instead of interpolating to a rectangular latitude and longitude grid).

NCL scripts

The NCAR Command Language (NCL) is an interpreted language that may be used for plotting fields in MPAS-Atmosphere's netCDF input and output files. Several example scripts are provided below as a starting point, and users new to NCL may consult the extensive NCL documentation for examples and complete documentation on all functions and resources.

MPAS-A users wishing to make their NCL scripts available for use by others are encouraged to contact the MPAS-Atmosphere developers directly via "mpas-atmosphere-help AT".

Plotting contours of approximate mesh resolution 

The default plot uses a cylindrical equidistant projection. Approximate resolution is computed based on the area of the smallest cell in the mesh and the mesh density function.


Standard pressure level plots (850, 500, 200 hPa). 

These fields are part of the standard model history output.


Other standard plots

This data is also part of the standard model history output.


Interpolating MPAS output to a latitude-longitude mesh

The unstructured horizontal mesh used by MPAS can often be problematic for some visualization tools to work with, and makes it more difficult to quickly check model input or output fields when trying to track down problems in the model. For these reasons, it can be helpful to interpolate MPAS fields from their native, unstructured mesh onto a regular, rectangular mesh such as a regular latitude-longitude grid.
The "mpas_to_latlon.ncl" script is generally run in two stages:
  1. In the first step, specify the resolution of the latitude-longitude grid to which the script will interpolate, and run the script to generate the remapping weights (i.e., interpolation weights) that will be used in the second step to actually interpolate from the MPAS mesh to the latitude-longitude grid.
  2. In the second step, after having generated remapping weights for a particular MPAS mesh and a particular resolution of latitude-longitude grid, set gen_weights = False and run the script to remap any cell-centered field of your choosing from the MPAS mesh to the latitude-longitude grid.

Generic NCL plotting scripts

Shown in the table below are example plots from each script; please click on the image to download the script.

Generic horizontal contour plot

Generic color-filled cell plot

Mesh plot against a map background

Generic vertical cross-section