diff --git a/DESCRIPTION b/DESCRIPTION index c0c8c24e..2d27e13c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: OBIC Type: Package Title: Calculate the Open Bodem Index (OBI) Score -Version: 2.0.3 +Version: 2.0.4 Authors@R: c( person("Sven", "Verweij", email = "sven.verweij@nmi-agro.nl", role = c("aut","cre")), person("Gerard", "Ros", email = "gerard.ros@nmi-agro.nl", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 843f136e..27753e93 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# OBIC 2.0.4 2023-01-11 +### Fixed +* Fixes calculation of `field capacity` at `calc_waterretention` + # OBIC 2.0.3 2023-01-11 ### Fixed * Fixes plotting of regime curve in workabilty vignette #149 diff --git a/R/waterretention.R b/R/waterretention.R index d5e138ce..7b2ed03a 100644 --- a/R/waterretention.R +++ b/R/waterretention.R @@ -89,7 +89,7 @@ calc_waterretention <- function(A_CLAY_MI,A_SAND_MI,A_SILT_MI,A_SOM_LOI, # convert from % to mm (wp) and mm (fc) dt[,wp := wp * p.depth * 1000] - dt[,fc := wp * p.depth * 1000] + dt[,fc := fc * p.depth * 1000] # select Water Retention index if(type=='wilting point'){dt[,value := wp]}