extract_land_clim: Produces hourly data of ERA5-Land for a single location

View source: R/extract_land_clim.R

extract_land_climR Documentation

Produces hourly data of ERA5-Land for a single location

Description

'extract_clim' takes an nc file containing hourly ERA5-Land climate data, and for a given set of coordinates, produces an (optionally) inverse distance weighted mean of each variable.

Usage

extract_land_clim(nc, long, lat, start_time, end_time, d_weight = TRUE)

Arguments

nc

character vector containing the path to the nc file. Use the 'build_era5_land_request' and 'request_era5' functions to acquire an nc file with the correct set of variables. Data within nc file must span the period defined by start_time and end_time.

long

longitude of the location for which data are required (decimal degrees, -ve west of Greenwich Meridian).

lat

latitude of the location for which data are required (decimal degrees, -ve south of the equator).

start_time

a POSIXlt or POSIXct object indicating the first day or hour for which data are required. Encouraged to specify desired timezone as UTC (ERA5 data are in UTC by default), but any timezone is accepted.

end_time

a POSIXlt or POSIXct object indicating the last day or hour for which data are required. Encouraged to specify desired timezone as UTC (ERA5 data are in UTC by default), but any timezone is accepted.

d_weight

logical value indicating whether to apply inverse distance weighting using the 4 closest neighbouring points to the location defined by 'long' and 'lat'. Default = 'TRUE'.

Value

a data frame containing hourly values for a suite of climate variables:

'obs_time' | the date-time (timezone specified in col timezone)

'temperature' | (degrees celsius)

'humidity' | specific humidity (kg / kg)

'pressure' | (Pa)

'windspeed' | (m / s)

'winddir' | wind direction, azimuth (degrees from north)

'szenith' | Solar zenith angle (degrees from a horizontal plane)

'timezone' | (unitless)


everydayduffy/mcera5 documentation built on Feb. 15, 2025, 11:33 p.m.