API reference
Load data
|
Load IMD gridded data, downloading and caching the files as needed. |
Cache
|
Print the cache location and what is cached: periods, number of files, size and download dates per source and variable. |
|
Delete cached files (and their manifest entries). |
|
Set the cache directory for the rest of this Python session. |
|
Return the cache directory that |
|
Remove a leftover lock file of the cache, e.g. after a crash. |
Download and read data
|
Function to download binary data and return an IMD class object time range is tuple or list or numpy array of 2 int number |
|
Function to read binary data and return an IMD class object time range is tuple or list or numpy array of 2 int number |
|
Function to download real-time IMD data at daily timescale |
|
Function to read real-time binary data and return an IMD class object |
IMD data object
|
Class to handle binary (.grd) IMD gridded meteorological data. |
Convert and export
The data as an |
|
|
|
|
|
|
Regions
|
Area-weighted mean time series of named regions of India. |
|
Find regions by part of their name. |
|
Official names of all regions of a type. |
Sources and counts of the region data shipped with IMDLIB. |
|
A region could not be used (base class of the region errors). |
|
No region of the requested type has this name. |
|
The name fits more than one region; add |
Compare with past years
|
Compare a day, month, season or year at a place with the same period in past years. |
Process gridded data
Function to make a non-immutable copy of the IMD object. |
|
|
The data of one region: a state, district, CWC basin or sub-basin, or the polygons of a shapefile. |
|
Function to change resolution of IMD object. |
Function to fill missing data in IMD object. |
|
|
Compute area-weighted spatial mean, returning a time series. |
Compute monthly climatology (long-term monthly mean). |
|
|
Compute monthly anomaly (departure from climatology). |
Climate indices
|
Compute climate indices, trends or drought indices in place. |
|
Function for finding Consecutive Dry Days in a year |
|
Function for finding Consecutive Wet Days in a year |
|
Function for finding number of heavy rainfall days in a year |
|
Function for finding total Rainy days in a year |
|
Function for annual mean Diurnal Temperature Range |
|
Function for minimum Annual Daily Tmin (Coolest night) |
|
Function for maximum Annual Daily Tmax (Hottest Day) |
|
Function for finding Precipitation concentration index |
|
Function for finding Total precipitation in wet days in a year |
|
Function for Maximum Max 5 day rainfall in a year |
|
Function for Maximum annual rainfall |
|
Function for finding Simple precipitation intensity index |
Drought indices
|
Compute Standardized Precipitation Index (SPI). |
|
Compute Standardized Precipitation Evapotranspiration Index (SPEI). |
Extreme temperature events
|
Detect heat waves using IMD's two-gate classification system. |
|
Detect cold waves using IMD's two-gate classification system. |
Trend analysis
|
Function for annual trend analysis |
|
This function checks the Modified Mann-Kendall (MK) test using Hamed and Rao (1998) method. |
Computes change magnitude as percentage of mean from Sen's slope estimator |
|
This method proposed by Theil (1950) and Sen (1968) to estimate the magnitude of the monotonic trend. |
|
Computes Spearman’s rho test statistics (Zsr) for trend analysis |
Date and grid utilities
|
Check leap year or not |
|
Get filename for reading the file content in future |
|
Get filename for reading the real-time file content in future |
|
Check INDEX of closest lat lon for a given co-ordinate |
|
Parse date input that can be int year or 'YYYY-MM-DD' string. |
|
Calculate to no of days for a given starting and ending day |
|
This method provides index (last date) of every year from daily data. |
This method provides index (last date) of every month from daily data. |