Skip to content

Commit

Permalink
New release
Browse files Browse the repository at this point in the history
  • Loading branch information
RobelTakele committed Sep 21, 2024
1 parent 42f6a37 commit 020ad99
Show file tree
Hide file tree
Showing 105 changed files with 1,305 additions and 1,615 deletions.
3 changes: 0 additions & 3 deletions CRAN-SUBMISSION

This file was deleted.

44 changes: 24 additions & 20 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
Type: Package
Package: AquaBEHER
Title: Estimation and Prediction of Wet Season Calendar and Soil Water Balance for Agriculture
Version: 1.2.0
Title: Estimation and Prediction of Wet Season Calendar and Soil Water
Balance for Agriculture
Version: 1.4.0
Date: 2024-09-21
Authors@R: c(
person("Robel", "Takele", , "takelerobel@gmail.com", role = c("aut", "cre"),
person("Robel", "Takele", , "takelerobel@gmail.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-0151-2537")),
person("Matteo", "Dell'Acqua", , "matteo.dellacqua@santannapisa.it", role = c("aut", "ctb"),
comment = c(ORCID = "0000-0003-0151-2537")))
comment = c(ORCID = "0000-0003-0151-2537"))
)
Maintainer: Robel Takele <takelerobel@gmail.com>
Description: The AquaBEHER package provides tools for computing and
integrating daily reference evapotranspiration (Eto) and a soil water
balance model. It estimates parameters for crop and soil water
balances relevant to agricultural crops. The package allows users to
estimate and predict the wet season calendar, including onset,
cessation, and duration, based on an agroclimatic approach for a
specified period. This functionality helps in managing agricultural
water resources more effectively. For detailed methodologies, users
can refer to Allen et al. (1998, ISBN:92-5-104219-5); Allen (2005,
ISBN:9780784408056); Doorenbos and Pruitt (1975, ISBN:9251002797); Guo
et al. (2016) <doi:10.1016/j.envsoft.2015.12.019>; Hargreaves and Samani
(1985) <doi:10.13031/2013.26773>; and Priestley and Taylor (1972)
integrating daily potential evapotranspiration (PET) and a soil water
balance model. The package allows users to estimate and predict the
wet season calendar, including onset, cessation, and duration, based
on an agroclimatic approach for a specified period. This functionality
helps in managing agricultural water resources more effectively. For
detailed methodologies, users can refer to Allen et al. (1998,
ISBN:92-5-104219-5); Allen (2005, ISBN:9780784408056); Doorenbos and
Pruitt (1975, ISBN:9251002797); Guo et al. (2016)
<doi:10.1016/j.envsoft.2015.12.019>; Hargreaves and Samani (1985)
<doi:10.13031/2013.26773>; Priestley and Taylor (1972)
<https://journals.ametsoc.org/view/journals/apme/18/7/1520-0450_1979_018_0898_tptema_2_0_co_2.xml>.
License: GPL (>= 3)
URL: https://github.com/RobelTakele/AquaBEHER,
Expand All @@ -28,19 +31,20 @@ Depends:
R (>= 3.5.0)
Imports:
dplyr,
magrittr,
lubridate,
zoo,
magrittr,
rlang,
sp,
terra
terra,
zoo
Suggests:
knitr,
ggplot2,
ggrepel,
scales,
knitr,
learnr,
prettydoc,
rmarkdown,
scales,
stringr,
testthat (>= 3.0.0)
VignetteBuilder:
Expand Down
508 changes: 0 additions & 508 deletions NEWS.html

This file was deleted.

141 changes: 103 additions & 38 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,135 @@

<p id="start" align="center">
<a href="#start"></a>
</p>

# AquaBEHER Changelog
# <img height="50rem" src="man/figures/AquaBEHER_smalLogo.png" >  AquaBEHER Changelog

------------------------------------------------------------------------

# AquaBEHER 1.4.0

------------------------------------------------------------------------

### 🆕 Added

