fmi_opendata_translate_oldElementCodes: translate MET Norway oldElementCodes into FMI API standards

fmi_opendata_translate_oldElementCodesR Documentation

translate MET Norway oldElementCodes into FMI API standards

Description

Translate oldElementCodes into FMI API standards https://data.fmi.fi and viceversa. oldElementCodes reference is https://frost.met.no/elementtable.

Usage

fmi_opendata_translate_oldElementCodes<-function(oldElementCodes=NULL,
                                                 fmi_parameterId=NULL)

Arguments

oldElementCodes

character vector with the abbreviations used to define weather and climate elements (before Frost-era). The abbreviations are listed at https://frost.met.no/elementtable.

fmi_parameterId

charater vector specifying the FMI API parameters. Allowed values for hourly variables are: 'r_1h', 't2m', 'ws_10min', 'p_sea', 'wd_10min', 'wg_10min', 'rh'. Allowed values for daily variables are: 'rrday', 'tday', 'tmin', 'tmax'.

Details

In case an abbreviations is not yet implemented in gibson then the elementId character string is set to "".

oldElementCodes and fmi_parameterId cannot be both not null objects. If oldElementCodes is not null then translate the MET Norway element code into the FMI API. If fmi_parameterId is not null then translate the FMI API element name into the MET Norway element code.

Value

A character vector with the same number of elements as the number of elements in the input vector.

Author(s)

Cristian Lussana

See Also

gibson_frost frost_assembler

Examples


# load libraries
library(gibson)
#
out<-fmi_opendata_translate_oldElementCodes(c("TA","RR_1","TAMRR"))
out


metno/gibson documentation built on Feb. 12, 2024, 7:25 a.m.