gcpy.examples.plotting.plot_single_panel
Global and Regional Single Panel Plots
This example script demonstrates the core single panel plotting capabilities of GCPy, including global and regional single level plots as well as global zonal mean plots.
The example data described here is in lat/lon format, but the same code works equally well for cubed-sphere (GCHP) data.
For full documentation on the plotting capabilities of GCPy (including full argument lists), please see the GCPy documentation at https://gcpy.readthedocs.io.
Command-line arguments
- -i <str>, --infile <str>
Path to a NetCDF file.
- -v <str>, --varname <str>
Variable name to plot.
- [-l <int>, --level <int>]
Level to plot (single-level plots only), starting at 0. Default:
0
Examples
Run plot comparisons for ozone from the GEOS-Chem SpeciesConc diagnostic output. Use the 500 hPa level (level 22, starting from 0) for the single-level plots.
$ conda activate gcpy_env
(gcpy_env) $ python -m gcpy.examples.plotting.plot_comparisons \
--infile GEOSChem.SpeciesConc.20190701_0000z.nc4 \
--varname SpeciesConcVV_O3 \
--level 22
Notes
If you are using GCPy from a Mac, set the environment variable:
export MPLBACKEND="MacOSX"
Otherwise set:
export MPLBACKEND="tkagg"
This will set the proper X11 backend (which is needed to open a plot window on the screen. There is some incompatibility with the Tck/Tk backend “tkagg” in MacOS X operating systems.
Functions
|
Parses command-line arguments and calls plot_single_panel. |
|
Example routine to create single panel plots. |