- **🛠 Parameter Validation**: An improved and more robust version of the
parameter validation checks, along with additional data quality and
validation checks for the `seasFcstQBR` function.

- **🔍 Input Validation**: Checks added for `hisYearStart`,
`hisYearEnd`, and the structure of `seasRain` and `hisWSCvar`.

- **❓ Null and Missing Checks**: Added `is.null` and `is.na` checks
for `rainTerc` and key data columns.

- **⚠ Unrealistic Data Warning**: Warnings for unrealistic `hisWSCvar`
values (e.g., values outside 0-365 days) and negative rainfall
values.

- **📅 Year Filtering**: Ensures `seasRain` and `hisWSC` match on
years after filtering.

- **🧪 Testing Structure**: Established testing structure using
`testthat` for the `seasFcstQBR` function.

- **📖 Documentation**: Added a Seasonal Forecast section to the
vignette.

### 🔄 Changed

- **📚 Documentation**: Improved documentation for `seasFcstQBR`.

- **🔄 Function Name**: Changed the function name from `seasFcst` to
`seasFcstQBR`.

---
- **📝 DESCRIPTION File**: Edited the DESCRIPTION file as directed by
CRAN.

------------------------------------------------------------------------

# AquaBEHER 1.2.0

------------------------------------------------------------------------

### 🆕 Added

- **📖 Citation Information**: Citation details are now included in `inst/CITATION`, enabling proper referencing.

- **📊 CRAN Downloads Badge**: A badge displaying CRAN downloads has been added to the `README` to track package usage.
- **📖 Citation Information**: Citation details are now included in
`inst/CITATION`, enabling proper referencing.

- **📊 CRAN Downloads Badge**: A badge displaying CRAN downloads has
been added to the `README` to track package usage.

- **✅ Data Quality Control**: New data validation checks have been
introduced to ensure the integrity of inputs for water balance
calculations. These include realistic value checks and error handling.

- **🧪 Testing Structure**: Established comprehensive unit tests for the
`calcWatBal` and `calcSeasCal` functions using `testthat`, ensuring
better test coverage and reliability.

- **✅ Data Quality Control**: New data validation checks have been introduced to ensure the integrity of inputs for water balance calculations. These include realistic value checks and error handling.
- **⚙ Parameter Validation**: Enhanced validation mechanisms in the
`calcSeasCal` function to ensure accurate input. Improvements include:

- **🧪 Testing Structure**: Established comprehensive unit tests for the `calcWatBal` and `calcSeasCal` functions using `testthat`, ensuring better test coverage and reliability.
- **🔍 Consistency Checks**: Ensures that date-related columns (Year,
Month, Day) are complete and contain no missing values.

- **⚙️ Parameter Validation**: Enhanced validation mechanisms in the `calcSeasCal` function to ensure accurate input. Improvements include:

- **🔍 Consistency Checks**: Ensures that date-related columns (Year, Month, Day) are complete and contain no missing values.

- **📅 Date Validation**: Ensures `onsetWind.start`, `onsetWind.end`, and `cessaWind.end` are valid dates using `lubridate::is.Date()`.
- **📐 Range Validation**: Confirms that `R-index` values fall between 0 and 1, while `Soil Moisture` values remain non-negative.

- **📏 Length Consistency**: Ensures `R-index` and `Soil Moisture` arrays match the length of the Year column.

- **🌱 soilWHC Validation**: Verifies that `soilWHC` is a positive numeric value for accurate soil water holding capacity calculations.
- **📅 Date Validation**: Ensures `onsetWind.start`, `onsetWind.end`,
and `cessaWind.end` are valid dates using `lubridate::is.Date()`.

- **📐 Range Validation**: Confirms that `R-index` values fall between
0 and 1, while `Soil Moisture` values remain non-negative.

- **📏 Length Consistency**: Ensures `R-index` and `Soil Moisture`
arrays match the length of the Year column.

- **🌱 soilWHC Validation**: Verifies that `soilWHC` is a positive
numeric value for accurate soil water holding capacity calculations.

### 🔄 Changed

