update_Track {TCHazaRds} | R Documentation |
Calculate Additional TC Parameters, and temporally Interpolate Along a Tropical Cyclone Track
Description
Calculate Additional TC Parameters, and temporally Interpolate Along a Tropical Cyclone Track
Usage
update_Track(
outdate = NULL,
indate,
TClons,
TClats,
vFms,
thetaFms,
cPs,
rMaxModel,
vMaxModel,
betaModel,
rMax2Model,
eP,
rho = NULL,
RMAX,
VMAX,
B,
RMAX2
)
Arguments
outdate |
POSIX times to be interpolated to |
indate |
POSIX input times |
TClons |
input central TC longitude |
TClats |
input central TC latitude |
vFms |
input forward velocity of TC |
thetaFms |
input forward direction |
cPs |
central pressure |
rMaxModel |
empirical model for radius of maximum wind calculation (rMax in km) |
vMaxModel |
empirical model for maximum wind velocity calculation (vMax in m/s) |
betaModel |
empirical model for TC shape parameter beta (dimensionless Beta) |
rMax2Model |
empirical model for radius of outer 17.5ms wind calculation (rMax2 in km) |
eP |
background environmental pressure (hPa) |
rho |
air density |
RMAX |
If params rMaxModel value is NA, use input TC$RMAX |
VMAX |
If params rMaxModel value is NA, use input TC$VMAX |
B |
If params rMaxModel value is NA, use input TC$B |
RMAX2 |
If params rMax2Model value is NA, use input TC$RMAX2 |
Value
list of track data inclining the rMax vMax and Beta.
Examples
paramsTable <- read.csv(system.file("extdata/tuningParams/defult_params.csv",package = "TCHazaRds"))
params <- array(paramsTable$value,dim = c(1,length(paramsTable$value)))
colnames(params) <- paramsTable$param
params <- data.frame(params)
require(terra)
TCi <- vect(system.file("extdata/YASI/YASI.shp", package="TCHazaRds"))
TCi$PRES <- TCi$BOM_PRES
TCi$RMAX <- TCi$BOM_RMW*1.852 #convert from nautical miles to km
TCi$VMAX <- TCi$BOM_WIND*1.94 #convert from knots to m/s
TCi$B <- 1.4
TCi$RMAX2 <- 150
t1 <- strptime("2011-02-01 09:00:00","%Y-%m-%d %H:%M:%S", tz = "UTC") #first date in POSIX format
t2 <- strptime(rev(TCi$ISO_TIME)[1],"%Y-%m-%d %H:%M:%S", tz = "UTC") #last date in POSIX format
outdate <- seq(t1,t2,"hour") #array sequence from t1 to t2 stepping by “hour”
# defult along track parameters are calculated
TCil = update_Track(outdate = outdate,
indate = strptime(TCi$ISO_TIME,"%Y-%m-%d %H:%M:%S", tz = "UTC"),
TClons = TCi$LON,
TClats = TCi$LAT,
vFms=TCi$STORM_SPD,
thetaFms=TCi$thetaFm,
cPs=TCi$PRES,
rMaxModel=params$rMaxModel,
vMaxModel=params$vMaxModel,
betaModel=params$betaModel,
rMax2Model = params$rMaxModel,
eP = params$eP,
rho = params$rhoa,
RMAX = TCi$RMAX,
VMAX = TCi$VMAX,
B = TCi$B,
RMAX2 = TCi$RMAX2
)
# 'observed' along tack parameters are calculated (#Model = NA)
TCil = update_Track(outdate = outdate,
indate = strptime(TCi$ISO_TIME,"%Y-%m-%d %H:%M:%S", tz = "UTC"),
TClons = TCi$LON,
TClats = TCi$LAT,
vFms=TCi$STORM_SPD,
thetaFms=TCi$thetaFm,
cPs=TCi$PRES,
rMaxModel=NA,
vMaxModel=NA,
betaModel=NA,
rMax2Model = NA,
eP = params$eP,
rho = params$rhoa,
RMAX = TCi$RMAX,
VMAX = TCi$VMAX,
B = TCi$B,
RMAX2 = TCi$RMAX2
)