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.

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.

gcmprocpy.io.load_datasets(directory, dataset_filter=None)[source]

Loads netCDF datasets for the plotting routines.

Parameters:
  • directory (str) – The location of the directory where the files are stored or the path to a single file.

  • dataset_filter (str, optional) – The string to filter the NetCDF files to select from (e.g., ‘prim’, ‘sech’). Defaults to None.

Returns:

A list containing tuples, each with an xarray.Dataset object and the corresponding filename and model in string.

Return type:

list[tuple]

Closing Datasets

This function closes the netCDF datasets.

Warning

This function should be called after the plotting routines have been executed.

gcmprocpy.io.close_datasets(datasets)[source]

Closes the xarray datasets.

Parameters:

datasets (list[tuple]) – A list containing tuples, each with an xarray.Dataset object and the corresponding filename and model in string.

Returns:

None

Latitude vs Longitude Contour Plots

This function generates a contour plot of a variable against latitude and longitude.

gcmprocpy.plot_gen.plt_lat_lon(datasets, variable_name, time=None, mtime=None, level=None, variable_unit=None, center_longitude=0, contour_intervals=None, contour_value=None, symmetric_interval=False, cmap_color=None, cmap_lim_min=None, cmap_lim_max=None, line_color='white', coastlines=False, nightshade=False, gm_equator=False, latitude_minimum=None, latitude_maximum=None, longitude_minimum=None, longitude_maximum=None, clean_plot=False, verbose=False)[source]

Generates a Latitude vs Longitude contour plot for a variable.

Parameters:
  • datasets (xarray.Dataset) – The loaded dataset/s using xarray.

  • variable_name (str) – The name of the variable with latitude, longitude, and lev/ilev dimensions.

  • time (np.datetime64, optional) – The selected time, e.g., ‘2022-01-01T12:00:00’.

  • mtime (list[int], optional) – The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.

  • level (float, optional) – The selected lev/ilev value.

  • variable_unit (str, optional) – The desired unit of the variable.

  • center_longitude (float, optional) – The central longitude for the plot. Defaults to 0.

  • contour_intervals (int, optional) – The number of contour intervals. Defaults to 20. Ignored if contour_value is provided.

  • contour_value (int, optional) – The value between each contour interval.

  • symmetric_interval (bool, optional) – If True, the contour intervals will be symmetric around zero. Defaults to False.

  • cmap_color (str, optional) – The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.

  • cmap_lim_min (float, optional) – Minimum limit for the color map. Defaults to the minimum value of the variable.

  • cmap_lim_max (float, optional) – Maximum limit for the color map. Defaults to the maximum value of the variable.

  • line_color (str, optional) – The color for all lines in the plot. Defaults to ‘white’.

  • coastlines (bool, optional) – Shows coastlines on the plot. Defaults to False.

  • nightshade (bool, optional) – Shows nightshade on the plot. Defaults to False.

  • gm_equator (bool, optional) – Shows geomagnetic equator on the plot. Defaults to False.

  • latitude_minimum (float, optional) – Minimum latitude to slice plots. Defaults to -87.5.

  • latitude_maximum (float, optional) – Maximum latitude to slice plots. Defaults to 87.5.

  • longitude_minimum (float, optional) – Minimum longitude to slice plots. Defaults to -180.

  • longitude_maximum (float, optional) – Maximum longitude to slice plots. Defaults to 175.

  • clean_plot (bool, optional) – A flag indicating whether to display the subtext. Defaults to False.

  • verbose (bool, optional) – A flag indicating whether to print execution data. Defaults to False.

Returns:

Contour plot.

Return type:

matplotlib.figure.Figure

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)

Pressure Level vs Variable Line Plot

This function generates a line plot of a variable at a specific latitude and optional longitude, time, and local time.

gcmprocpy.plot_gen.plt_lev_var(datasets, variable_name, latitude, time=None, mtime=None, longitude=None, log_level=True, variable_unit=None, level_minimum=None, level_maximum=None, clean_plot=False, verbose=False)[source]

Generates a Level vs Variable line plot for a given latitude.

Parameters:
  • datasets (xarray.Dataset) – The loaded dataset/s using xarray.

  • variable_name (str) – The name of the variable with latitude, longitude, and lev/ilev dimensions.

  • latitude (float) – The specific latitude value for the plot.

  • time (np.datetime64, optional) – The selected time, e.g., ‘2022-01-01T12:00:00’.

  • mtime (list[int], optional) – The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.

  • longitude (float, optional) – The specific longitude value for the plot.

  • log_level (bool) – A flag indicating whether to display level in log values. Default is True.

  • variable_unit (str, optional) – The desired unit of the variable.

  • level_minimum (float, optional) – Minimum level value for the plot. Defaults to None.

  • level_maximum (float, optional) – Maximum level value for the plot. Defaults to None.

  • clean_plot (bool, optional) – A flag indicating whether to display the subtext. Defaults to False.

  • verbose (bool, optional) – A flag indicating whether to print execution data. Defaults to False.

Returns:

Line plot.

