mc_calc_snow_agg {myClim}R Documentation

Summary of TRUE/FALSE snow sensor

Description

This function works with the virtual snow sensor of TRUE/FALSE which is the output of mc_calc_snow(). So, before calling mc_calc_snow_agg you need to calculate or import mc_read_ TRUE/FALSE snow sensor. mc_calc_snow_agg returns the summary table of snow sensor (e.g number of days with snow cover, first and last date of continual snow cover longer than input period). The snow summary is returned for whole date range provided. And is returned as new data.frame in contrast with other mc_calc functions returning virtual sensors.

Usage

mc_calc_snow_agg(
  data,
  snow_sensor = "snow",
  localities = NULL,
  period = 3,
  use_utc = FALSE
)

Arguments

data

cleaned myClim object see myClim-package with TRUE/FALSE snow sensor see mc_calc_snow()

snow_sensor

name of snow sensor containing TRUE/FALS snow detection, suitable for virtual sensors created by function mc_calc_snow; (default "snow")

localities

optional subset of localities where to run the function (list of locality_ids); if NULL then return all localities (default NULL)

period

number of days defining the continual snow cover period of interest (default 3 days)

use_utc

if set FALSE then time is shifted based on offset provided in locality metadata tz_offset, see e.g. mc_prep_solar_tz(), mc_prep_meta_locality(); (default FALSE)

Details

Primary designed for virtual snow sensor calculated by mc_calc_snow(), but accepts any sensor with TRUE/FLAST snow event detection. If snow_sensor on the locality is missing, then locality is skipped.

Value

Returns data.frame with columns:

Examples

data <- mc_calc_snow(mc_data_example_agg, "TMS_T2", output_sensor="TMS_T2_snow",
                     localities = c("A2E32", "A6W79"))
mc_calc_snow_agg(data, "TMS_T2_snow")

[Package myClim version 1.1.0 Index]