AquaBEHERChangelog🛠 Parameter Validation: An improved and morerobust version of the parameter validation checks, along with additionaldata quality and validation checks for theseasFcstQBRfunction.
🔍 Input Validation: Checks added forhisYearStart,hisYearEnd, and the structure ofseasRain andhisWSCvar.
❓ Null and Missing Checks: Addedis.null andis.na checks forrainTerc and key data columns.
⚠ Unrealistic Data Warning: Warnings forunrealistichisWSCvar values (e.g., values outside 0-365days) and negative rainfall values.
📅 Year Filtering: EnsuresseasRainandhisWSC match on years after filtering.
🧪 Testing Structure: Established testingstructure usingtestthat for theseasFcstQBRfunction.
📖 Documentation: Added a Seasonal Forecastsection to the vignette.
📚 Documentation: Improved documentation forseasFcstQBR.
🔄 Function Name: Changed the function name fromseasFcst toseasFcstQBR.
📝 DESCRIPTION File: Edited the DESCRIPTION fileas directed by CRAN.
📖 Citation Information: Citation details arenow included ininst/CITATION, enabling properreferencing.
📊 CRAN Downloads Badge: A badge displaying CRANdownloads has been added to theREADME to track packageusage.
✅ Data Quality Control: New data validationchecks have been introduced to ensure the integrity of inputs for waterbalance calculations. These include realistic value checks and errorhandling.
🧪 Testing Structure: Established comprehensiveunit tests for thecalcWatBal andcalcSeasCalfunctions usingtestthat, ensuring better test coverage andreliability.
⚙ Parameter Validation: Enhanced validationmechanisms in thecalcSeasCal function to ensure accurateinput. Improvements include:
🔍 Consistency Checks: Ensures that date-relatedcolumns (Year, Month, Day) are complete and contain no missingvalues.
📅 Date Validation: EnsuresonsetWind.start,onsetWind.end, andcessaWind.end are valid dates usinglubridate::is.Date().
📐 Range Validation: Confirms thatR-index values fall between 0 and 1, whileSoil Moisture values remain non-negative.
📏 Length Consistency: EnsuresR-index andSoil Moisture arrays match thelength of the Year column.
🌱 soilWHC Validation: Verifies thatsoilWHC is a positive numeric value for accurate soil waterholding capacity calculations.
📦 Package Imports: Transitioned fromraster toterra for more efficient spatialdata processing.
📈 ‘calcWatBal’ Function: Now returns a listthat includes:
📅 Wet Season Calendar (WSC) Parameters:Improved logic and criteria for characterizing the onset and cessationof the wet season, ensuring more accurate agroclimaticanalysis.
🛠 Error Handling: Enhanced error management formissing or unrealistic values, making the package more robust anduser-friendly.
⚖ Consistency Checks: Implemented validation toensure that maximum temperature is always greater than minimumtemperature, avoiding input errors.
📝 Documentation: Significantly improved packagedocumentation for better clarity and completeness, including examplesand usage guidance.
🧪 Testing: Introduced unit testing for thecalcEto function, further improving the reliability of corecalculations.