Return type:

matplotlib.figure.Figure

Example:

Load datasets and generate a Pressure Level 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)

# Extracting the details for “Pressure level vs Longitude Contour Plot” and “Pressure Level vs Latitude Contour Plot” # from the README.md to create corresponding sections in functionality.rst

Pressure level 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.

gcmprocpy.plot_gen.plt_lev_lon(datasets, variable_name, latitude, time=None, mtime=None, log_level=True, variable_unit=None, contour_intervals=20, contour_value=None, symmetric_interval=False, cmap_color=None, cmap_lim_min=None, cmap_lim_max=None, line_color='white', level_minimum=None, level_maximum=None, longitude_minimum=None, longitude_maximum=None, clean_plot=False, verbose=False)[source]

Generates a Level vs Longitude contour plot for a given latitude.

Parameters:
  • datasets (xarray.Dataset) – The loaded dataset/s using xarray.

  • variable_name (str) – The name of the variable with latitude, longitude, and lev/ilev dimensions.

  • latitude (float) – The specific latitude value for the plot.

  • time (np.datetime64, optional) – The selected time, e.g., ‘2022-01-01T12:00:00’.

  • mtime (list[int], optional) – The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.

  • log_level (bool) – A flag indicating whether to display level in log values. Default is True.

  • variable_unit (str, optional) – The desired unit of the variable.

  • contour_intervals (int, optional) – The number of contour intervals. Defaults to 20. Ignored if contour_value is provided.

  • contour_value (int, optional) – The value between each contour interval.

  • symmetric_interval (bool, optional) – If True, the contour intervals will be symmetric around zero. Defaults to False.

  • cmap_color (str, optional) – The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.

  • cmap_lim_min (float, optional) – Minimum limit for the color map. Defaults to the minimum value of the variable.

  • cmap_lim_max (float, optional) – Maximum limit for the color map. Defaults to the maximum value of the variable.

  • line_color (str, optional) – The color for all lines in the plot. Defaults to ‘white’.

  • level_minimum (float, optional) – Minimum level value for the plot. Defaults to None.

  • level_maximum (float, optional) – Maximum level value for the plot. Defaults to None.

  • longitude_minimum (float, optional) – Minimum longitude value for the plot. Defaults to -180.

  • longitude_maximum (float, optional) – Maximum longitude value for the plot. Defaults to 175.

  • clean_plot (bool, optional) – A flag indicating whether to display the subtext. Defaults to False.

  • verbose (bool, optional) – A flag indicating whether to print execution data. Defaults to False.

Returns:

Contour plot.

Return type:

matplotlib.figure.Figure

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)

Pressure Level vs Latitude Contour Plot

This function generates a contour plot of a variable against pressure level and latitude.

gcmprocpy.plot_gen.plt_lev_lat(datasets, variable_name, time=None, mtime=None, longitude=None, log_level=True, variable_unit=None, contour_intervals=20, contour_value=None, symmetric_interval=False, cmap_color=None, cmap_lim_min=None, cmap_lim_max=None, line_color='white', level_minimum=None, level_maximum=None, latitude_minimum=None, latitude_maximum=None, clean_plot=False, verbose=False)[source]

Generates a Level vs Latitude contour plot for a specified time and/or longitude.

Parameters:
  • datasets (xarray.Dataset) – The loaded dataset/s using xarray.

  • variable_name (str) – The name of the variable with latitude, longitude, and lev/ilev dimensions.

  • time (np.datetime64, optional) – The selected time, e.g., ‘2022-01-01T12:00:00’.

  • mtime (list[int], optional) – The selected time as a list, e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.

  • longitude (float, optional) – The specific longitude value for the plot.

  • log_level (bool) – A flag indicating whether to display level in log values. Default is True.

  • variable_unit (str, optional) – The desired unit of the variable.

  • contour_intervals (int, optional) – The number of contour intervals. Defaults to 20. Ignored if contour_value is provided.

  • contour_value (int, optional) – The value between each contour interval.

  • symmetric_interval (bool, optional) – If True, the contour intervals will be symmetric around zero. Defaults to False.

  • cmap_color (str, optional) – The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.

  • cmap_lim_min (float, optional) – Minimum limit for the color map. Defaults to the minimum value of the variable.

  • cmap_lim_max (float, optional) – Maximum limit for the color map. Defaults to the maximum value of the variable.

  • line_color (str, optional) – The color for all lines in the plot. Defaults to ‘white’.

  • level_minimum (float, optional) – Minimum level value for the plot. Defaults to None.

  • level_maximum (float, optional) – Maximum level value for the plot. Defaults to None.

  • latitude_minimum (float, optional) – Minimum latitude value for the plot. Defaults to -87.5.

  • latitude_maximum (float, optional) – Maximum latitude value for the plot. Defaults to 87.5.

  • clean_plot (bool, optional) – A flag indicating whether to display the subtext. Defaults to False.

  • verbose (bool, optional) – A flag indicating whether to print execution data. Defaults to False.

Returns:

Contour plot.

Return type:

