This repository contains a collection of Python modules designed to facilitate the analysis and visualization of climate data. These modules are specifically tailored for working with spatial and temporal datasets, providing tools for plotting, trend analysis, and data manipulation within the domain of climate science.
pip
as well as conda
. The preferred way is to install via conda
as it takes care of the dependencies involved.conda install xarray dask matplotlib cartopy scipy numpy
pip install xarray dask matplotlib cartopy scipy numpy
You can also install via requirements.txt
file
pip install -r requirements.txt
git clone https://github.com/yourusername/python-workshop-ees405.git
cd python-workshop-ees405
We have provided a Jupyter notebook along with this repository that you can use to follow along with our modules. It’s a great way to learn and also experiment by trying out various codes.
To access the interactive version of the notebook, click on the binder badge below:
This will launch the notebook in a Binder environment, allowing you to execute and modify the code without needing to install anything on your local machine.
The repository is organized into two main categories: spatial_plot_modules
and temporal_plot_modules
, each containing Python scripts tailored for specific types of climate data analysis.
spatial.py
: Base module for generating spatial plots.contour.py
: Generates contour plots for spatial data.contour_lines.py
: Focuses on adding contour lines to spatial plots for enhanced detail.levels.py
: Helps in defining custom levels for contour plots.quiver.py
: Creates quiver plots to visualize vector fields like wind patterns.streamplot.py
: Similar to quiver but produces streamlines for vector field visualization.spatial_trend.py
: Analyzes and visualizes trends in spatial data.spatial_trend_gpu.py
: A GPU-accelerated version of spatial_trend.py for faster processing of large datasets.
timeseries.py
: Designed for creating time-series plots to analyze trends over time.Each module is designed to be run as a standalone script. Here is an example of how to run the timeseries.py
module:
python3 temporal_plot_modules/timeseries.py
We welcome contributions to improve the modules or documentation. Please feel free to fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See LICENSE
Thanks to all the contributors who have helped in developing these modules.