tiegcmpy


Nametiegcmpy JSON
Version 1.2.7 PyPI version JSON
download
home_pagehttps://github.com/NCAR/tiegcm
SummaryA Python3 post processing tool for TIE-GCM
upload_time2024-04-23 17:19:05
maintainerNone
docs_urlNone
authorNikhil Rao
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TIEGCMPY

tiegcmpy is a tool used for TIE-GCM post processing and plot generation.

## Updated documentation on readthedocs
## https://tiegcm-docs.readthedocs.io/en/latest/


## Installation

```bash
pip install tiegcmpy
```

## Requrements 
- Python >= 3.8.0
- Python pip >= 23.2.1
  - cartopy >= 0.21.1
  - numpy >= 1.24.4
  - matplotlib >= 3.7.2
  - xarray >= 2023.1.0


## Usage

tiegcmpy can be run in two modes:

1) Mode: API

   For use in custom python scripts or juypter notebooks

2) Mode: Command Line Interface

   For a command line interface with arguments

   a) Single Plot

   Load database for generation of a single plot to a single file

   b) Multiple Plot

   Load database for generation of multiple plots to a single or multiple files


### Mode: API
#### Importing tiegcmpy
```python
import tiegcmpy as ty
```
#### Load datasets

a) Loading a single dataset
```python
ty.load_dataset(directory, dataset_filter)
```
b) Loading multiple datasets
```python
ty.load_datasets(directory, dataset_filter)
```
#### Plot generation
The following plots can be made:

a)Latitude vs Longitude plots: plt_lat_lon

b)Pressure level vs Variable Value plots: plt_lev_var

c)Pressure level vs Longitude pltos: plt_lev_lon

d)Pressure level vs Latitude plots: plt_lev_lat

e)Pressure level vs Time plots: plt_lev_time

f)Latitude vs Time plots: plt_lat_time

Example:
```python
ty.plt_lat_lon(datasets, variable_name, level, localtime)
```

Look at functionality section for list of all plot types with required and optional arguments.

### Mode: CLI (Command Line Interface)
#### Single Plot 

Example:
```bash
tiegcmpy --plot_type {plot_type} -dir {directory of datasets} --dataset_filter {primary or secondary files} --output_format {format of output plot} --[Other optional arguments for specific plots]
```


#### Multiple Plots
##### Option 1: Initiate Interactive mode to generate multiple plots from different datasets
```bash
tiegcmpy -rec
```
Wait for the command input request. 
```bash
Entering Interactive Mode
Enter command or 'exit' to terminate:
```
Type the arguments to request a plot with the dataset and output file information
```bash
--plot_type {plot_type} -dir {directory of datasets} --dataset_filter {primary or secondary files} --output_format {format of output plot} --[Other optional arguments for specific plots]
```
Wait for input request. Type another command or 'exit'

##### Option 2: Load dataset for multiple plot generation to multiple files
```bash
tiegcmpy -rec -dir {directory of datasets} --dataset_filter {primary or secondary files} 
```
Loads datasets into memory and requests for input.
```bash
Entering Interactive Mode
Loading datasets globally.
Enter command or 'exit' to terminate: 
```
Type the arguments to request a plot with the output file information
```bash
--plot_type {plot_type} --output_format {format of output plot} --[Other optional arguments for specific plots]
```
Wait for input request. Type another command or 'exit'
##### Option 3: Load dataset for multiple plot generation to a single PDF file 
```bash
tiegcmpy -rec -dir {directory of datasets} --dataset_filter {primary or secondary files} --multiple_output {Output PDF file name}
```
Loads datasets into memory, generates the PDF file and requests for input.
```bash
Entering Interactive Mode
Loading datasets globally.
Enter command or 'exit' to terminate: 
```
Type the arguments to request a plot.
```bash
--plot_type {plot_type} --[Other optional arguments for specific plots]
```
Wait for input request. Type another command or 'exit'
## Functionality
### Latitude vs Longitude Contour Plots

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

