/
Visualize_Snow_detection_TS_PAR.Rmd
46 lines (28 loc) · 2.34 KB
/
Visualize_Snow_detection_TS_PAR.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: "Visualize_Snow_detection_TS_PAR.R"
output: github_document
---
# Title: "Visualize_Snow_detection_TS_PAR.R"
## Introduction
The script Visualize_Snow_detection_TS_PAR.R in folder *inst* plot using dygraph the time series of snow height (HS) (if available) grey line with the classification of snow presence by models. Green represents snow presence period obtained by Soil Temperature (TS) and Photosynthetically active radiation (PAR), blue only PAR, red only TS
## Description of algorithm
* **Section 1:** in this section the algorithm load data of station selected in section **INPUT**
* **Section 2:** here the script calibrate snow height signal (if available) using an external file **Snow_Depth_Calibration_file.csv** in *data/Snow_Depth_Calibration/* filled with real snow surveys (field campaign) or virtual snow depth calibration (visual inspection of snow height signal are set as 0 cm at the end of winter season)
* **Section 3:** hte script plot time series of snow height (calibrated or not) and results of different snow detection models using dygraphs. We apply some checks to plot HS with or without calibration (select in **INPUT**) and to avoid problems if the snow height sensor is not installed on the station selected.
## Plot description
On the plot we can see:
* **Plot1:** Snow detection results of algorithm *Snow_detection_TS_PAR.R*. Different values for different models are only for visualization. The output are 0 -> no snow , 1 -> snow for each models. ([more details](https://github.com/EURAC-Ecohydro/SnowSeasonAnalysis/tree/master/vignettes/Snow_detection_TS_PAR.Rmd)):
+ *HS:* grey
+ *Snow detection using TS+PAR:* green
+ *Snow detection using TS:* red
+ *Snow detection using PAR:* blue
* **Example**
![](https://github.com/EURAC-Ecohydro/SnowSeasonAnalysis/blob/master/figs/img_Snow_detection.PNG)
## How to use
Open script *Visualize_Snow_detection_TS_PAR.R* and:
1. Select **file**, the name of station to examine (**without .csv**)
2. Set **git folder**, the path where the package is download or used.
3. Set **calib_snow** = T if you want to show snow height in dygraphs plot calibrated with snow depth calibration, or F if you don't need calibration
4. Run **Section 1** to import data
5. Run **Section 2** to calibrate snow height
6. Run **Section 2** to visualize results using dygraphs