- **📦 Package Imports**: Transitioned from `raster` to `terra` for more efficient spatial data processing.

- **📦 Package Imports**: Transitioned from `raster` to `terra` for more
efficient spatial data processing.

- **📈 calcWatBal Function**: Now returns a list that includes:

- A dataframe with results.
- A list of warnings for unrealistic or adjusted values in the input data, making error tracing easier.
- A list of warnings for unrealistic or adjusted values in the input
data, making error tracing easier.

- **📅 Wet Season Calendar (WSC) Parameters**: Improved logic and criteria for characterizing the onset and cessation of the wet season, ensuring more accurate agroclimatic analysis.
- **📅 Wet Season Calendar (WSC) Parameters**: Improved logic and
criteria for characterizing the onset and cessation of the wet season,
ensuring more accurate agroclimatic analysis.

---
------------------------------------------------------------------------

# AquaBEHER 1.0.0

### 🆕 Added
------------------------------------------------------------------------

- **🛠️ Error Handling**: Enhanced error management for missing or unrealistic values, making the package more robust and user-friendly.
### 🆕 Added

- **⚖️ Consistency Checks**: Implemented validation to ensure that maximum temperature is always greater than minimum temperature, avoiding input errors.

- **📝 Documentation**: Significantly improved package documentation for better clarity and completeness, including examples and usage guidance.
- **🛠 Error Handling**: Enhanced error management for missing or
unrealistic values, making the package more robust and user-friendly.

- **🧪 Testing**: Introduced unit testing for the `calcEto` function, further improving the reliability of core calculations.
- **⚖ Consistency Checks**: Implemented validation to ensure that
maximum temperature is always greater than minimum temperature,
avoiding input errors.

---
- **📝 Documentation**: Significantly improved package documentation for
better clarity and completeness, including examples and usage
guidance.

# AquaBEHER 0.1.0
- **🧪 Testing**: Introduced unit testing for the `calcEto` function,
further improving the reliability of core calculations.

### 🆕 Initial Release
------------------------------------------------------------------------

- **🌱 AquaBEHER 0.1.0**: Initial submission to CRAN, introducing essential functionalities for estimating soil water balance and wet season characterization.
# AquaBEHER 0.1.0

---
<p align="right">
<a href="#start"><img width="70rem" src="man/figures/top.png"></a>
</p>
------------------------------------------------------------------------

### 🆕 Initial Release

