GetERA5MonthlyHeatIndexData: Get monthly ERA5 heat stress index data

View source: R/heat_stress.R

GetERA5MonthlyHeatIndexDataR Documentation

Get monthly ERA5 heat stress index data

Description

This function downloads ERA5 heat stress indices and aggregates them to the specified month.

Usage

GetERA5MonthlyHeatIndexData(
  request_id,
  year,
  month,
  json_file = NULL,
  north = NULL,
  south = NULL,
  east = NULL,
  west = NULL,
  solar_load = FALSE,
  resolution = 0.25,
  use_cache = TRUE,
  verbose = FALSE
)

get_era5_monthly_heat_index_data(
  request_id,
  year,
  month,
  json_file = NULL,
  north = NULL,
  south = NULL,
  east = NULL,
  west = NULL,
  solar_load = FALSE,
  resolution = 0.25,
  use_cache = TRUE,
  verbose = FALSE
)

GetERA5MonthlyHeatData(
  request_id,
  year,
  month,
  json_file = NULL,
  north = NULL,
  south = NULL,
  east = NULL,
  west = NULL,
  solar_load = FALSE,
  resolution = 0.25,
  use_cache = TRUE,
  verbose = FALSE
)

get_era5_monthly_heat_data(
  request_id,
  year,
  month,
  json_file = NULL,
  north = NULL,
  south = NULL,
  east = NULL,
  west = NULL,
  solar_load = FALSE,
  resolution = 0.25,
  use_cache = TRUE,
  verbose = FALSE
)

Arguments

request_id

Unique identifier for the data request

year

Year (for example, 2023)

month

Month (1-12)

json_file

Path to the GeoJSON file that defines the region

north, south, east, west

Bounding box coordinates (alternative to json_file)

solar_load

If TRUE, include solar radiation (default: FALSE)

resolution

Spatial resolution in degrees (default: 0.25)

use_cache

If TRUE, the function uses cached data (default: TRUE)

verbose

If TRUE, the function prints progress messages (default: FALSE)

Value

A data.frame with one row per grid point for the requested month: year, month, latitude, longitude, monthly means of the daily heat stress variables, and the categorical columns wbgt_risk, heat_index_risk and utci_stress.

Examples


region <- system.file("extdata", "region.geojson", package = "varunayan")
heat_may <- GetERA5MonthlyHeatIndexData(
  request_id = "india_may2023",
  year = 2023,
  month = 5,
  json_file = region
)


varunayan documentation built on Oct. 30, 2026, 1:07 a.m.