1- varunayan: Download and Process ERA5 Climate Data
2- ==================================================
1+ varunayan: Climate Data Toolkit
2+ ================================
33
4- A Python package for downloading and processing ERA5 climate data with support for custom geographical regions:
4+ Download and process climate reanalysis and observational data from ERA5, IMD, HadEX3, and CRU TS. Compute heat stress indices (UTCI, WBGT, Heat Index, Humidex). Aggregate country-level temperature series. Built with a focus on India, but works globally wherever the underlying datasets have coverage.
55
66.. image :: https://img.shields.io/pypi/v/varunayan.svg
77 :target: https://pypi.org/project/varunayan/
@@ -15,73 +15,74 @@ A Python package for downloading and processing ERA5 climate data with support f
1515 :target: https://github.com/saketlab/varunayan/blob/main/LICENSE
1616 :alt: License
1717
18- Overview
19- --------
20-
21- varunayan provides a simple and powerful interface to download and process ERA5 climate data from the Copernicus Climate Data Store. It supports:
22-
2318.. note ::
2419
25- **R users **: Check out `varunayanR <https://saketlab.github.io/varunayanR >`_, the R companion package for varunayan.
26-
27- - **Custom geographical regions **: Use GeoJSON files, bounding boxes, or point coordinates
28- - **Multiple variables **: Download any ERA5 variable (temperature, precipitation, wind, etc.)
29- - **Flexible time periods **: From hourly to yearly data aggregation
30- - **Automatic processing **: Spatial filtering, temporal aggregation, and CSV output
31- - **Chunking support **: Handle large requests efficiently with automatic time-based chunking
20+ **R users **: See `varunayanR <https://varunayanr.saketlab.org >`_, the R companion package.
21+
22+ Data Sources
23+ ------------
24+
25+ .. list-table ::
26+ :header-rows: 1
27+ :widths: 20 50 30
28+
29+ * - Source
30+ - Coverage
31+ - Access
32+ * - **ERA5 **
33+ - Global reanalysis, 0.25° grid, 1940-present
34+ - CDS API (bbox, point, GeoJSON)
35+ * - **IMD **
36+ - India gridded rainfall (0.25°) and temperature (1°), 1901-present
37+ - Direct download
38+ * - **HadEX3 **
39+ - Global ETCCDI climate extremes indices, 1.875° grid
40+ - Direct download
41+ * - **CRU TS **
42+ - Global monthly climate grids (0.5°), 1901-present
43+ - Direct download
3244
3345Quick Start
3446-----------
3547
36- Installation
37- ~~~~~~~~~~~~
38-
3948.. code-block :: bash
4049
4150 pip install varunayan
4251
43- Basic Usage
44- ~~~~~~~~~~~
45-
4652 .. code-block :: python
4753
48- from varunayan import era5ify_geojson, era5ify_bbox, era5ify_point
54+ import varunayan
4955
50- # Download data for a GeoJSON region
51- era5ify_geojson (
52- request_id = " my_request " ,
53- variables = [" 2m_temperature" , " total_precipitation " ],
54- start_date = " 2020-01 -01" ,
55- end_date = " 2020-01-31 " ,
56- json_file = " my_region.geojson "
56+ # ERA5 temperature for a bounding box
57+ varunayan.era5ify_bbox (
58+ request_id = " demo " ,
59+ variables = [" 2m_temperature" ],
60+ start_date = " 2023-06 -01" ,
61+ end_date = " 2023-06-30 " ,
62+ north = 28.7 , south = 28.5 , east = 77.3 , west = 77.0 ,
5763 )
5864
59- # Download data for a bounding box
60- era5ify_bbox(
61- request_id = " bbox_request" ,
62- variables = [" 2m_temperature" ],
63- start_date = " 2020-01-01" ,
64- end_date = " 2020-01-02" ,
65- north = 40.0 , south = 35.0 , east = - 120.0 , west = - 125.0
65+ # IMD gridded rainfall
66+ varunayan.imd_rainfall_bbox(
67+ " mumbai" , start_year = 2020 , end_year = 2020 ,
68+ north = 19.2 , south = 18.9 , east = 72.9 , west = 72.8 ,
6669 )
6770
68- Command Line Interface
69- ~~~~~~~~~~~~~~~~~~~~~~
71+ # HadEX3 climate extremes
72+ varunayan.hadex3_bbox(" TXx" , start_year = 2000 , end_year = 2018 ,
73+ north = 35 , south = 8 , east = 90 , west = 68 )
7074
71- .. code-block :: bash
75+ # UTCI heat stress index
76+ varunayan.utci(temp_c = 35.0 , rh = 60.0 , wind_ms = 2.0 , mrt_c = 50.0 )
7277
73- # Process with GeoJSON file
74- varunayan geojson --request-id " my_request" --variables " 2m_temperature,total_precipitation" \
75- --start " 2020-01-01" --end " 2020-01-31" --geojson " region.geojson"
78+ CLI
79+ ~~~
7680
77- # Process with bounding box
78- varunayan bbox --request-id " bbox_request" --variables " 2m_temperature" \
79- --start " 2020-01-01" --end " 2020-01-02" \
80- --north 40.0 --south 35.0 --east -120.0 --west -125.0
81+ .. code-block :: bash
8182
82- # Process for a single point
83- varunayan point --request-id " point_request " --variables " 2m_temperature " \
84- --start " 2020-01-01 " --end " 2020-01-02 " --lat 37.7749 --lon -122.4194
83+ varunayan bbox --request-id demo --variables 2m_temperature \
84+ --start 2023-06-01 --end 2023-06-30 \
85+ --north 28.7 --south 28.5 --east 77.3 --west 77.0
8586
8687 .. toctree ::
8788 :maxdepth: 2
@@ -94,9 +95,7 @@ Command Line Interface
9495 contributing
9596
9697Jupyter Notebooks
97- ==================
98-
99- Interactive notebooks with hands-on examples:
98+ =================
10099
101100.. toctree ::
102101 :maxdepth: 1
@@ -134,4 +133,4 @@ Indices and tables
134133
135134* :ref: `genindex `
136135* :ref: `modindex `
137- * :ref: `search `
136+ * :ref: `search `
0 commit comments