- **🌱 AquaBEHER 0.1.0**: Initial submission to CRAN, introducing
essential functionalities for estimating soil water balance and wet
season characterization.
4 changes: 2 additions & 2 deletions R/AgroClimateData.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
#' (°C).
#' - **Rs**: Total amount of energy provided by solar radiation at the surface
#' over the period 00-24h local time per unit area and time (MJ/m^2/day).
#' - **Tdew**: Mean dewpoint temperature at a height of 2 metres above the
#' - **Tdew**: Mean dew point temperature at a height of 2 meters above the
#' surface over the period 00h-24h local time (°C).
#' - **Uz**: Mean wind speed at a height of 2 metres above the surface over the
#' - **Uz**: Mean wind speed at a height of 2 meters above the surface over the
#' period 00h-24h local time (m/s).
#'
#' @source \url{https://cds.climate.copernicus.eu/cdsapp#!/dataset/sis-agrometeorological-indicators?tab=overview}
Expand Down
17 changes: 9 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ knitr::opts_chunk$set(


<p id="start" align="center">
<a href="#start"><img height="300rem" src="man/figures/AquaBEHER.png"></a>
<a href="#start"><img height="300rem" src="man/figures/logo.png"></a>
</p>

<div align="center">
Expand All @@ -43,17 +43,18 @@ knitr::opts_chunk$set(
<img src="https://cranlogs.r-pkg.org/badges/AquaBEHER" alt="metacran downloads" height="25">
</a>
<!-- badges: end -->

</div>

<p id="start" align="center">
<a href="#start"><img height="10rem" src="inst/www/lines/aqua.png"></a>
<p id="line" align="center">
<a href="#line"><img height="10rem" src="man/figures/aqua.png"></a>
</p>

**AquaBEHER** is an R package designed to **estimate** and **predict** the wet season calendar (WSC) and soil water balance for agricultural applications. The package integrates daily potential evapotranspiration (PET) and soil water balance parameters to compute the WSC for crop and soil water management. Using these parameters, AquaBEHER can estimate and predict the onset, cessation, and duration of the wet season based on an agroclimatic approach.

### ⛓ Key Features
- **Daily potential evapotranspiration (PET)** estimation using various methods.
- **Daily soil water balance** estimation based on customizable soil water holding capacity (soilWHC).
- **Daily soil water balance** estimation based on adjustable soil water holding capacity (soilWHC).
- **Wet season calendar** estimation and seasonal prediction including:
- Onset of the wet season
- Cessation of the wet season
Expand Down Expand Up @@ -194,7 +195,7 @@ For inquiries, please reach out to:
Learn more about our work on the [institute web page](https://www.santannapisa.it/en/institute/plant-sciences).

<div align="center">
<a href="https://x.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/RobelTakele/AquaBEHER">
<a href="https://twitter.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/RobelTakele/AquaBEHER">
<img src="https://img.shields.io/badge/share-000000?logo=x&logoColor=white" alt="Share on X">
</a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/RobelTakele/AquaBEHER">
Expand Down Expand Up @@ -249,6 +250,6 @@ If you find **AquaBEHER** helpful or interesting, please consider giving us a st

This project is licensed under the GNU General Public License, [GPL-3](https://cran.r-project.org/web/licenses/GPL-3).

<p align="right">
<a href="#start"><img width="70rem" src="man/figures/top.png"></a>
</p>
<p align="right"> <a href="#start"><button style="padding:10px 30px; background-color:#0096FF; color:white; border:none; border-radius:5px; cursor:pointer;">Back to Top</button></a> </p>

---
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
<p id="start" align="center">
<a href="#start"><img height="300rem" src="man/figures/AquaBEHER.png"></a>
<a href="#start"><img height="300rem" src="man/figures/logo.png"></a>
</p>

<div align="center">
Expand Down Expand Up @@ -29,8 +29,8 @@ a Question</a>

</div>

<p id="start" align="center">
<a href="#start"><img height="10rem" src="inst/www/lines/aqua.png"></a>
<p id="line" align="center">
<a href="#line"><img height="10rem" src="man/figures/aqua.png"></a>
</p>

**AquaBEHER** is an R package designed to **estimate** and **predict**
Expand All @@ -45,8 +45,8 @@ on an agroclimatic approach.

- **Daily potential evapotranspiration (PET)** estimation using various
methods.
- **Daily soil water balance** estimation based on customizable soil
water holding capacity (soilWHC).
- **Daily soil water balance** estimation based on adjustable soil water
holding capacity (soilWHC).
- **Wet season calendar** estimation and seasonal prediction including:
- Onset of the wet season
- Cessation of the wet season
Expand Down Expand Up @@ -221,7 +221,7 @@ page](https://www.santannapisa.it/en/institute/plant-sciences).

<div align="center">

<a href="https://x.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/RobelTakele/AquaBEHER">
<a href="https://twitter.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/RobelTakele/AquaBEHER">
<img src="https://img.shields.io/badge/share-000000?logo=x&logoColor=white" alt="Share on X">
</a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/RobelTakele/AquaBEHER">
Expand Down Expand Up @@ -283,5 +283,8 @@ This project is licensed under the GNU General Public License,
[GPL-3](https://cran.r-project.org/web/licenses/GPL-3).

<p align="right">
<a href="#start"><img width="70rem" src="man/figures/top.png"></a>
<a href="#start"><button style="padding:10px 30px; background-color:#0096FF; color:white; border:none; border-radius:5px; cursor:pointer;">Back
to Top</button></a>
</p>

------------------------------------------------------------------------
Loading

0 comments on commit 020ad99

Please sign in to comment.