parse_harp_parameter: Parse the parameter name and decide on level, accumulation...

View source: R/parse_harp_parameter.R

parse_harp_parameterR Documentation

Parse the parameter name and decide on level, accumulation...

Description

Parses a harp-style parameter name and returns accumulation time, level (if any) and the base name of the parameter

Usage

parse_harp_parameter(
  param,
  vertical_coordinate = c(NA_character_, "pressure", "model", "height", "isotherm",
    "unknown")
)

Arguments

param

Parameter name - available names can be found from show_param_defs.

vertical_coordinate

If the parameter is for the upper air, the vertical coordinate system must be given. Can be "pressure" for pressure levels, "model" for model levels or "height" for altitude levels.

Value

A list (of class harp_parameter) with fullname, basename, level_type, level, accum

Examples

parse_harp_parameter("AccPcp1h")
parse_harp_parameter("z500")
parse_harp_parameter("s100m")
parse_harp_parameter("T", vertical_coordinate = "pressure")
parse_harp_parameter("S", vertical_coordinate = "model")
parse_harp_parameter("RH", vertical_coordinate = "height")

andrew-MET/harpIO documentation built on March 7, 2024, 7:48 p.m.