Package: varunayan 0.2.0

Saket Choudhary

varunayan: Download and Process ERA5, IMD, HadEX3 and CRU TS Climate Data

Download and process climate data for custom geographical regions defined by bounding boxes, 'GeoJSON' polygons, or point coordinates. Supports the fifth generation European Centre for Medium-Range Weather Forecasts atmospheric reanalysis ('ERA5'; Hersbach et al. (2020) <doi:10.1002/qj.3803>) from the 'Copernicus' Climate Data Store (CDS) <https://cds.climate.copernicus.eu/>, India Meteorological Department (IMD) gridded rainfall and temperature (Pai et al. (2014) <doi:10.54302/mausam.v65i1.851>), Hadley Centre global land climate extremes indices version 3 ('HadEX3'; Dunn et al. (2020) <doi:10.1029/2019JD032263>), and Climatic Research Unit gridded Time Series ('CRU TS'; Harris et al. (2020) <doi:10.1038/s41597-020-0453-3>). Also computes heat stress indices including heat index, wet-bulb temperature, outdoor wet-bulb globe temperature (Liljegren et al. (2008) <doi:10.1080/15459620802310770>) and the Universal Thermal Climate Index (Bröde et al. (2012) <doi:10.1007/s00484-011-0454-1>), and heat exposure indicators for health studies: heatwave and warm-night frequency and duration under India Meteorological Department and percentile definitions, the Excess Heat Factor (Nairn and Fawcett (2015) <doi:10.3390/ijerph120100227>) and diurnal temperature range.

Authors:Saket Choudhary [aut, cre, cph], Darakhshan Nehal [aut]

varunayan_0.2.0.tar.gz
varunayan_0.2.0.zip(r-4.7-any)varunayan_0.2.0.zip(r-4.6-any)varunayan_0.2.0.zip(r-4.5-any)
varunayan_0.2.0.tgz(r-4.6-any)varunayan_0.2.0.tgz(r-4.5-any)
varunayan_0.2.0.tar.gz(r-4.7-any)varunayan_0.2.0.tar.gz(r-4.6-any)
varunayan_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
varunayan/json (API)

