diff --git a/articles/cwd_example.html b/articles/cwd_example.html index 36985fd..e690ad4 100644 --- a/articles/cwd_example.html +++ b/articles/cwd_example.html @@ -91,9 +91,9 @@

Cumulative water deficit example

Beni Stocker

-

2024-11-30

+

2024-12-05

- Source: vignettes/cwd_example.Rmd + Source: vignettes/cwd_example.Rmd @@ -106,7 +106,7 @@

2024-11-30

library(here) library(lubridate) library(patchwork) -library(extRemes) +library(extRemes) library(ggplot2) library(cwd)

This demonstrates the workflow for determining cumulative water diff --git a/articles/potential_cwd.html b/articles/potential_cwd.html index 2c746eb..6c8a1f8 100644 --- a/articles/potential_cwd.html +++ b/articles/potential_cwd.html @@ -91,9 +91,9 @@

Potential cumulative water deficit

Beni Stocker

-

2024-11-30

+

2024-12-05

- Source: vignettes/potential_cwd.Rmd + Source: vignettes/potential_cwd.Rmd @@ -107,7 +107,7 @@

2024-11-30

library(here) library(lubridate) library(patchwork) -library(extRemes) +library(extRemes) library(ggplot2) library(cwd) library(visdat) @@ -274,11 +274,38 @@

Cumulating PET - P
 # determine the day-of-year of the first day of the month after the wettest month
 doy_reset <- lubridate::yday(lubridate::ymd("2000-11-01") + lubridate::dmonths(1))
+

Distribution of daily precipitation and PET to aid choosing an +absolute threshold (threshold_terminate_absolute) +determining the end of a CWD event (see next).

+
+df |> 
+  ggplot(aes(P_F, after_stat(density))) +
+  geom_density(bw = 1) + 
+  xlim(-1, 30)
+
## Warning: Removed 110 rows containing non-finite outside the scale range
+## (`stat_density()`).
+

+
+df |> 
+  ggplot(aes(pet, after_stat(density))) +
+  geom_density(bw = 1) + 
+  xlim(-1, 30)
+
## Warning: Removed 7 rows containing non-finite outside the scale range
+## (`stat_density()`).
+

Get the potential cumulative water deficit time series and individual events. Note that we use the argument doy_reset here to force a re-setting of the potential cumulative water deficit on -that same day each year.

-
+that same day each year. A relative and an absolute option are possible
+for determining the threshold to which a CWD has to be reduced to to
+terminate the event: 1) threshold_terminate: Set the
+threshold relative to maximum CWD attained. Defaults to 0, meaning that
+the CWD has to be fully compensated by water infiltration into the soil
+to terminate a CWD event. 2) threshold_terminate_absolute:
+threshold determining end of event as thresh_terminate but
+in absolute terms (in mm d-1). Default set to NA. If no
+option is given, the function defaults to the relative threshold.

+

Retain only events of a minimum length of 20 days.

-
+
 

Plot the potential cumulative water deficit time series and events.

-
+
 ggplot() +
   geom_rect(
     data = out_cwd$inst,
-    aes(xmin = date_start, xmax = date_end, ymin = 0, ymax = max( out_cwd$df$deficit)),
+    aes(xmin = date_start, xmax = date_end, ymin = 0, ymax = max( out_cwd$df$deficit)), 
     fill = rgb(0,0,0,0.3),
     color = NA) +
   geom_line(data  =  out_cwd$df, aes(TIMESTAMP, deficit), color = "tomato") +
   theme_classic() +
-  ylim(0, max( out_cwd$df$deficit)) +
+  ylim(0, max(out_cwd$df$deficit)) + 
   labs(
     x = "Date", 
     y = "Potential cumulative water deficit (mm)"
     )
-

+

References diff --git a/articles/potential_cwd_files/figure-html/unnamed-chunk-11-1.png b/articles/potential_cwd_files/figure-html/unnamed-chunk-11-1.png new file mode 100644 index 0000000..a17f6aa Binary files /dev/null and b/articles/potential_cwd_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/potential_cwd_files/figure-html/unnamed-chunk-11-2.png b/articles/potential_cwd_files/figure-html/unnamed-chunk-11-2.png new file mode 100644 index 0000000..b1dfb16 Binary files /dev/null and b/articles/potential_cwd_files/figure-html/unnamed-chunk-11-2.png differ diff --git a/articles/potential_cwd_files/figure-html/unnamed-chunk-14-1.png b/articles/potential_cwd_files/figure-html/unnamed-chunk-14-1.png new file mode 100644 index 0000000..8454e01 Binary files /dev/null and b/articles/potential_cwd_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/authors.html b/authors.html index 56639a8..bf65566 100644 --- a/authors.html +++ b/authors.html @@ -71,7 +71,7 @@

Authors and Citation

Citation

- Source: DESCRIPTION + Source: DESCRIPTION
diff --git a/pkgdown.yml b/pkgdown.yml index 19e9ee6..de2ea78 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,4 +4,4 @@ pkgdown_sha: ~ articles: cwd_example: cwd_example.html potential_cwd: potential_cwd.html -last_built: 2024-11-30T08:22Z +last_built: 2024-12-05T14:46Z diff --git a/reference/calc_density_h2o.html b/reference/calc_density_h2o.html index 707244e..e68a004 100644 --- a/reference/calc_density_h2o.html +++ b/reference/calc_density_h2o.html @@ -60,7 +60,7 @@
diff --git a/reference/calc_enthalpy_vap.html b/reference/calc_enthalpy_vap.html index 17cd71b..499505f 100644 --- a/reference/calc_enthalpy_vap.html +++ b/reference/calc_enthalpy_vap.html @@ -69,7 +69,7 @@
diff --git a/reference/cwd.html b/reference/cwd.html index 3bb703c..8d1594e 100644 --- a/reference/cwd.html +++ b/reference/cwd.html @@ -63,7 +63,7 @@
diff --git a/reference/pet.html b/reference/pet.html index acec969..ee3a189 100644 --- a/reference/pet.html +++ b/reference/pet.html @@ -60,7 +60,7 @@
diff --git a/reference/simulate_snow.html b/reference/simulate_snow.html index 33478b4..82d135d 100644 --- a/reference/simulate_snow.html +++ b/reference/simulate_snow.html @@ -60,7 +60,7 @@