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 @@
vignettes/cwd_example.Rmd
+ Source: vignettes/cwd_example.Rmd
cwd_example.Rmd
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 @@
vignettes/potential_cwd.Rmd
+ Source: vignettes/potential_cwd.Rmd
potential_cwd.Rmd
# 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 asthresh_terminate
but +in absolute terms (in mm d-1). Default set toNA
. If no +option is given, the function defaults to the relative threshold. +df <- df |> mutate(pwbal = P_F - pet) @@ -286,31 +313,31 @@
Cumulating PET - P df, varname_wbal = "pwbal", varname_date = "TIMESTAMP", - thresh_terminate = 0.0, - thresh_drop = 0.0, - doy_reset = doy_reset + #thresh_terminate = 0, + #thresh_terminate_absolute = 10.0, + #thresh_drop = 0.0 )
Retain only events of a minimum length of 20 days.
-+out_cwd$inst <- out_cwd$inst |> filter(len >= 20)
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
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 @@Enthalpy of vaporisation
- Source:R/calc_enthalpy_vap.R
+ Source:R/calc_enthalpy_vap.R
calc_enthalpy_vap.Rd
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 @@