# Install 'varunayan' in R:
install.packages('varunayan', repos = c('https://saketlab.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/saketlab/varunayanr/issues

Pkgdown/docs site:https://varunayan.saketlab.org

On CRAN:

Conda:

climate-changeera5imd

4.59 score 3 stars 135 exports 51 dependencies

Last updated from:4a29463242. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK273
source / vignettesOK258
linux-releaseOK287
macos-releaseOK215
macos-oldrelOK208
windows-develOK179
windows-releaseOK257
windows-oldrelOK261
wasm-releaseOK143

Exports:aggregate_imd_by_frequencyaggregate_to_polygonscache_statscalc_heat_indicescategorize_variablescheck_grid_coveragecheck_system_readinessCheckSystemReadinessclear_cacheclear_timingsClearCachecompare_gridscru_ts_bboxcru_ts_geojsonCRUTSBboxCRUTSGeojsondescribe_variablesDescribeVariablesdownload_imd_rainfalldownload_imd_temperatureera5ify_bboxera5ify_geojsonera5ify_pointERA5ifyBboxERA5ifyGeojsonERA5ifyPointexcess_heat_factorexclude_colsexposure_indicatorsfilter_imd_by_bboxfilter_imd_by_geojsonget_available_datasetsget_available_pressure_levelsget_cache_dirget_cds_credentialsget_era5_country_temperatureget_era5_daily_climateget_era5_daily_heat_dataget_era5_daily_heat_index_dataget_era5_daily_humidityget_era5_daily_temperatureget_era5_daily_wet_bulbget_era5_daily_windget_era5_monthly_heat_dataget_era5_monthly_heat_index_dataget_imd_grid_specsget_package_infoget_timingsGetAvailablePressureLevelsGetCacheDirGetERA5CountryTemperatureGetERA5DailyClimateGetERA5DailyHeatDataGetERA5DailyHeatIndexDataGetERA5DailyHumidityGetERA5DailyTemperatureGetERA5DailyWetBulbGetERA5DailyWindGetERA5MonthlyHeatDataGetERA5MonthlyHeatIndexDataGetPackageInfohadex3_bboxhadex3_geojsonHadEX3BboxHadEX3Geojsonheat_indexheat_index_from_dewpointheat_index_risk_categoryheatwave_dayshumideximd_exposure_bboximd_rainfall_bboximd_rainfall_geojsonimd_rainfall_pointimd_stationsimd_temperature_bboximd_temperature_by_regionimd_temperature_geojsonimd_terrainIMDExposureBboxIMDRainfallBboxIMDRainfallGeojsonIMDRainfallPointIMDStationsIMDTemperatureBboxIMDTemperatureGeojsonindia_elevationis_max_varis_min_varis_rate_varis_sum_varlist_available_variableslist_cachelist_cru_ts_variableslist_hadex3_indiceslist_imd_datasetsListAvailableVariablesListCRUTSVariablesListHadEX3Indicesmax_varsmean_radiant_temperaturemin_varsndbindvipopulate_sample_cachePopulateSampleCacheprint_timing_summaryprocess_imd_filesrate_varsread_cdsapircread_imd_rainfallread_imd_temperaturerelative_humidity_from_dewpointsearch_variableSearchVariablesetup_cds_credentialsSetupCdsCredentialsshow_cache_infoShowCacheInfosum_varstime_operationutciutci_categoryutci_sparsevapor_pressure_from_dewpointvisualize_grid_overlapwarm_nightswbgtwbgt_from_dewpointwbgt_liljegrenwbgt_risk_categorywbgt_shadewbgt_simplewet_bulb_from_dewpointwet_bulb_temperature

Dependencies:abindaskpasscachemclassclassIntclicpp11curldata.tableDBIdigestdplyre1071ecmwfrfastmapfilelockgenericsgetPassgluehttrjsonliteKernSmoothkeyringlifecyclelubridatemagrittrmemoisemimencdf4opensslpillarpkgconfigproxyR6Rcpprlangrstudioapis2sfstarssysterratibbletidyselecttimechangeunitsutf8vctrswithrwkyaml

Country-level temperature trends
Download data | Seasonal heatmap | Monthly trend lines with min/max ribbon | Diurnal range | Regional comparison

Last update: 2026-10-12
Started: 2026-03-22

Quickstart guide
ERA5 data | Bounding box | GeoJSON region | Point location | IMD data | Rainfall | Temperature | Variable discovery | Cache management

Last update: 2026-05-31
Started: 2026-01-25

Readme and manuals

Help Manual

Help pageTopics
Aggregate data by temporal frequencyaggregate_by_frequency
Aggregate IMD data by temporal frequencyaggregate_imd_by_frequency
Aggregate gridded data to polygon regionsaggregate_to_polygons
Get cache statisticscache_stats
Calculate all heat stress indicescalc_heat_indices
Categorize variables by aggregation methodcategorize_variables
Check grid coverage statistics for polygonscheck_grid_coverage
Check system readiness for varunayan operationsCheckSystemReadiness check_system_readiness
Clean up temporary files matching patterncleanup_temp_files
Clear all timing dataclear_timings
Clear cacheClearCache clear_cache
Combine multiple NetCDF files into single data.framecombine_netcdf_files
Compare multiple gridscompare_grids
Convert data to GeoJSON formatconvert_to_geojson
Create GeoJSON from bounding box coordinatescreate_geojson_from_bbox
Create temporary GeoJSON filecreate_temp_geojson_file
Apply temporal chunking for large date rangescreate_temporal_chunks
CRU TS Gridded Climate Dataset.CRU_TS_VERSION cru_ts
Download CRU TS climate data for a bounding boxCRUTSBbox cru_ts_bbox
Download CRU TS climate data for a GeoJSON regionCRUTSGeojson cru_ts_geojson
Describe ERA5 variables in detailDescribeVariables describe_variables
Download ERA5 pressure-level data using ecmwfrdownload_era5_pressure
Download ERA5 single-level data using ecmwfrdownload_era5_single
Download IMD gridded rainfall datadownload_imd_rainfall
Download IMD gridded temperature datadownload_imd_temperature
Create output directory if it doesn't existensure_output_dir
Download and process ERA5 data for a bounding boxERA5ifyBbox era5ify_bbox
Download and process ERA5 data for a point locationERA5ifyPoint era5ify_point
Excess Heat Factorexcess_heat_factor
Columns to exclude from aggregationexclude_cols
Heat exposure indicatorsexposure_indicators
Extract data for specific point location (nearest neighbor)extract_point_data
Filter data.frame by GeoJSON polygonfilter_dataframe_by_geojson
Filter IMD data by spatial boundariesfilter_imd_by_bbox
Filter IMD data by GeoJSON polygonfilter_imd_by_geojson
Filter NetCDF data by spatial boundaries (bounding box)filter_netcdf_by_bbox
Filter NetCDF data by GeoJSON polygonfilter_netcdf_by_geojson
Format date range for CDS API requestsformat_date_range
Convert pressure levels to character format required by CDS APIformat_pressure_levels
Get available dataset typesget_available_datasets
Get bounding box from sf objectget_bbox_from_sf
Get CDS API credentials from multiple sourcesget_cds_credentials
Get IMD grid specificationsget_imd_grid_specs
Get all valid pressure-level variable namesget_pressure_level_variable_names
Get pressure-level variables datasetget_pressure_level_variables
Get all valid single-level variable namesget_single_level_variable_names
Get single-level variables datasetget_single_level_variables
Get time values based on frequencyget_time_values
Get all recorded timingsget_timings
Get standard pressure levels available in ERA5GetAvailablePressureLevels get_available_pressure_levels
Get cache directory pathGetCacheDir get_cache_dir
Get ERA5 country-level temperature dataGetERA5CountryTemperature get_era5_country_temperature
Download daily ERA5 climate dataGetERA5DailyClimate get_era5_daily_climate
Download ERA5 data and calculate heat stress indicesGetERA5DailyHeatData GetERA5DailyHeatIndexData get_era5_daily_heat_data get_era5_daily_heat_index_data
Download daily ERA5 humidity dataGetERA5DailyHumidity get_era5_daily_humidity
Download daily ERA5 temperature dataGetERA5DailyTemperature get_era5_daily_temperature
Download daily ERA5 wet bulb temperature dataGetERA5DailyWetBulb get_era5_daily_wet_bulb
Download daily ERA5 wind dataGetERA5DailyWind get_era5_daily_wind
Get monthly ERA5 heat stress index dataGetERA5MonthlyHeatData GetERA5MonthlyHeatIndexData get_era5_monthly_heat_data get_era5_monthly_heat_index_data
Get package version informationGetPackageInfo get_package_info
HadEX3 Climate Extremes Dataset.HADEX3_ANNUAL_INDICES hadex3
Download HadEX3 climate extremes data for a bounding boxHadEX3Bbox hadex3_bbox
Download HadEX3 climate extremes data for a GeoJSON regionHadEX3Geojson hadex3_geojson
Calculate heat index (apparent temperature)heat_index
Calculate heat index from dewpointheat_index_from_dewpoint
Heat index risk categoriesheat_index_risk_category
heat stress index calculationsheat_stress
Heatwave daysheatwave_days
Calculate humidex (Canadian heat index)humidex
Download IMD temperature aggregated per GeoJSON feature (region x time)imd_temperature_by_region
IMD heatwave terrain class of a locationimd_terrain
IMD heat exposure indicators for a bounding boxIMDExposureBbox imd_exposure_bbox
Download and process IMD rainfall data for a bounding boxIMDRainfallBbox imd_rainfall_bbox
Download and process IMD rainfall data for a GeoJSON regionIMDRainfallGeojson imd_rainfall_geojson
Download and process IMD rainfall for a single point (nearest grid cell)IMDRainfallPoint imd_rainfall_point
IMD weather stations with coordinatesIMDStations imd_stations
Download and process IMD temperature data for a bounding boxIMDTemperatureBbox imd_temperature_bbox
Download and process IMD temperature data for a GeoJSON regionIMDTemperatureGeojson imd_temperature_geojson
Elevation of locations in Indiaindia_elevation
Check if a variable should use maximumis_max_var
Check if a variable should use minimumis_min_var
Check if a variable is a rate variableis_rate_var
Check if a variable should be summedis_sum_var
Check if data is valid GeoJSONis_valid_geojson
List cached fileslist_cache
List available IMD datasetslist_imd_datasets
List all available variables for a dataset typeListAvailableVariables list_available_variables
Variable data dictionary for CRU TSListCRUTSVariables list_cru_ts_variables
List available HadEX3 ETCCDI indicesListHadEX3Indices list_hadex3_indices
Variables that should use maximum aggregationmax_vars
Estimate mean radiant temperaturemean_radiant_temperature
Variables that should use minimum aggregationmin_vars
Normalized Difference Built-up Indexndbi
Normalized Difference Vegetation Indexndvi
Parse date string flexiblyparse_date_flexible
Populate cache with sample IMD dataPopulateSampleCache populate_sample_cache
Print timing summaryprint_timing_summary
Process multiple IMD filesprocess_imd_files
Process NetCDF file and extract data as data.frameprocess_netcdf_to_dataframe
Rate variables that should be averagedrate_vars
Read CDS API credentials from ~/.cdsapirc fileread_cdsapirc
Read IMD NetCDF rainfall fileread_imd_rainfall
Read IMD binary temperature fileread_imd_temperature
Calculate relative humidity from temperature and dewpointrelative_humidity_from_dewpoint
Search for ERA5 variables by keywordSearchVariable search_variable
Set up CDS credentials for ERA5 data accessSetupCdsCredentials setup_cds_credentials
Show cache contents and statisticsShowCacheInfo show_cache_info
Variables that should be summed over timesum_vars
Time an operation and log the durationtime_operation
Calculate UTCI (Universal Thermal Climate Index)utci
UTCI thermal stress categoriesutci_category
Calculate UTCI using sparse regression approximationutci_sparse
Validate bounding box coordinatesvalidate_bbox
Validate geographic coordinatesvalidate_coordinates
Validate ERA5 variable namesvalidate_era5_variables
Calculate vapor pressure from dewpoint temperaturevapor_pressure_from_dewpoint
ERA5 variable aggregation rulesvariable_lists
PascalCase AliasesERA5ifyGeojson era5ify_geojson varunayan-aliases
Utility functions for Varunayan R packagevarunayan-utils
Visualize grid-polygon overlapvisualize_grid_overlap
Warm nightswarm_nights
Wet Bulb Globe Temperaturewbgt
Calculate WBGT from dewpointwbgt_from_dewpoint
Outdoor Wet Bulb Globe Temperature (Liljegren method)wbgt_liljegren
heat stress risk categorieswbgt_risk_category
Calculate shade/indoor Wet Bulb Globe Temperature (ISO 7243)wbgt_shade
Calculate WBGT (Wet Bulb Globe Temperature)wbgt_simple
Calculate wet bulb temperature from dewpointwet_bulb_from_dewpoint
Calculate wet bulb temperaturewet_bulb_temperature