matplotlib.figure.Figure

Example:

Load datasets and generate a Pressure Level 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)

Pressure Level vs Time Contour Plot

This function creates a contour plot of a variable against pressure level and time.

gcmprocpy.plot_gen.plt_lev_time(datasets, variable_name, latitude, longitude=None, log_level=True, variable_unit=None, contour_intervals=10, contour_value=None, symmetric_interval=False, cmap_color=None, cmap_lim_min=None, cmap_lim_max=None, line_color='white', level_minimum=None, level_maximum=None, mtime_minimum=None, mtime_maximum=None, clean_plot=False, verbose=False)[source]

Generates a Level vs Time contour plot for a specified latitude and/or longitude.

Parameters:
  • datasets (xarray.Dataset) – The loaded dataset/s using xarray.

  • variable_name (str) – The name of the variable with latitude, longitude, time, and ilev dimensions.

  • latitude (float) – The specific latitude value for the plot.

  • longitude (float, optional) – The specific longitude value for the plot.

  • log_level (bool) – A flag indicating whether to display level in log values. Default is True.

  • variable_unit (str, optional) – The desired unit of the variable.

  • contour_intervals (int, optional) – The number of contour intervals. Defaults to 10. Ignored if contour_value is provided.

  • contour_value (int, optional) – The value between each contour interval.

  • symmetric_interval (bool, optional) – If True, the contour intervals will be symmetric around zero. Defaults to False.

  • cmap_color (str, optional) – The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.

  • cmap_lim_min (float, optional) – Minimum limit for the color map. Defaults to the minimum value of the variable.

  • cmap_lim_max (float, optional) – Maximum limit for the color map. Defaults to the maximum value of the variable.

  • line_color (str, optional) – The color for all lines in the plot. Defaults to ‘white’.

  • level_minimum (float, optional) – Minimum level value for the plot. Defaults to None.

  • level_maximum (float, optional) – Maximum level value for the plot. Defaults to None.

  • mtime_minimum (float, optional) – Minimum time value for the plot. Defaults to None.

  • mtime_maximum (float, optional) – Maximum time value for the plot. Defaults to None.

  • clean_plot (bool, optional) – A flag indicating whether to display the subtext. Defaults to False.

  • verbose (bool, optional) – A flag indicating whether to print execution data. Defaults to False.

Returns:

Contour plot.

Return type:

matplotlib.figure.Figure

Example:

Load datasets and generate a Pressure Level 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.

gcmprocpy.plot_gen.plt_lat_time(datasets, variable_name, level=None, longitude=None, variable_unit=None, contour_intervals=10, contour_value=None, symmetric_interval=False, cmap_color=None, cmap_lim_min=None, cmap_lim_max=None, line_color='white', latitude_minimum=None, latitude_maximum=None, mtime_minimum=None, mtime_maximum=None, clean_plot=False, verbose=False)[source]

Generates a Latitude vs Time contour plot for a specified level and/or longitude.

Parameters:
  • datasets (xarray.Dataset) – The loaded dataset/s using xarray.

  • variable_name (str) – The name of the variable with latitude, longitude, time, and ilev dimensions.

  • level (float) – The specific level value for the plot.

  • longitude (float, optional) – The specific longitude value for the plot.

  • variable_unit (str, optional) – The desired unit of the variable.

  • contour_intervals (int, optional) – The number of contour intervals. Defaults to 10. Ignored if contour_value is provided.

  • contour_value (int, optional) – The value between each contour interval.

  • symmetric_interval (bool, optional) – If True, the contour intervals will be symmetric around zero. Defaults to False.

  • cmap_color (str, optional) – The color map of the contour. Defaults to ‘viridis’ for Density, ‘inferno’ for Temp, ‘bwr’ for Wind, ‘viridis’ for undefined.

  • cmap_lim_min (float, optional) – Minimum limit for the color map. Defaults to the minimum value of the variable.

  • cmap_lim_max (float, optional) – Maximum limit for the color map. Defaults to the maximum value of the variable.

  • line_color (str, optional) – The color for all lines in the plot. Defaults to ‘white’.

  • latitude_minimum (float, optional) – Minimum latitude value for the plot. Defaults to -87.5.

  • latitude_maximum (float, optional) – Maximum latitude value for the plot. Defaults to 87.5.

  • mtime_minimum (float, optional) – Minimum time value for the plot. Defaults to None.

  • mtime_maximum (float, optional) – Maximum time value for the plot. Defaults to None.

  • clean_plot (bool, optional) – A flag indicating whether to display the subtext. Defaults to False.

  • verbose (bool, optional) – A flag indicating whether to print execution data. Defaults to False.

Returns:

Contour plot.

Return type:

matplotlib.figure.Figure

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)

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]
-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.

Pressure Level 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]
-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

Pressure level 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]
-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.

Pressure Level vs Latitude Contour Plot

This command generates a contour plot of a variable against pressure level 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]
-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.

Pressure Level vs Time Contour Plot

This command creates a contour plot of a variable against pressure level 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]
-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.

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]
-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.