as_harp_parameter: Create a harp parameter

View source: R/as_harp_parameter.R

as_harp_parameterR Documentation

Create a harp parameter

Description

harp includes a number of built in parameters, but you may wish to read other parameters. To do this you need to create a harp parameter.

Usage

as_harp_parameter(
  fullname,
  basename,
  level = 0,
  level_type = c("unknown", "height", "msl", "surf", "pressure", "model"),
  accum = 0,
  accum_unit = NULL
)

Arguments

fullname

The full name of the parameter

basename

The basename of the parameter. This is typically the fullname excluding accumulation time and vertical level infotmation from the parameter name and forms the basis of the parameter name that is searched for in files. For example, for reading parameters from grib files the basename should be exactly the same as the grib shortName.

level

The vertical level of the parameter. For grib files, this is ignored if the basename begins with a number, or mx or mn followed by a number.

level_type

The type of vertical level. Can be one of "unknown", "height", "msl", "surf", "pressure", or "model".

accum

The accumulation time in seconds

accum_unit

The unit of accumulation to be used when searching files.

Value

A harp paramater

Examples

# maximum 2m temperature in last 6 hours
as_harp_parameter("mx2t6")
# potential vorticity at 500 hPa
as_harp_parameter("pv500", "pv", level = 500, level_type = "pressure")

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