Skip to contents

Assess the class of a station from the type of surrounding slope, sheltering and obstacles as potential of reducing or increasing catching precipitation in a rain gauge and using the requirements set by WMO and Met

Usage

compute_class_precipitation(
  stn = NULL,
  horizon = NULL,
  dem = NULL,
  test_type = "MET",
  f_plot = TRUE
)

Arguments

stn

A SpatVector with station attributes from "get_latlon_frost"

horizon

A data.frame with horizon distribution from "compute_horizon_max"

dem

A SpatRaster terrain model

test_type

A string defining a type of tests to apply: "WMO" or "MET"

f_plot

A boolean whether to plot figures

Value

A class

Examples

# Get station metadata
# stn <- get_metadata_frost(stationid = 18700, dx = 100, resx = 1)

# Compute maximum horizon
# horizon_max <- compute_horizon_max(stn, step = 1, f_plot_polygon = FALSE)

# Load a digital elevation model
# dem   <- download_dem_kartverket(stn, name = "dtm")

# Compute class
# compute_class_precipitation(stn,
#                             horizon_max,
#                             test_type = "WMO",
#                             f_plot = TRUE)