Recent Releases of imdlib
imdlib - Version: 0.3.1
Released 08 October 2026.
Fixes
load()downloads several files at a time (parallel=, default 4), which is much faster.- Real-time days missing at IMD between available days are NaN, with a warning, instead of an error.
- A download blocked by a web browser, or an empty reply for an older year, is no longer reported as data not published yet.
Full changelog: https://github.com/iamsaswata/imdlib/compare/0.3.0...0.3.1
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata 8 days ago
imdlib - Version: 0.3.0
Released 07 October 2026.
Upgrading from 0.2.0: write data = data.clip(...) (clip() no longer changes data), and in scripts print(data.shape) (shape no longer prints).
Breaking changes
clip()now returns the clipped data and no longer changes the original object: writedata = data.clip(...).shapereturns the size of the data, e.g.(366, 31, 31), instead of printing it. In a script, writeprint(data.shape).
New
- Added
region(): area-weighted means over named states, districts, river basins and sub-basins of India, or over the polygons of a shapefile, and the value at a city, as apandas.DataFrame.imdlib.regions.search(),list()andinfo()find region names and show the sources. clip()accepts region names (state=,district=,basin=,subbasin=) as well as a shapefile. Cells partly inside the region are kept with their fraction (cell_fraction).spatial_mean()uses these fractions, so it equalsregion()for the same region.get_xarray()andto_netcdf()includecell_fraction.load()reads the files when the data is first used: it returns at once, andregion()andclip()read only the cells they need.
Fixes
- Missing values are recognised by the IMD values (-999 for rain, 99.9 for temperature, none for GPM rain) instead of the value of the corner cell. This applies to
spatial_mean(),get_xarray(), the land mask, the climate indices,climatology(),anomaly(),fill_na(),remap(),heatwave()andcoldwave(). Results for data that is not clipped are unchanged, except:- GPM rain: -999 is no longer left out;
- real-time and computed data: valid zero values are no longer turned into missing values, e.g.
remap()orfill_na()aftercompute('dr', 'A').
fill_na():- finds the temperature cells it does not fill (the Andaman and Nicobar area and the row at 7.5°N) by their coordinates, so it is correct on the 0.5° real-time grid, where results change;
- fills GPM rain everywhere;
- no longer runs forever when a day has no values.
to_geotiff()uses NaN as its nodata value, so dry days in clipped rain are kept. Very small clipped areas are now correctly placed on the map.compute('dtr', ...)andanomaly(climatology=...)raise an error if the two datasets are not on the same cells. SPEI raises an error for clippedtmaxortmin.
Full changelog: https://github.com/iamsaswata/imdlib/compare/0.2.0...0.3.0
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata 9 days ago
imdlib - Version: 0.2.0
Released 06 October 2026.
-
Added
load(), which downloads IMD data into a local cache, checks each file and returns an IMD object. It supports archive and real-time data (source='realtime', includingrain_gpm), offline use, retries and download progress. -
Added
imdlib.cacheto show, clear, relocate and unlock the local data cache. -
Fixed
get_data()andget_real_data()saving empty or wrong-size files. An empty reply from IMD (period not published yet) now raisesDataNotAvailableError; an incomplete download raisesDownloadError. -
Faster reading of
.grdfiles inopen_data()andopen_real_data()(results are unchanged). -
heatwave()andcoldwave()now read a normal period outside the loaded data withload(), so its files go into the cache instead of the current working directory.
Full changelog: https://github.com/iamsaswata/imdlib/compare/0.1.22...0.2.0
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata 10 days ago
imdlib - Version: 0.1.22
Released 21 September 2026.
-
Added SPI and SPEI drought indices.
-
Added heat wave and cold wave detection with daily classifications and annual day counts.
-
Added Consecutive Dry Days (CDD) climate index.
-
Added monthly climatology and anomaly computation.
-
Added area-weighted spatial averaging using
spatial_mean(). -
Added support for date inputs and reading partial-year periods.
-
Improved downloads by skipping existing files and corrected download-directory handling.
-
Improved land masking for grid-cell calculations.
-
Fixed variable metadata for computed outputs.
-
Fixed
compute()to restore metadata after a failed calculation. -
Updated API documentation, examples, references, and the paper citation.
-
Fixed Read the Docs configuration and removed tracked build files.
-
Updated package requirements to Python 3.10 or newer and pandas 2.2 or newer.
Full changelog: https://github.com/iamsaswata/imdlib/compare/0.1.21...0.1.22
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata 25 days ago
imdlib - Version: 0.1.21
What's Changed
- Fix #28 by @pratiman-91 in https://github.com/iamsaswata/imdlib/pull/37
- Code quality improvements by @iamsaswata in https://github.com/iamsaswata/imdlib/pull/43
- Add real.py module to API documentation by @iamsaswata in https://github.com/iamsaswata/imdlib/pull/40
- Remove duplicate open_data function by @iamsaswata in https://github.com/iamsaswata/imdlib/pull/38
- Remove duplicate continue statement by @iamsaswata in https://github.com/iamsaswata/imdlib/pull/41
- Fix broken test function parameter order by @iamsaswata in https://github.com/iamsaswata/imdlib/pull/42
- Fix lat/lon validation logic bug by @iamsaswata in https://github.com/iamsaswata/imdlib/pull/39
Full Changelog: https://github.com/iamsaswata/imdlib/compare/0.1.20...0.1.21
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata 11 months ago
imdlib - Version: 0.1.20
- Bug Fixes : Multi-polygon shapefile clipping
- Bug Fixes : Climate indices geotiff conversion
- Bug Fixes: Typos
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata over 2 years ago
imdlib - Version: 0.1.17
- New feature : compute climate indices
- New feature : fill missing data in IMD object
- New feature : change resolution of IMD object
- New feature : clip a IMD object for a roi using shapefile.
- New feature : numpy like non-immutable copy of the IMD object
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata over 3 years ago
imdlib - Version: 0.1.15
- New feature for handling real-time daily IMD rainfall and temperature data.
- Updated link for new endpoints.
- Bug fixes
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata almost 4 years ago
imdlib - Critical updates
- Produces NetCDF data following CF-1.7 conventions.
- Added support for converting data into Geo-TIFF format.
- Improvement in return process of the imd.get_data() functionality
- Updated the link form new https based data-load protocol.
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata almost 6 years ago
imdlib - Better syntax support
Releasing it with different syntax support.
Atmosphere - Meteorological Observation and Forecast
- Python
Published by iamsaswata over 6 years ago