Reads a NetCDF file containing a hazard variable on a spatial grid (regular or rotated) and returns an `hm_hazard` object.
Details
Supports CF-convention NetCDF files with regular grids (e.g. Copernicus,
ERA5) and rotated or curvilinear grids (e.g. EURO-CORDEX). Coordinate
names lat/lon and latitude/longitude are
detected automatically.
Examples
f <- system.file("extdata", "Copernicus_dailymax_1994_2021.nc",
package = "HazardMaps")
x <- hm_read_netcdf(f, var = "i10fg")
x$meta$grid_type
#> [1] "regular"
