From 32bfde5a3d21b46c50920f10a573b4c4dca32a92 Mon Sep 17 00:00:00 2001 From: Nils Kehrein Date: Sat, 22 Apr 2023 18:33:03 +0200 Subject: [PATCH] Minor changes to lemna.c to avoid compiler warnings, update to v1.0.1 --- DESCRIPTION | 4 ++-- NEWS.md | 6 +++++- man/effect.Rd | 6 +++--- man/lemna.Rd | 6 +++--- man/param_defaults.Rd | 4 ++-- src/lemna.c | 10 +++++----- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c2b0065..a112d11 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: lemna Title: Lemna Ecotox Effect Model -Version: 1.0.0 +Version: 1.0.1 Authors@R: c( person("Nils", "Kehrein", , "nils.kehrein@gmail.com", c("aut", "cre")), person("SETAC Europe IG Effect Modeling", role="ccp") @@ -18,7 +18,7 @@ License: MIT + file LICENSE Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.3 Suggests: knitr, rmarkdown, diff --git a/NEWS.md b/NEWS.md index e0e521a..134cea9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ -# lemna 1.0.0 +# lemna 1.0.1, 2023-04-22 + +* Minor change to `lemna.c` to avoid compiler warnings on CRAN + +# lemna 1.0.0, 2022-05-10 * Documentation adapted to reference report version 1.1 * Added a warning message in case removed parameter `BM_threshold` is used diff --git a/man/effect.Rd b/man/effect.Rd index 3cf67f3..a8def02 100644 --- a/man/effect.Rd +++ b/man/effect.Rd @@ -41,11 +41,11 @@ Two endpoints are calculated which describe the effects on biomass: } \section{Methods (by class)}{ \itemize{ -\item \code{default}: All scenario parameters supplied as arguments +\item \code{effect(default)}: All scenario parameters supplied as arguments -\item \code{lemna_scenario}: Scenario parameters supplied as a \code{lemna_scenario} object -}} +\item \code{effect(lemna_scenario)}: Scenario parameters supplied as a \code{lemna_scenario} object +}} \examples{ # effects in sample scenario effect(metsulfuron) diff --git a/man/lemna.Rd b/man/lemna.Rd index ae0590b..4546dd9 100644 --- a/man/lemna.Rd +++ b/man/lemna.Rd @@ -52,11 +52,11 @@ which is well suited to handle stiff and non-stiff numerical problems. } \section{Methods (by class)}{ \itemize{ -\item \code{default}: All scenario parameters supplied as arguments +\item \code{lemna(default)}: All scenario parameters supplied as arguments -\item \code{lemna_scenario}: Scenario parameters supplied as a \code{lemna_scenario} object -}} +\item \code{lemna(lemna_scenario)}: Scenario parameters supplied as a \code{lemna_scenario} object +}} \section{State variables}{ The model has two state variables: diff --git a/man/param_defaults.Rd b/man/param_defaults.Rd index 49939e5..134803b 100644 --- a/man/param_defaults.Rd +++ b/man/param_defaults.Rd @@ -89,9 +89,9 @@ Returns the default Lemna model parameters as reported by Klein \emph{et al.} (2 } \section{Functions}{ \itemize{ -\item \code{param_new}: A parameter set without default values -}} +\item \code{param_new()}: A parameter set without default values +}} \examples{ # Returns default model parameters, some parameters are not defined (NA) param_defaults() diff --git a/src/lemna.c b/src/lemna.c index 4d8a5c8..3f166d9 100644 --- a/src/lemna.c +++ b/src/lemna.c @@ -95,7 +95,7 @@ void lemna_forc(void (* odeforcs)(int *, double *)) * @param T_ref ref temperature for response=1 (°C) * @return value from the interval [0,1] */ -double fT_loss() { +double fT_loss(void) { return(pow(Q10, (Tmp - T_ref) / 10)); } @@ -106,7 +106,7 @@ double fT_loss() { * @param T_max maximum growth temperature (°C) * @return value from the interval [0,1] */ -double fT_photo() { +double fT_photo(void) { double T_m = Tmp <= T_opt ? T_min : T_max; return(pow(10, -(Tmp - T_opt)*(Tmp - T_opt) / ((T_m - T_opt)*(T_m - T_opt)))); } @@ -117,7 +117,7 @@ double fT_photo() { * @param beta intercept of irradiance response of photosynthesis (-) * @return value from the interval [0,1] */ -double fI_photo() { +double fI_photo(void) { return(fmin(1, alpha * Irr + beta)); } @@ -126,7 +126,7 @@ double fI_photo() { * @param N_50 half-saturation constant of Nitrogen response (mg N L-1) * @return value from the interval [0,1] */ -double fN_photo() { +double fN_photo(void) { return(Ntr / (Ntr + N_50)); } @@ -135,7 +135,7 @@ double fN_photo() { * @param P_50 half-saturation constant of Phosphorus response (mg P L-1) * @return value from the interval [0,1] */ -double fP_photo() { +double fP_photo(void) { return(Phs / (Phs + P_50)); }