Ploting Routines
tiegcmpy provides a range of functions for data visualization. Below are the key plotting routines along with their detailed parameters and usage examples.
API
Loading Datasets
This function loads the netCDF datasets for the plotting routines.
- tiegcmpy.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 in string.
- Return type:
list[tuple]
Latitude vs Longitude Contour Plots
This function generates a contour plot of a variable against latitude and longitude.
- tiegcmpy.plot_gen.plt_lat_lon(datasets, variable_name, time=None, mtime=None, level=None, variable_unit=None, contour_intervals=None, contour_value=None, symmetric_interval=False, cmap_color=None, line_color='white', coastlines=False, nightshade=False, gm_equator=False, latitude_minimum=None, latitude_maximum=None, longitude_minimum=None, longitude_maximum=None)[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.
contour_intervals (int, optional) – The number of contour intervals. Defaults to 20.
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.
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.
- Returns:
Contour plot.
- Return type:
matplotlib.figure.Figure
- Example:
Load datasets and generate a Latitude vs Longitude contour plot.
datasets = ty.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 = ty.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.
- tiegcmpy.plot_gen.plt_lev_var(datasets, variable_name, latitude, time=None, mtime=None, longitude=None, variable_unit=None, level_minimum=None, level_maximum=None)[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.
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.
- Returns:
Line plot.
- Return type:
matplotlib.figure.Figure
- Example:
Load datasets and generate a Pressure Level vs Variable Line plot.
datasets = ty.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 = ty.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.
- tiegcmpy.plot_gen.plt_lev_lon(datasets, variable_name, latitude, time=None, mtime=None, variable_unit=None, contour_intervals=20, contour_value=None, symmetric_interval=False, cmap_color=None, line_color='white', level_minimum=None, level_maximum=None, longitude_minimum=None, longitude_maximum=None)[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.
variable_unit (str, optional) – The desired unit of the variable.
contour_intervals (int, optional) – The number of contour intervals. Defaults to 20.
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.
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.
- Returns:
Contour plot.
- Return type:
matplotlib.figure.Figure
- Example:
datasets = ty.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 = ty.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.
- tiegcmpy.plot_gen.plt_lev_lat(datasets, variable_name, time=None, mtime=None, longitude=None, variable_unit=None, contour_intervals=20, contour_value=None, symmetric_interval=False, cmap_color=None, line_color='white', level_minimum=None, level_maximum=None, latitude_minimum=None, latitude_maximum=None)[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.
variable_unit (str, optional) – The desired unit of the variable.
contour_intervals (int, optional) – The number of contour intervals. Defaults to 20.
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.
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.
- Returns:
Contour plot.
- Return type:
matplotlib.figure.Figure
- Example:
Load datasets and generate a Pressure Level vs Latitude contour plot.
datasets = ty.load_datasets(directory, dataset_filter) variable_name = 'TN' longitude_value = 45.0 time_value = '2022-01-01T12:00:00' unit_of_variable = 'K' plot = ty.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.
- tiegcmpy.plot_gen.plt_lev_time(datasets, variable_name, latitude, longitude=None, variable_unit=None, contour_intervals=10, contour_value=None, symmetric_interval=False, cmap_color=None, line_color='white', level_minimum=None, level_maximum=None, mtime_minimum=None, mtime_maximum=None)[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.
variable_unit (str, optional) – The desired unit of the variable.
contour_intervals (int, optional) – The number of contour intervals. Defaults to 10.
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.
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.
- Returns:
Contour plot.
- Return type:
matplotlib.figure.Figure
- Example:
Load datasets and generate a Pressure Level vs Time contour plot.
datasets = ty.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 = ty.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.
- tiegcmpy.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, line_color='white', latitude_minimum=None, latitude_maximum=None, mtime_minimum=None, mtime_maximum=None)[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.
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.
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.
- Returns:
Contour plot.
- Return type:
matplotlib.figure.Figure
- Example:
Load datasets and generate a Latitude vs Time contour plot.
datasets = ty.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 = ty.plt_lat_time(datasets, variable_name, level=pressure_level, time_minimum=time_min, time_maximum=time_max, variable_unit=unit_of_variable)
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.