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/mpas_patches.py', 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 googlegroups.com".

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

These fields are part of the standard model history output.

mpas-a_plevel_hgt_temp.ncl
mpas-a_plevel_vorticity.ncl
mpas-a_plevel_wind_speed.ncl
mpas-a_plevel_w.ncl

Other standard plots

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

mpas-a_precipitable_water.ncl
mpas-a_olr.ncl

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.
mpas_to_latlon.ncl

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