ty.plt_lat_lon (datasets, variable_name, time= None, mtime=None, level = None,  variable_unit = None, contour_intervals = None, contour_value = None, coastlines=False, latitude_minimum = None, latitude_maximum = None, longitude_minimum = None, longitude_maximum = None, localtime_minimum = None, localtime_maximum = None )

   **Parameters:** 
* **datasets** (xarray): The loaded dataset/s using xarray.
* **variable_name** (str): The name of the variable with latitude, longitude, ilev dimensions.
* **time** (np.datetime64, optional): The selected time e.g., '2022-01-01T12:00:00'.
* **mtime** (array, 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.
* **coastlines** (bool, optional): Shows coastlines 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.
* **localtime_minimum** (float, optional): Minimum localtime to slice plots.
* **localtime_maximum** (float, optional): Maximum localtime to slice plots.

**Example:** 

1. Load datasets:
```python
datasets = ty.load_datasets(directory, dataset_filter)
```
2. Set variable values:
```python
variable_name = 'TN'
value_of_mtime = [360, 0, 0, 0]
pressure_level = 4.0
unit_of_variable = 'K'
intervals = 20
```
3. Generate Latitude vs Longitude contour plot:
```python
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.

ty.plt_lev_var(datasets, variable_name, latitude, time= None, mtime=None, longitude = None, localtime = None, variable_unit = None, level_minimum = None, level_maximum = None)

#### Parameters:

- **datasets** (xarray): The loaded dataset(s) using xarray.
- **variable_name** (str): The name of the variable with latitude, longitude, and 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** (array, optional): The selected time as a list, e.g., [1, 12, 0] for the 1st day, 12 hours, 0 minutes.
- **longitude** (float, optional): The specific longitude value for the plot.
- **localtime** (float, optional): The specific local time 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 -8.
- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 8.


**Example:** 

1. Load datasets:
```python
datasets = ty.load_datasets(directory, dataset_filter)
```
2. Set variable values:
```python
variable_name = 'TN'
latitude = 30.0
time_value = '2022-01-01T12:00:00'
longitude_value = 45.0
unit_of_variable = 'K'
```
3. Generate a Level vs Variable line plot:
```python
plot = ty.plt_lev_var(
    datasets,
    variable_name,
    latitude,
    time=time_value,
    longitude=longitude_value,
    variable_unit=unit_of_variable,
    )
```


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

ty.plt_lev_lon(datasets, variable_name, latitude, time= None, mtime=None, variable_unit = None, contour_intervals = 20, contour_value = None,  level_minimum = None, level_maximum = None, longitude_minimum = None, longitude_maximum = None, localtime_minimum = None, localtime_maximum = None)

#### Parameters:

- **datasets** (xarray): The loaded dataset(s) using xarray.
- **variable_name** (str): The name of the variable with latitude, longitude, and 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** (array, optional): The selected time as a list, e.g., [1, 12, 0] for the 1st day, 12 hours, 0 minutes.
- **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.
- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -6.75.
- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 6.75.
- **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.
- **localtime_minimum** (float, optional): Minimum localtime value for the plot.
- **localtime_maximum** (float, optional): Maximum localtime value for the plot.

#### Example:
1. Load datasets:

```python
datasets = ty.load_datasets(directory, dataset_filter)
```
2. Set variable values:
```python
variable_name = 'TN'
latitude = 30.0
time_value = '2022-01-01T12:00:00'
unit_of_variable = 'K'
contour_intervals = 20
```
3. Generate a Level vs Longitude contour plot:
```python
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 at a specified level against latitude, with optional time, longitude, and local time.

ty.plt_lev_lat(datasets, variable_name, time= None, mtime=None, longitude = None, localtime = None, variable_unit = None, contour_intervals = 20, contour_value = None, level_minimum = None, level_maximum = None, latitude_minimum = None,latitude_maximum = None):


#### Parameters:

- **datasets** (xarray): The loaded dataset(s) using xarray.
- **variable_name** (str): The name of the variable with latitude, longitude, and ilev dimensions.
- **time** (np.datetime64, optional): The selected time, e.g., '2022-01-01T12:00:00'.
- **mtime** (array, optional): The selected time as a list, e.g., [1, 12, 0] for the 1st day, 12 hours, 0 minutes.
- **longitude** (float, optional): The specific longitude value for the plot.
- **localtime** (float, optional): The specific local time 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.
- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -6.75.
- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 6.75.
- **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.

#### Example:
1. Load datasets:

```python
datasets = ty.load_datasets(directory, dataset_filter)
```
2. Set variable values:
```python
variable_name = 'TN'
time_value = '2022-01-01T12:00:00'
unit_of_variable = 'K'
contour_intervals = 20
```
3. Generate a Level vs Latitude contour plot:
```python
plot = ty.plt_lev_lat(
    datasets,
    variable_name,
    time=time_value,
    variable_unit=unit_of_variable,
    contour_intervals=contour_intervals,
)
```

### Pressure Level vs Time Contour Plot

This function generates a contour plot of a variable at a specified level against time, with optional latitude, longitude, and local time.

ty.plt_lev_lat(datasets, variable_name, time= None, mtime=None, longitude = None, localtime = None, variable_unit = None, contour_intervals = 20, contour_value = None, level_minimum = None, level_maximum = None, latitude_minimum = None,latitude_maximum = None)

#### Parameters:

- **datasets** (xarray): 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.
- **localtime** (float, optional): The specific local time 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.
- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -6.75.
- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 6.75.


#### Example:
1. Load datasets:

```python
datasets = ty.load_datasets(directory, dataset_filter)
```
2. Set variable values:
```python
variable_name = 'TN'
latitude_value = 30.0
longitude_value = 45.0
unit_of_variable = 'K'
contour_intervals = 20
```
3. Generate a Level vs Time contour plot:
```python
plot = ty.plt_lev_time(
    datasets,
    variable_name,
    latitude=latitude_value,
    longitude=longitude_value,
    variable_unit=unit_of_variable,
    contour_intervals=contour_intervals,
)
```

### Latitude vs Time Contour Plot

This function generates a contour plot of a variable at a specified latitude against time, with optional level, longitude, and local time.

#### Parameters:

- **datasets** (xarray): 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.
- **localtime** (float, optional): The specific local time 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.
- **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.


#### Example:
1. Load datasets:

```python
datasets = ty.load_datasets(directory, dataset_filter)
```
2. Set variable values:
```python
variable_name = 'TN'
level_value = 4.0
longitude_value = 45.0
unit_of_variable = 'K'
contour_intervals = 10

```
3. Generate a Latitude vs Time contour plot:
```python
plot = ty.plt_lat_time(
    datasets,
    variable_name,
    level=level_value,
    longitude=longitude_value,
    variable_unit=unit_of_variable,
    contour_intervals=contour_intervals,
)
```
## File Structure

    
    ├── src                         # Directory for all tiegcmpy source files
    │   ├── tiegcmpy          
    │       ├── __init__.py         # Initialize functions for API
    │       ├── convert_units.py    # Contains unit conversion functions
    │       ├── data_parse.py       # Contains data extraction and parsing functions
    │       ├── plot_gen.py         # Contains plot generation functions
    │       ├── io.py               # Contains Input Output functions for API
    │       ├── getoptions.py       # Contains argument parser for the Command Line Interface
    │       └── main.py             # Main python file to run
    ├── README.md                   # README   
    ├── benchmark_template.py       # Template for running benchmark routines     
    ├── p3postproc.py               # Testing file    
    ├── requirements.txt            # List of required libraries     
    └── setup.py                    # PIP package builder  

## License 
"""License Information"""

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NCAR/tiegcm",
    "name": "tiegcmpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Nikhil Rao",
    "author_email": "nikhilr@ucar.edu",
    "download_url": "https://files.pythonhosted.org/packages/4b/f1/b11a53d9b120dba031f7dbfdee6f63da6c7d36a0308e138ac69f3869f60b/tiegcmpy-1.2.7.tar.gz",
    "platform": null,
    "description": "# TIEGCMPY\n\ntiegcmpy is a tool used for TIE-GCM post processing and plot generation.\n\n## Updated documentation on readthedocs\n## https://tiegcm-docs.readthedocs.io/en/latest/\n\n\n## Installation\n\n```bash\npip install tiegcmpy\n```\n\n## Requrements \n- Python >= 3.8.0\n- Python pip >= 23.2.1\n  - cartopy >= 0.21.1\n  - numpy >= 1.24.4\n  - matplotlib >= 3.7.2\n  - xarray >= 2023.1.0\n\n\n## Usage\n\ntiegcmpy can be run in two modes:\n\n1) Mode: API\n\n   For use in custom python scripts or juypter notebooks\n\n2) Mode: Command Line Interface\n\n   For a command line interface with arguments\n\n   a) Single Plot\n\n   Load database for generation of a single plot to a single file\n\n   b) Multiple Plot\n\n   Load database for generation of multiple plots to a single or multiple files\n\n\n### Mode: API\n#### Importing tiegcmpy\n```python\nimport tiegcmpy as ty\n```\n#### Load datasets\n\na) Loading a single dataset\n```python\nty.load_dataset(directory, dataset_filter)\n```\nb) Loading multiple datasets\n```python\nty.load_datasets(directory, dataset_filter)\n```\n#### Plot generation\nThe following plots can be made:\n\na)Latitude vs Longitude plots: plt_lat_lon\n\nb)Pressure level vs Variable Value plots: plt_lev_var\n\nc)Pressure level vs Longitude pltos: plt_lev_lon\n\nd)Pressure level vs Latitude plots: plt_lev_lat\n\ne)Pressure level vs Time plots: plt_lev_time\n\nf)Latitude vs Time plots: plt_lat_time\n\nExample:\n```python\nty.plt_lat_lon(datasets, variable_name, level, localtime)\n```\n\nLook at functionality section for list of all plot types with required and optional arguments.\n\n### Mode: CLI (Command Line Interface)\n#### Single Plot \n\nExample:\n```bash\ntiegcmpy --plot_type {plot_type} -dir {directory of datasets} --dataset_filter {primary or secondary files} --output_format {format of output plot} --[Other optional arguments for specific plots]\n```\n\n\n#### Multiple Plots\n##### Option 1: Initiate Interactive mode to generate multiple plots from different datasets\n```bash\ntiegcmpy -rec\n```\nWait for the command input request. \n```bash\nEntering Interactive Mode\nEnter command or 'exit' to terminate:\n```\nType the arguments to request a plot with the dataset and output file information\n```bash\n--plot_type {plot_type} -dir {directory of datasets} --dataset_filter {primary or secondary files} --output_format {format of output plot} --[Other optional arguments for specific plots]\n```\nWait for input request. Type another command or 'exit'\n\n##### Option 2: Load dataset for multiple plot generation to multiple files\n```bash\ntiegcmpy -rec -dir {directory of datasets} --dataset_filter {primary or secondary files} \n```\nLoads datasets into memory and requests for input.\n```bash\nEntering Interactive Mode\nLoading datasets globally.\nEnter command or 'exit' to terminate: \n```\nType the arguments to request a plot with the output file information\n```bash\n--plot_type {plot_type} --output_format {format of output plot} --[Other optional arguments for specific plots]\n```\nWait for input request. Type another command or 'exit'\n##### Option 3: Load dataset for multiple plot generation to a single PDF file \n```bash\ntiegcmpy -rec -dir {directory of datasets} --dataset_filter {primary or secondary files} --multiple_output {Output PDF file name}\n```\nLoads datasets into memory, generates the PDF file and requests for input.\n```bash\nEntering Interactive Mode\nLoading datasets globally.\nEnter command or 'exit' to terminate: \n```\nType the arguments to request a plot.\n```bash\n--plot_type {plot_type} --[Other optional arguments for specific plots]\n```\nWait for input request. Type another command or 'exit'\n## Functionality\n### Latitude vs Longitude Contour Plots\n\nThis function generates a contour plot of a variable against latitude and longitude.\n\nty.plt_lat_lon (datasets, variable_name, time= None, mtime=None, level = None,  variable_unit = None, contour_intervals = None, contour_value = None, coastlines=False, latitude_minimum = None, latitude_maximum = None, longitude_minimum = None, longitude_maximum = None, localtime_minimum = None, localtime_maximum = None )\n\n   **Parameters:** \n* **datasets** (xarray): The loaded dataset/s using xarray.\n* **variable_name** (str): The name of the variable with latitude, longitude, ilev dimensions.\n* **time** (np.datetime64, optional): The selected time e.g., '2022-01-01T12:00:00'.\n* **mtime** (array, optional): The selected time as a list e.g., [1, 12, 0] for 1st day, 12 hours, 0 mins.\n* **level** (float, optional): The selected lev/ilev value.\n* **variable_unit** (str, optional): The desired unit of the variable.\n* **contour_intervals** (int, optional): The number of contour intervals. Defaults to 20.\n* **contour_value** (int, optional): The value between each contour interval.\n* **coastlines** (bool, optional): Shows coastlines on the plot. Defaults to False.\n* **latitude_minimum** (float, optional): Minimum latitude to slice plots. Defaults to -87.5.\n* **latitude_maximum** (float, optional): Maximum latitude to slice plots. Defaults to 87.5.\n* **longitude_minimum** (float, optional): Minimum longitude to slice plots. Defaults to -180.\n* **longitude_maximum** (float, optional): Maximum longitude to slice plots. Defaults to 175.\n* **localtime_minimum** (float, optional): Minimum localtime to slice plots.\n* **localtime_maximum** (float, optional): Maximum localtime to slice plots.\n\n**Example:** \n\n1. Load datasets:\n```python\ndatasets = ty.load_datasets(directory, dataset_filter)\n```\n2. Set variable values:\n```python\nvariable_name = 'TN'\nvalue_of_mtime = [360, 0, 0, 0]\npressure_level = 4.0\nunit_of_variable = 'K'\nintervals = 20\n```\n3. Generate Latitude vs Longitude contour plot:\n```python\nplot = ty.plt_lat_lon (\n    datasets, \n    variable_name, \n    mtime=value_of_mtime, \n    level = pressure_level,  \n    variable_unit = unit_of_variable,       \n    contour_intervals = intervals\n    )\n```\n\n### Pressure Level vs Variable Line Plot\n\nThis function generates a line plot of a variable at a specific latitude and optional longitude, time, and local time.\n\nty.plt_lev_var(datasets, variable_name, latitude, time= None, mtime=None, longitude = None, localtime = None, variable_unit = None, level_minimum = None, level_maximum = None)\n\n#### Parameters:\n\n- **datasets** (xarray): The loaded dataset(s) using xarray.\n- **variable_name** (str): The name of the variable with latitude, longitude, and ilev dimensions.\n- **latitude** (float): The specific latitude value for the plot.\n- **time** (np.datetime64, optional): The selected time, e.g., '2022-01-01T12:00:00'.\n- **mtime** (array, optional): The selected time as a list, e.g., [1, 12, 0] for the 1st day, 12 hours, 0 minutes.\n- **longitude** (float, optional): The specific longitude value for the plot.\n- **localtime** (float, optional): The specific local time value for the plot.\n- **variable_unit** (str, optional): The desired unit of the variable.\n- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -8.\n- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 8.\n\n\n**Example:** \n\n1. Load datasets:\n```python\ndatasets = ty.load_datasets(directory, dataset_filter)\n```\n2. Set variable values:\n```python\nvariable_name = 'TN'\nlatitude = 30.0\ntime_value = '2022-01-01T12:00:00'\nlongitude_value = 45.0\nunit_of_variable = 'K'\n```\n3. Generate a Level vs Variable line plot:\n```python\nplot = ty.plt_lev_var(\n    datasets,\n    variable_name,\n    latitude,\n    time=time_value,\n    longitude=longitude_value,\n    variable_unit=unit_of_variable,\n    )\n```\n\n\n### Pressure level vs Longitude Contour Plot\n\nThis function generates a contour plot of a variable at a specific latitude against longitude, with optional time and local time.\n\nty.plt_lev_lon(datasets, variable_name, latitude, time= None, mtime=None, variable_unit = None, contour_intervals = 20, contour_value = None,  level_minimum = None, level_maximum = None, longitude_minimum = None, longitude_maximum = None, localtime_minimum = None, localtime_maximum = None)\n\n#### Parameters:\n\n- **datasets** (xarray): The loaded dataset(s) using xarray.\n- **variable_name** (str): The name of the variable with latitude, longitude, and ilev dimensions.\n- **latitude** (float): The specific latitude value for the plot.\n- **time** (np.datetime64, optional): The selected time, e.g., '2022-01-01T12:00:00'.\n- **mtime** (array, optional): The selected time as a list, e.g., [1, 12, 0] for the 1st day, 12 hours, 0 minutes.\n- **variable_unit** (str, optional): The desired unit of the variable.\n- **contour_intervals** (int, optional): The number of contour intervals. Defaults to 20.\n- **contour_value** (int, optional): The value between each contour interval.\n- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -6.75.\n- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 6.75.\n- **longitude_minimum** (float, optional): Minimum longitude value for the plot. Defaults to -180.\n- **longitude_maximum** (float, optional): Maximum longitude value for the plot. Defaults to 175.\n- **localtime_minimum** (float, optional): Minimum localtime value for the plot.\n- **localtime_maximum** (float, optional): Maximum localtime value for the plot.\n\n#### Example:\n1. Load datasets:\n\n```python\ndatasets = ty.load_datasets(directory, dataset_filter)\n```\n2. Set variable values:\n```python\nvariable_name = 'TN'\nlatitude = 30.0\ntime_value = '2022-01-01T12:00:00'\nunit_of_variable = 'K'\ncontour_intervals = 20\n```\n3. Generate a Level vs Longitude contour plot:\n```python\nplot = ty.plt_lev_lon(\n    datasets,\n    variable_name,\n    latitude,\n    time=time_value,\n    variable_unit=unit_of_variable,\n    contour_intervals=contour_intervals,\n)\n```\n### Pressure Level vs Latitude Contour Plot\n\nThis function generates a contour plot of a variable at a specified level against latitude, with optional time, longitude, and local time.\n\nty.plt_lev_lat(datasets, variable_name, time= None, mtime=None, longitude = None, localtime = None, variable_unit = None, contour_intervals = 20, contour_value = None, level_minimum = None, level_maximum = None, latitude_minimum = None,latitude_maximum = None):\n\n\n#### Parameters:\n\n- **datasets** (xarray): The loaded dataset(s) using xarray.\n- **variable_name** (str): The name of the variable with latitude, longitude, and ilev dimensions.\n- **time** (np.datetime64, optional): The selected time, e.g., '2022-01-01T12:00:00'.\n- **mtime** (array, optional): The selected time as a list, e.g., [1, 12, 0] for the 1st day, 12 hours, 0 minutes.\n- **longitude** (float, optional): The specific longitude value for the plot.\n- **localtime** (float, optional): The specific local time value for the plot.\n- **variable_unit** (str, optional): The desired unit of the variable.\n- **contour_intervals** (int, optional): The number of contour intervals. Defaults to 20.\n- **contour_value** (int, optional): The value between each contour interval.\n- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -6.75.\n- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 6.75.\n- **latitude_minimum** (float, optional): Minimum latitude value for the plot. Defaults to -87.5.\n- **latitude_maximum** (float, optional): Maximum latitude value for the plot. Defaults to 87.5.\n\n#### Example:\n1. Load datasets:\n\n```python\ndatasets = ty.load_datasets(directory, dataset_filter)\n```\n2. Set variable values:\n```python\nvariable_name = 'TN'\ntime_value = '2022-01-01T12:00:00'\nunit_of_variable = 'K'\ncontour_intervals = 20\n```\n3. Generate a Level vs Latitude contour plot:\n```python\nplot = ty.plt_lev_lat(\n    datasets,\n    variable_name,\n    time=time_value,\n    variable_unit=unit_of_variable,\n    contour_intervals=contour_intervals,\n)\n```\n\n### Pressure Level vs Time Contour Plot\n\nThis function generates a contour plot of a variable at a specified level against time, with optional latitude, longitude, and local time.\n\nty.plt_lev_lat(datasets, variable_name, time= None, mtime=None, longitude = None, localtime = None, variable_unit = None, contour_intervals = 20, contour_value = None, level_minimum = None, level_maximum = None, latitude_minimum = None,latitude_maximum = None)\n\n#### Parameters:\n\n- **datasets** (xarray): The loaded dataset(s) using xarray.\n- **variable_name** (str): The name of the variable with latitude, longitude, time, and ilev dimensions.\n- **latitude** (float): The specific latitude value for the plot.\n- **longitude** (float, optional): The specific longitude value for the plot.\n- **localtime** (float, optional): The specific local time value for the plot.\n- **variable_unit** (str, optional): The desired unit of the variable.\n- **contour_intervals** (int, optional): The number of contour intervals. Defaults to 20.\n- **contour_value** (int, optional): The value between each contour interval.\n- **level_minimum** (float, optional): Minimum level value for the plot. Defaults to -6.75.\n- **level_maximum** (float, optional): Maximum level value for the plot. Defaults to 6.75.\n\n\n#### Example:\n1. Load datasets:\n\n```python\ndatasets = ty.load_datasets(directory, dataset_filter)\n```\n2. Set variable values:\n```python\nvariable_name = 'TN'\nlatitude_value = 30.0\nlongitude_value = 45.0\nunit_of_variable = 'K'\ncontour_intervals = 20\n```\n3. Generate a Level vs Time contour plot:\n```python\nplot = ty.plt_lev_time(\n    datasets,\n    variable_name,\n    latitude=latitude_value,\n    longitude=longitude_value,\n    variable_unit=unit_of_variable,\n    contour_intervals=contour_intervals,\n)\n```\n\n### Latitude vs Time Contour Plot\n\nThis function generates a contour plot of a variable at a specified latitude against time, with optional level, longitude, and local time.\n\n#### Parameters:\n\n- **datasets** (xarray): The loaded dataset(s) using xarray.\n- **variable_name** (str): The name of the variable with latitude, longitude, time, and ilev dimensions.\n- **level** (float): The specific level value for the plot.\n- **longitude** (float, optional): The specific longitude value for the plot.\n- **localtime** (float, optional): The specific local time value for the plot.\n- **variable_unit** (str, optional): The desired unit of the variable.\n- **contour_intervals** (int, optional): The number of contour intervals. Defaults to 10.\n- **contour_value** (int, optional): The value between each contour interval.\n- **latitude_minimum** (float, optional): Minimum latitude value for the plot. Defaults to -87.5.\n- **latitude_maximum** (float, optional): Maximum latitude value for the plot. Defaults to 87.5.\n\n\n#### Example:\n1. Load datasets:\n\n```python\ndatasets = ty.load_datasets(directory, dataset_filter)\n```\n2. Set variable values:\n```python\nvariable_name = 'TN'\nlevel_value = 4.0\nlongitude_value = 45.0\nunit_of_variable = 'K'\ncontour_intervals = 10\n\n```\n3. Generate a Latitude vs Time contour plot:\n```python\nplot = ty.plt_lat_time(\n    datasets,\n    variable_name,\n    level=level_value,\n    longitude=longitude_value,\n    variable_unit=unit_of_variable,\n    contour_intervals=contour_intervals,\n)\n```\n## File Structure\n\n    \n    \u251c\u2500\u2500 src                         # Directory for all tiegcmpy source files\n    \u2502   \u251c\u2500\u2500 tiegcmpy          \n    \u2502       \u251c\u2500\u2500 __init__.py         # Initialize functions for API\n    \u2502       \u251c\u2500\u2500 convert_units.py    # Contains unit conversion functions\n    \u2502       \u251c\u2500\u2500 data_parse.py       # Contains data extraction and parsing functions\n    \u2502       \u251c\u2500\u2500 plot_gen.py         # Contains plot generation functions\n    \u2502       \u251c\u2500\u2500 io.py               # Contains Input Output functions for API\n    \u2502       \u251c\u2500\u2500 getoptions.py       # Contains argument parser for the Command Line Interface\n    \u2502       \u2514\u2500\u2500 main.py             # Main python file to run\n    \u251c\u2500\u2500 README.md                   # README   \n    \u251c\u2500\u2500 benchmark_template.py       # Template for running benchmark routines     \n    \u251c\u2500\u2500 p3postproc.py               # Testing file    \n    \u251c\u2500\u2500 requirements.txt            # List of required libraries     \n    \u2514\u2500\u2500 setup.py                    # PIP package builder  \n\n## License \n\"\"\"License Information\"\"\"\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python3 post processing tool for TIE-GCM",
    "version": "1.2.7",
    "project_urls": {
        "Homepage": "https://github.com/NCAR/tiegcm"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3233284c56681a8028496f9df5be14c8b820bf35b95dfc9d0871b89c0017eeb",
                "md5": "039eb49b8137744a3dc75899b8f4b00a",
                "sha256": "4886a56aaa0b6ca4a34fbb9628b566f441a437beaf0f4a7579a1d5128351d2bf"
            },
            "downloads": -1,
            "filename": "tiegcmpy-1.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "039eb49b8137744a3dc75899b8f4b00a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 38253,
            "upload_time": "2024-04-23T17:19:03",
            "upload_time_iso_8601": "2024-04-23T17:19:03.576174Z",
            "url": "https://files.pythonhosted.org/packages/e3/23/3284c56681a8028496f9df5be14c8b820bf35b95dfc9d0871b89c0017eeb/tiegcmpy-1.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4bf1b11a53d9b120dba031f7dbfdee6f63da6c7d36a0308e138ac69f3869f60b",
                "md5": "95fa81d92191f46ce8147f29413e87cb",
                "sha256": "d6729f0c0da9bafc4955c97c5eb80bd753c196b2f39c53ae8c1b9cb534d3ffa8"
            },
            "downloads": -1,
            "filename": "tiegcmpy-1.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "95fa81d92191f46ce8147f29413e87cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 34863,
            "upload_time": "2024-04-23T17:19:05",
            "upload_time_iso_8601": "2024-04-23T17:19:05.215607Z",
            "url": "https://files.pythonhosted.org/packages/4b/f1/b11a53d9b120dba031f7dbfdee6f63da6c7d36a0308e138ac69f3869f60b/tiegcmpy-1.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-23 17:19:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NCAR",
    "github_project": "tiegcm",
    "github_not_found": true,
    "lcname": "tiegcmpy"
}
        
Elapsed time: 0.22949s