TCHazaRdsWindField: Compute the Wind and Pressure Spatial Hazards Field...

View source: R/WindHazaRds.R

TCHazaRdsWindFieldR Documentation

Compute the Wind and Pressure Spatial Hazards Field Associated with TCs Single Time Step.

Description

Compute the Wind and Pressure Spatial Hazards Field Associated with TCs Single Time Step.

Usage

TCHazaRdsWindField(
  GEO_land,
  TC,
  paramsTable,
  return_vars = c("Pr", "Uw", "Vw", "Sw", "Dw", "R", "lam"),
  returnWaves = NULL
)

Arguments

GEO_land

SpatVector or dataframe hazard geometry generated with land_geometry

TC

SpatVector or data.frame of Tropical cyclone track parameters for a single time step.

paramsTable

Global parameters to compute TC Hazards.

return_vars

character(). Variables to return. Default: core winds/pressure. Options: c("Pr","Uw","Vw","Sw","Dw","R","lam","Ww","Hs0","Tp0","Dp0")

returnWaves

DEPRECATED. Use return_vars including 'Hs0','Tp0','Dp0' instead

Value

SpatRaster with the following attributes

abbreviated variable description units
P Atmospheric pressure hPa
Uw Meridional wind speed m/s
Vw Zonal wind speed m/s
Ww Vertical wind speed m/s
Sw Wind speed m/s
Dw The direction from which wind originates deg clockwise from true north
Hs0 Deep water significant wave height m
Tp0 Deep water Peak wave period s
Dp0 The peak direction in which wave are heading deg clockwise from true north
R The radial distance to the TC centre km
lam The radial direction to the TC centre deg

Examples

require(terra)
dem <- rast(system.file("extdata/DEMs/YASI_dem.tif", package="TCHazaRds"))
land <- dem; land[land > 0] = 0
inland_proximity = distance(land,target = 0)
GEO_land = land_geometry(dem,inland_proximity)

TCi = vect(cbind(c(154,154),c(-26.1,-26)),"lines",crs="epsg:4283") #track line segment
TCi$PRES = 950
TCi$RMAX = 40
TCi$VMAX = 60
TCi$B = 1.4
TCi$ISO_TIME = "2022-10-04 20:00:00"
TCi$LON = geom(TCi)[1,3]
TCi$LAT = geom(TCi)[1,4]
TCi$STORM_SPD = perim(TCi)/(3*3600) #m/s
TCi$thetaFm = 90-returnBearing(TCi)
#OR
TC <- vect(system.file("extdata/YASI/YASI.shp", package="TCHazaRds"))
TC$PRES <- TC$BOM_PRES
TCi = TC[47]
plot(dem);lines(TCi,lwd = 4,col=2)

paramsTable = read.csv(system.file("extdata/tuningParams/defult_params.csv",package = "TCHazaRds"))
#calculate the wind hazard
HAZ = TCHazaRdsWindField(GEO_land,TCi,paramsTable)
plot(HAZ)

#require(rasterVis) #pretty spatial vector plot
#ats = seq(0, 80, length=9)
#UV = as(c(HAZ["Uw"],HAZ["Vw"]),"Raster") #need to convert back to raster
#vectorplot(UV, isField='dXY', col.arrows='white', aspX=0.002,aspY=0.002,at=ats ,
#colorkey=list( at=ats), par.settings=viridisTheme)


TCHazaRds documentation built on Aug. 25, 2025, 9:50 a.m.