Learn R Programming

TCHazaRds (version 1.1.2)

TCvectInterp: Temporally Interpolate Along a Tropical Cyclone Track And Compute Along-Track Parameters

Description

Temporally Interpolate Along a Tropical Cyclone Track And Compute Along-Track Parameters

Usage

TCvectInterp(outdate = NULL, TC, paramsTable)

Value

SpatVector of Tropical cyclone track parameters

Arguments

outdate

POSIX times to be interpolated to. The output date in "YYYY-MM-DD" format. Default is NULL.

TC

SpatVector of Tropical cyclone track parameters

paramsTable

Global parameters to compute TC Hazards.

Examples

Run this code
require(terra)
TCi <- vect(system.file("extdata/YASI/YASI.shp", package="TCHazaRds"))
TCi$PRES <- TCi$BOM_PRES
TCi$PRES[is.na(TCi$PRES)] = 1010
outdate = seq(strptime(TCi$ISO_TIME[1],"%Y-%m-%d %H:%M:%S",tz="UTC"),
strptime(rev(TCi$ISO_TIME)[1],"%Y-%m-%d %H:%M:%S",tz="UTC"),3600)
paramsTable = read.csv(system.file("extdata/tuningParams/defult_params.csv",package = "TCHazaRds"))
TCii = TCvectInterp(outdate = outdate,TC=TCi,paramsTable = paramsTable)

Run the code above in your browser using DataLab