Ploting Routines
gcmprocpy provides a range of functions for data visualization. Below are the key plotting routines along with their detailed parameters and usage examples.
Note
For live examples with output, see the Plotting notebook.
Mode: API
Jupyter notebooks
gcmprocpy can be used in two modes in Jupyter notebooks: Regular plotting and Interactive plotting.
For regular plotting in Jupyter notebooks, use the following code snippet in an executable cell:
%matplotlib inline
Note
Use %config InlineBackend.figure_format = 'retina' for high quality plots.
For interactive plotting in Jupyter notebooks, use the following code snippet in an executable cell:
%matplotlib widget
Warning
The interactive plotting mode doesn’t work in Jupyter notebooks on NCAR JupyterHub.
Loading Datasets
This function loads the netCDF datasets for the plotting routines.
Closing Datasets
This function closes the netCDF datasets.
Warning
This function should be called after the plotting routines have been executed.
Saving Output
This function saves a plot to a file.
- Example:
Save a plot as a PNG file.
datasets = gy.load_datasets(directory, dataset_filter) plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0) gy.save_output('/output/path', 'my_plot', 'png', plot)
Latitude vs Longitude Contour Plots
This function generates a contour plot of a variable against latitude and longitude.
- Example:
Load datasets and generate a Latitude vs Longitude contour plot.
datasets = gy.load_datasets(directory, dataset_filter) variable_name = 'TN' value_of_mtime = [360, 0, 0, 0] pressure_level = 4.0 unit_of_variable = 'K' intervals = 20 plot = gy.plt_lat_lon(datasets, variable_name, mtime=value_of_mtime, level=pressure_level, variable_unit=unit_of_variable, contour_intervals=intervals)
- Height Mode:
Use
level_type='height'to specify the level as height in km instead of pressure.# Lat-lon plot at 300 km altitude (automatically finds nearest pressure level) plot = gy.plt_lat_lon(datasets, 'TN', time='2022-01-01T12:00:00', level=300.0, level_type='height')
- Polar Projections:
The
projectionparameter supports polar stereographic views in addition to the default Mercator projection.# North polar stereographic plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='north_polar') # South polar stereographic plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='south_polar') # Both hemispheres side by side plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='polar')
Polar perimeter labels are controlled by
polar_label:# Solar local time labels (default — the tgcmproc look) plot = gy.plt_lat_lon(datasets, 'TN', time='2003-03-20T00:00:00', level=4.0, projection='north_polar', polar_label='lt') # Geographic longitude labels plot = gy.plt_lat_lon(datasets, 'TN', time='2003-03-20T00:00:00', level=4.0, projection='north_polar', polar_label='lon') # Disable ring labels (fall back to inline gridline labels) plot = gy.plt_lat_lon(datasets, 'TN', time='2003-03-20T00:00:00', level=4.0, projection='north_polar', polar_label=None)
- Orthographic and Mollweide Projections:
# Orthographic (satellite view) with coastlines plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='orthographic', coastlines=True) # Mollweide (equal-area) with coastlines plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='mollweide', coastlines=True)
- Wind Vector Overlays:
Set
wind=Trueto overlay wind vectors. Variable names are automatically selected based on model type (TIE-GCM: UN/VN, WACCM-X: U/V).# Mercator with wind vectors plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, wind=True) # Orthographic with wind vectors and coastlines plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='orthographic', wind=True, wind_density=3, coastlines=True) # Customize wind arrow appearance plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, wind=True, wind_density=5, wind_color='red', wind_scale=500)
- Coastlines:
Add coastline outlines to any projection.
# Mercator with coastlines plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, coastlines=True) # Polar with coastlines plot = gy.plt_lat_lon(datasets, 'TN', mtime=[360, 0, 0, 0], level=4.0, projection='polar', coastlines=True)
Pressure Level / Height vs Variable Line Plot
This function generates a line plot of a variable at a specific latitude and optional longitude, time, and local time.
- Example:
Load datasets and generate a Pressure Level / Height vs Variable Line plot.
datasets = gy.load_datasets(directory, dataset_filter) variable_name = 'TN' latitude = 30.0 time_value = '2022-01-01T12:00:00' longitude_value = 45.0 unit_of_variable = 'K' plot = gy.plt_lev_var(datasets, variable_name, latitude, time=time_value, longitude=longitude_value, variable_unit=unit_of_variable)
Variable vs Latitude Line Plot (Meridional)
This function generates a 1D meridional line plot of a variable along latitude at a fixed longitude and pressure level (or height). Pass longitude='mean' for a zonal-mean profile.
- Example:
datasets = gy.load_datasets(directory, dataset_filter) plot = gy.plt_var_lat(datasets, 'TN', level=4.0, time='2022-01-01T12:00:00', longitude=45.0) # Zonal mean plot = gy.plt_var_lat(datasets, 'TN', level=4.0, time='2022-01-01T12:00:00', longitude='mean')
Variable vs Longitude Line Plot (Zonal)
This function generates a 1D zonal line plot of a variable along longitude at a fixed latitude and pressure level (or height). Pass latitude='mean' for a meridional-mean profile.
- Example:
datasets = gy.load_datasets(directory, dataset_filter) plot = gy.plt_var_lon(datasets, 'TN', level=4.0, time='2022-01-01T12:00:00', latitude=30.0)
Pressure Level / Height vs Longitude Contour Plot
This function generates a contour plot of a variable at a specific latitude against longitude, with optional time and local time.
- Example:
datasets = gy.load_datasets(directory, dataset_filter) variable_name = 'TN' latitude = 30.0 time_value = '2022-01-01T12:00:00' unit_of_variable = 'K' contour_intervals = 20 plot = gy.plt_lev_lon(datasets, variable_name, latitude, time=time_value, variable_unit=unit_of_variable, contour_intervals=contour_intervals)
Overlay (U, W) wind vectors on the cross-section:
plot = gy.plt_lev_lon(datasets, 'TN', latitude=2.5, time='2003-03-20T00:00:00', wind=True, wind_density=3)
Pressure Level / Height vs Latitude Contour Plot
This function generates a contour plot of a variable against pressure level / height and latitude.
- Example:
Load datasets and generate a Pressure Level / Height vs Latitude contour plot.
datasets = gy.load_datasets(directory, dataset_filter) variable_name = 'TN' longitude_value = 45.0 time_value = '2022-01-01T12:00:00' unit_of_variable = 'K' plot = gy.plt_lev_lat(datasets, variable_name, longitude=longitude_value, time=time_value, variable_unit=unit_of_variable)
Overlay (V, W) wind vectors on the meridional cross-section:
plot = gy.plt_lev_lat(datasets, 'TN', longitude=30.0, time='2003-03-20T00:00:00', wind=True, wind_density=3)
Or overlay Eliassen-Palm flux vectors (EPVY, EPVZ) instead — useful for diagnosing planetary-wave forcing of the zonal mean flow:
plot = gy.plt_lev_lat(datasets, 'TN', longitude='mean', time='2003-03-20T00:00:00', epflux=True, wind_density=3)
Pressure Level / Height vs Time Contour Plot
This function creates a contour plot of a variable against pressure level / height and time.
- Example:
Load datasets and generate a Pressure Level / Height vs Time contour plot.
datasets = gy.load_datasets(directory, dataset_filter) variable_name = 'TN' latitude_value = 30.0 time_min = '2022-01-01T00:00:00' time_max = '2022-01-02T00:00:00' unit_of_variable = 'K' plot = gy.plt_lev_time(datasets, variable_name, latitude=latitude_value, time_minimum=time_min, time_maximum=time_max, variable_unit=unit_of_variable)
Latitude vs Time Contour Plot
This function creates a contour plot of a variable against latitude and time.
- Example:
Load datasets and generate a Latitude vs Time contour plot.
datasets = gy.load_datasets(directory, dataset_filter) variable_name = 'TN' pressure_level = 4.0 time_min = '2022-01-01T00:00:00' time_max = '2022-01-02T00:00:00' unit_of_variable = 'K' plot = gy.plt_lat_time(datasets, variable_name, level=pressure_level, time_minimum=time_min, time_maximum=time_max, variable_unit=unit_of_variable)
Longitude vs Time Contour Plot
This function creates a contour plot of a variable against longitude and time.
- Example:
Load datasets and generate a Longitude vs Time contour plot.
datasets = gy.load_datasets(directory, dataset_filter) plot = gy.plt_lon_time(datasets, 'TN', latitude=0.0, level=4.0)
Variable vs Time Line Plot
This function creates a line plot of a variable against time at a specific latitude, longitude, and optional level.
- Example:
Load datasets and generate a Variable vs Time line plot.
datasets = gy.load_datasets(directory, dataset_filter) plot = gy.plt_var_time(datasets, 'TN', latitude=0.0, longitude=45.0, level=4.0)
Satellite Track Interpolation Plot
This function interpolates model data along a satellite trajectory and plots the result. With a level specified, it produces a 1D line plot along the track. Without a level, it produces a 2D contour plot of all levels vs along-track points.
- Example:
Interpolate and plot model temperature along a simulated satellite pass.
import numpy as np datasets = gy.load_datasets(directory, dataset_filter) times = gy.time_list(datasets) # Satellite trajectory: arrays of time, lat, lon (one entry per point) sat_time = np.array([times[0] + np.timedelta64(i * 6, 'm') for i in range(20)]) sat_lat = np.linspace(-60, 60, 20) sat_lon = np.linspace(-120, 120, 20) # Line plot at a fixed level plot = gy.plt_sat_track(datasets, 'TN', sat_time, sat_lat, sat_lon, level=5.0) # Contour plot across all levels plot = gy.plt_sat_track(datasets, 'TN', sat_time, sat_lat, sat_lon)
Mode: CLI
Latitude vs Longitude Contour Plots
This command generates a contour plot of a variable against latitude and longitude.
lat_lon
Parser for loading, plotting, and saving
usage: lat_lon [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME
[-o_format OUTPUT_FORMAT] -var VARIABLE_NAME [-t TIME]
[-mt MTIME [MTIME ...]] [-lvl LEVEL] [-unit VARIABLE_UNIT]
[-ci CONTOUR_INTERVALS] [-cv CONTOUR_VALUE] [-si]
[-cmc CMAP_COLOR] [-lc LINE_COLOR] [-cst] [-nsh] [-gm]
[-lat_min LATITUDE_MINIMUM] [-lat_max LATITUDE_MAXIMUM]
[-lon_min LONGITUDE_MINIMUM] [-lon_max LONGITUDE_MAXIMUM]
[-proj PROJECTION] [-clon CENTER_LONGITUDE]
[-clat CENTRAL_LATITUDE] [-wind] [-wd WIND_DENSITY]
[-ws WIND_SCALE] [-wc WIND_COLOR] [-lt {pressure,height}]
[-clean]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable with latitude, longitude, and lev/ilev dimensions.
- -t <time>, --time <time>
The selected time, e.g., “2022-01-01T12:00:00”.
- -mt <mtime>, --mtime <mtime>
The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.
- -lvl <level>, --level <level>
The selected lev/ilev value.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 20.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, the contour intervals will be symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour. Defaults to “viridis” for Density, “inferno” for Temp, “bwr” for Wind, “viridis” for undefined.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to “white”.
- -cst, --coastlines
Shows coastlines on the plot. Defaults to False.
- -nsh, --nightshade
Shows nightshade on the plot. Defaults to False.
- -gm, --gm_equator
Shows geomagnetic equator on the plot. Defaults to False.
- -lat_min <latitude_minimum>, --latitude_minimum <latitude_minimum>
Minimum latitude to slice plots. Defaults to -87.5.
- -lat_max <latitude_maximum>, --latitude_maximum <latitude_maximum>
Maximum latitude to slice plots. Defaults to 87.5.
- -lon_min <longitude_minimum>, --longitude_minimum <longitude_minimum>
Minimum longitude to slice plots. Defaults to -180.
- -lon_max <longitude_maximum>, --longitude_maximum <longitude_maximum>
Maximum longitude to slice plots. Defaults to 175.
- -proj <projection>, --projection <projection>
Map projection: mercator, orthographic, mollweide, north_polar, south_polar, polar. Defaults to mercator.
- -clon <center_longitude>, --center_longitude <center_longitude>
Center longitude for orthographic/mollweide projections. Defaults to 0.
- -clat <central_latitude>, --central_latitude <central_latitude>
Central latitude for orthographic projection. Defaults to 0.
- -wind, --wind
Overlay wind vectors on the plot. Defaults to False.
- -wd <wind_density>, --wind_density <wind_density>
Density of wind vectors (stride). Defaults to 15.
- -ws <wind_scale>, --wind_scale <wind_scale>
Scale factor for wind arrows. Defaults to None (auto).
- -wc <wind_color>, --wind_color <wind_color>
Color of wind arrows. Defaults to black.
- -lt {pressure,height}, --level_type {pressure,height}
Whether level is specified as pressure or height (km). Defaults to pressure.
- -clean, --clean_plot
Generate a clean plot without title/colorbar. Defaults to False.
Pressure Level / Height vs Variable Line Plot
This command generates a line plot of a variable at a specific latitude and optional longitude, time, and local time.
lev_var
Parser for loading, plotting, and saving
usage: lev_var [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME -o_format
OUTPUT_FORMAT [-var VARIABLE_NAME] [-lat LATITUDE] [-t TIME]
[-mt MTIME MTIME MTIME] [-lon LONGITUDE] [-unit VARIABLE_UNIT]
[-lvl_min LEVEL_MINIMUM] [-lvl_max LEVEL_MAXIMUM]
[-ya {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable with latitude, longitude, and lev/ilev dimensions
- -lat <latitude>, --latitude <latitude>
The specific latitude value for the plot
- -t <time>, --time <time>
The selected time, e.g., “2022-01-01T12:00:00”
- -mt <mtime>, --mtime <mtime>
The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins
- -lon <longitude>, --longitude <longitude>
The specific longitude value for the plot
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable
- -lvl_min <level_minimum>, --level_minimum <level_minimum>
Minimum level value for the plot
- -lvl_max <level_maximum>, --level_maximum <level_maximum>
Maximum level value for the plot
- -ya {pressure,height}, --y_axis {pressure,height}
Y-axis type: pressure or height (km). Defaults to pressure.
Pressure Level / Height vs Longitude Contour Plot
This command generates a contour plot of a variable at a specific latitude against longitude, with optional time and local time.
lev_lon
Parser for loading, plotting, and saving
usage: lev_lon [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME -o_format
OUTPUT_FORMAT [-var VARIABLE_NAME] [-lat LATITUDE] [-t TIME]
[-mt MTIME MTIME MTIME] [-unit VARIABLE_UNIT]
[-ci CONTOUR_INTERVALS] [-cv CONTOUR_VALUE] [-si]
[-cmc CMAP_COLOR] [-lc LINE_COLOR] [-lvl_min LEVEL_MINIMUM]
[-lvl_max LEVEL_MAXIMUM] [-lon_min LONGITUDE_MINIMUM]
[-lon_max LONGITUDE_MAXIMUM] [-ya {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable with latitude, longitude, and lev/ilev dimensions.
- -lat <latitude>, --latitude <latitude>
The specific latitude value for the plot.
- -t <time>, --time <time>
The selected time, e.g., ‘2022-01-01T12:00:00’.
- -mt <mtime>, --mtime <mtime>
The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 20.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, the contour intervals will be symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to ‘white’.
- -lvl_min <level_minimum>, --level_minimum <level_minimum>
Minimum level value for the plot. Defaults to None.
- -lvl_max <level_maximum>, --level_maximum <level_maximum>
Maximum level value for the plot. Defaults to None.
- -lon_min <longitude_minimum>, --longitude_minimum <longitude_minimum>
Minimum longitude value for the plot. Defaults to -180.
- -lon_max <longitude_maximum>, --longitude_maximum <longitude_maximum>
Maximum longitude value for the plot. Defaults to 175.
- -ya {pressure,height}, --y_axis {pressure,height}
Y-axis type: pressure or height (km). Defaults to pressure.
Pressure Level / Height vs Latitude Contour Plot
This command generates a contour plot of a variable against pressure level / height and latitude.
lev_lat
Parser for loading, plotting, and saving
usage: lev_lat [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME -o_format
OUTPUT_FORMAT [-var VARIABLE_NAME] [-t TIME]
[-mt MTIME MTIME MTIME] [-lon LONGITUDE] [-unit VARIABLE_UNIT]
[-ci CONTOUR_INTERVALS] [-cv CONTOUR_VALUE] [-si]
[-cmc CMAP_COLOR] [-lc LINE_COLOR] [-lvl_min LEVEL_MINIMUM]
[-lvl_max LEVEL_MAXIMUM] [-lat_min LATITUDE_MINIMUM]
[-lat_max LATITUDE_MAXIMUM] [-ya {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable with latitude, longitude, and lev/ilev dimensions.
- -t <time>, --time <time>
The selected time, e.g., ‘2022-01-01T12:00:00’.
- -mt <mtime>, --mtime <mtime>
The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.
- -lon <longitude>, --longitude <longitude>
The specific longitude value for the plot.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 20.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, the contour intervals will be symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to ‘white’.
- -lvl_min <level_minimum>, --level_minimum <level_minimum>
Minimum level value for the plot. Defaults to None.
- -lvl_max <level_maximum>, --level_maximum <level_maximum>
Maximum level value for the plot. Defaults to None.
- -lat_min <latitude_minimum>, --latitude_minimum <latitude_minimum>
Minimum latitude value for the plot. Defaults to -87.5.
- -lat_max <latitude_maximum>, --latitude_maximum <latitude_maximum>
Maximum latitude value for the plot. Defaults to 87.5.
- -ya {pressure,height}, --y_axis {pressure,height}
Y-axis type: pressure or height (km). Defaults to pressure.
Pressure Level / Height vs Time Contour Plot
This command creates a contour plot of a variable against pressure level / height and time.
lev_time
Parser for loading, plotting, and saving
usage: lev_time [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME -o_format
OUTPUT_FORMAT [-var VARIABLE_NAME] [-lat LATITUDE]
[-lon LONGITUDE] [-unit VARIABLE_UNIT] [-ci CONTOUR_INTERVALS]
[-cv CONTOUR_VALUE] [-si] [-cmc CMAP_COLOR] [-lc LINE_COLOR]
[-lvl_min LEVEL_MINIMUM] [-lvl_max LEVEL_MAXIMUM]
[--mtime_minimum MTIME_MINIMUM]
[--mtime_maximum MTIME_MAXIMUM] [-ya {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable with latitude, longitude, time, and ilev dimensions.
- -lat <latitude>, --latitude <latitude>
The specific latitude value for the plot.
- -lon <longitude>, --longitude <longitude>
The specific longitude value for the plot.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 10.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, the contour intervals will be symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to ‘white’.
- -lvl_min <level_minimum>, --level_minimum <level_minimum>
Minimum level value for the plot. Defaults to None.
- -lvl_max <level_maximum>, --level_maximum <level_maximum>
Maximum level value for the plot. Defaults to None.
- --mtime_minimum <mtime_minimum>
Minimum time value for the plot. Defaults to None.
- --mtime_maximum <mtime_maximum>
Maximum time value for the plot. Defaults to None.
- -ya {pressure,height}, --y_axis {pressure,height}
Y-axis type: pressure or height (km). Defaults to pressure.
Latitude vs Time Contour Plot
This command creates a contour plot of a variable against latitude and time.
lat_time
Parser for loading, plotting, and saving
usage: lat_time [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME -o_format
OUTPUT_FORMAT [-var VARIABLE_NAME] [-lvl LEVEL]
[-lon LONGITUDE] [-unit VARIABLE_UNIT] [-ci CONTOUR_INTERVALS]
[-cv CONTOUR_VALUE] [-si] [-cmc CMAP_COLOR] [-lc LINE_COLOR]
[-lat_min LATITUDE_MINIMUM] [-lat_max LATITUDE_MAXIMUM]
[--mtime_minimum MTIME_MINIMUM]
[--mtime_maximum MTIME_MAXIMUM] [-lt {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable with latitude, longitude, time, and ilev dimensions.
- -lvl <level>, --level <level>
The specific level value for the plot.
- -lon <longitude>, --longitude <longitude>
The specific longitude value for the plot.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 10.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, the contour intervals will be symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to ‘white’.
- -lat_min <latitude_minimum>, --latitude_minimum <latitude_minimum>
Minimum latitude value for the plot. Defaults to -87.5.
- -lat_max <latitude_maximum>, --latitude_maximum <latitude_maximum>
Maximum latitude value for the plot. Defaults to 87.5.
- --mtime_minimum <mtime_minimum>
Minimum time value for the plot. Defaults to None.
- --mtime_maximum <mtime_maximum>
Maximum time value for the plot. Defaults to None.
- -lt {pressure,height}, --level_type {pressure,height}
Whether level is specified as pressure or height (km). Defaults to pressure.
Longitude vs Time Contour Plot
This command creates a contour plot of a variable against longitude and time.
lon_time
Parser for loading, plotting, and saving
usage: lon_time [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME
[-o_format OUTPUT_FORMAT] -var VARIABLE_NAME -lat LATITUDE
[-lvl LEVEL] [-unit VARIABLE_UNIT] [-ci CONTOUR_INTERVALS]
[-cv CONTOUR_VALUE] [-si] [-cmc CMAP_COLOR] [-lc LINE_COLOR]
[-lon_min LONGITUDE_MINIMUM] [-lon_max LONGITUDE_MAXIMUM]
[--mtime_minimum MTIME_MINIMUM]
[--mtime_maximum MTIME_MAXIMUM] [-clean]
[-lt {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable to plot.
- -lat <latitude>, --latitude <latitude>
The specific latitude value for the plot.
- -lvl <level>, --level <level>
The specific level value for the plot.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 10.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, contour intervals symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to white.
- -lon_min <longitude_minimum>, --longitude_minimum <longitude_minimum>
Minimum longitude value for the plot.
- -lon_max <longitude_maximum>, --longitude_maximum <longitude_maximum>
Maximum longitude value for the plot.
- --mtime_minimum <mtime_minimum>
Minimum time value for the plot.
- --mtime_maximum <mtime_maximum>
Maximum time value for the plot.
- -clean, --clean_plot
Generate a clean plot without title/colorbar. Defaults to False.
- -lt {pressure,height}, --level_type {pressure,height}
Whether level is specified as pressure or height (km). Defaults to pressure.
Variable vs Time Line Plot
This command creates a line plot of a variable against time at a specific latitude, longitude, and optional level.
var_time
Parser for loading, plotting, and saving
usage: var_time [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME
[-o_format OUTPUT_FORMAT] -var VARIABLE_NAME -lat LATITUDE
-lon LONGITUDE [-lvl LEVEL] [-unit VARIABLE_UNIT]
[--mtime_minimum MTIME_MINIMUM]
[--mtime_maximum MTIME_MAXIMUM] [-clean]
[-lt {pressure,height}]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable to plot.
- -lat <latitude>, --latitude <latitude>
The specific latitude value for the plot.
- -lon <longitude>, --longitude <longitude>
The specific longitude value for the plot.
- -lvl <level>, --level <level>
The specific level value for the plot.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- --mtime_minimum <mtime_minimum>
Minimum time value for the plot.
- --mtime_maximum <mtime_maximum>
Maximum time value for the plot.
- -clean, --clean_plot
Generate a clean plot without title/colorbar. Defaults to False.
- -lt {pressure,height}, --level_type {pressure,height}
Whether level is specified as pressure or height (km). Defaults to pressure.
Satellite Track Interpolation Plot
This command interpolates model data along a satellite trajectory and plots the result. Requires a CSV file with columns: time, lat, lon.
sat_track
Parser for loading, plotting, and saving satellite track interpolation plots
usage: sat_track [-h] [-dir DIRECTORY] [-dsf DATASET_FILTER]
[-o_dir OUTPUT_DIRECTORY] -o_file FILENAME
[-o_format OUTPUT_FORMAT] -var VARIABLE_NAME -sat_file
SATELLITE_FILE [-lvl LEVEL] [-unit VARIABLE_UNIT]
[-ci CONTOUR_INTERVALS] [-cv CONTOUR_VALUE] [-si]
[-cmc CMAP_COLOR] [-lc LINE_COLOR] [-clean]
- -h, --help
show this help message and exit
- -dir <directory>, --directory <directory>
Path to the directory containing the datasets
- -dsf <dataset_filter>, --dataset_filter <dataset_filter>
Filter for the dataset file names
- -o_dir <output_directory>, --output_directory <output_directory>
Directory where the plot will be saved.
- -o_file <filename>, --filename <filename>
Filename for the saved plot.
- -o_format <output_format>, --output_format <output_format>
Format of the output plot, e.g., “png”, “pdf”.
- -var <variable_name>, --variable_name <variable_name>
The name of the variable to plot.
- -sat_file <satellite_file>, --satellite_file <satellite_file>
Path to CSV file with satellite track data (columns: time, lat, lon).
- -lvl <level>, --level <level>
The specific level value. If omitted, plots all levels as contour.
- -unit <variable_unit>, --variable_unit <variable_unit>
The desired unit of the variable.
- -ci <contour_intervals>, --contour_intervals <contour_intervals>
The number of contour intervals. Defaults to 10.
- -cv <contour_value>, --contour_value <contour_value>
The value between each contour interval.
- -si, --symmetric_interval
If True, contour intervals symmetric around zero. Defaults to False.
- -cmc <cmap_color>, --cmap_color <cmap_color>
The color map of the contour.
- -lc <line_color>, --line_color <line_color>
The color for all lines in the plot. Defaults to white.
- -clean, --clean_plot
Generate a clean plot without title/colorbar. Defaults to False.