fdbk_dt_uv2drc: Calculate wind direction from u and v wind components in a...

Description Usage Arguments Value Author(s) Examples

View source: R/fdbk_asdataframe.R

Description

Calculate wind direction from u and v wind components in a data.table

Usage

1
fdbk_dt_uv2drc(DATATABLE, col = c("obs", "veri_data"))

Arguments

DATATABLE

data table containing the columns "varno" with elements 3 and 4, and e.g. "obs", "obs_ini", "veri_data" or combinations of it

fcst

forecast vector

Value

data.table with same columns as DATATABLE and varno=111

Author(s)

Felix <[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fnames   = system("ls ~/examplesRfdbk/icon/synop/*",intern=T)[1:5]
cond     = list(obs                = "!is.na(obs)",
                veri_run_class     = "veri_run_class%in%c(0,2)",
                veri_run_type      = "veri_run_type%in%c(0,4)",
                state              = "state%in%c(0,1,5)",
                statid             = "!is.na(as.numeric(statid))",
                statid             = "!duplicated(statid)",
                varno              = "varno%in%c(3,4)")
colnames  = c("obs","veri_data","veri_forecast_time","veri_initial_date","lat","lon","varno","veri_model","statid","z_station")
DT        = fdbk_dt_multi_large(fnames,cond,colnames,cores=5)
DRC       = fdbk_dt_uv2drc(DT)  
.rbind.data.table(DT,DRC)

rfxf/Rfdbk documentation built on Dec. 17, 2018, 9:14 a.m.