Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development for v6.3.0 #249

Merged
merged 23 commits into from
Feb 4, 2025
Merged

Development for v6.3.0 #249

merged 23 commits into from
Feb 4, 2025

Conversation

N1ckP3rsl3y
Copy link
Contributor

  • Update SOILWAT2 to v8.1.0

- Update function calls where the name has changes and/or the argument(s) changed
- SOILWAT2 no longer has `files_nc.in`
- Switch the following types: RealD -> double and RealF -> float
- SW_WEATHER_HIST is no longer a pointer to a pointer, but is one array of SW_WEATHER_HIST instances

- SOILWAT2 now provides a function that handles the calculations/setting of weather data
	* Remove calculations from `rSW2_set_weather_hist()`
	* Store all weather data in a temporary location
	* Call SOILWAT2's function `SW_WTH_setWeatherValues()` to calculate/set the weather

- Update names changes of and within the struct SW_PATH_INPUTS
- Update the setting of `swrcp` to set `swrcpOM` and `swrcpMineralSoil`
- Update the use flag `inputsProvideSWRCp` over `site_has_swrcpMineralSoil`
- New helper function to `onSet_SW_SIT_tranp()`
	* Move the setting of transpiration from `onSet_SW_SIT()`
	* Set after we read soil information
Copy link
Member

@dschlaep dschlaep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we need a couple more rSOILWAT2 updates to reflect all SOILWAT2 changes related to SWRC parameters (separate inputs of organic and mineral ps from calculated bulk; and provide sapric depth as input) -- see more detailed comments. Thanks!

N1ckP3rsl3y and others added 17 commits December 20, 2024 16:39
C code
* Update column names to hold information for organic matter
* Update the transferring of fraction organic matter between R and C
* Update the setting of swrcp mineral soil to go to and from `swrcpMineralSoil` instead of `swrcp`
* New function `onGet_SW_omSWRCp()` and `onSet_SW_omSWRCp()` to transfer swrcp organic matter between R and C, used to set SW_SOILS slots

R code
* Class `swSoils` gains new slot - omSWRCp
	- Add new prototype for omSWRCp
	- Check that slot exists and is the correct size
	- Add reset/setReplace method
	- Add slot to `sw_upgrade` method
C code
* New column name "depth_sapric"
* Update `onGet/Set_SW_SIT()` to transfer `depthSapric` to/from R and C

R code
* Add new slot "depth_sapric" to swSite
* Make sure that depth_sapric is provided
* Create replace/set/generic methods for "depth_sapric"
- sw_upgrade() for "swSite": new upgrade_soilLayers() to add new column "som_frac" (and set it to default values of 0)
- new soilLayer_dataColumns()
- fix documentation
Bugfixes for "omSWRCp"
- fix onGet_SW_omSWRCp(): values were incorrectly copied; row and column names were mixed up
- fix onSet_SW_SWRCp(): values were incorrectly copied; remove unused variable "isMineral" that prevented "site_has_swrcpMineralSoil" from being set correctly
- fix export `swSoils_omSWRCp<-()`
- fix names given to "swSoils" slot "omSWRCp": row and column names were mixed up
- fix documentation

New objects
- sw2_list_omSWRCp: list of a matrix for each implemented SWRC with parameters for fibric and sapric peat

New behavior
- example code, vignette, and unit tests now set swSoils_omSWRCp() according to the selected SWRC
- fix validity check for "swSoils"
- add missing variable "debug" for debug mode
- rSW_CTL_obtain_inputs() now calls onSet_SW_SOILS() before onSet_SW_SIT_transp() -- this change was needed because onSet_SW_SIT_transp() requires soil depth information that is only available after it was obtained by onSet_SW_SOILS()

- see SOILWAT2 commit "Input specification of transpiration regions changed from layers to soil depth" (DrylandEcology/SOILWAT2@8c6432f)
- Update SOILWAT2 to commit d2adb224252a1c163056f255518ba1c038981efa "Merge pull request #444 from DrylandEcology/bugfix441_consistentSnow" on branch release/devel_v8.1.0
- Reflect SOILWAT2 updates to echo_*()
- Update SOILWAT2 to commit a916418790fe586894c2ccdadaf56867a75f4daf on branch release/devel_v8.1.0
- Reflect SOILWAT2 updates to sw_init_args()
- SOILWAT2 commit "Bugfix440 soil temperature" DrylandEcology/SOILWAT2@d029b28 (2025 Jan 28) introduced a new user input  to select the method for estimating surface temperature
- SOILWAT2 commit d20da03d196ccb344a8eefcc89df5feebaab5cb2 "Consistently clean output directory" (2025 Jan 24) modified the position of eLog in the enumerator SW_FileIndex

- onSet_SW_F() no longer copies rSOILWAT2's swFiles@InFiles to SOILWAT2's txtInFiles -- these are unused if rSOILWAT2 sets values
- sw_consts() now reflects new value of `eLog` which updates `rSW2_glovars[["kSOILWAT2"]][["InFiles"]]`

Additionally:
- Removed unused MyFileName
- Update to released SOILWAT2 v8.1.0
- Update package data
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 81.77966% with 43 lines in your changes missing coverage. Please review.

Project coverage is 59.17%. Comparing base (e705676) to head (20262de).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
R/F_swSoils.R 74.35% 10 Missing ⚠️
R/F_swSite.R 12.50% 7 Missing ⚠️
R/K_swContainer.R 33.33% 6 Missing ⚠️
src/rSW_Domain.c 25.00% 6 Missing ⚠️
R/A_swGenericMethods.R 33.33% 4 Missing ⚠️
src/rSW_Weather.c 90.62% 3 Missing ⚠️
src/rSW_Site.c 98.05% 2 Missing ⚠️
src/rSW_Control.c 87.50% 1 Missing ⚠️
src/rSW_Output.c 0.00% 1 Missing ⚠️
src/rSW_SoilWater.c 50.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #249      +/-   ##
==========================================
- Coverage   59.26%   59.17%   -0.09%     
==========================================
  Files          44       44              
  Lines        8899     8944      +45     
==========================================
+ Hits         5274     5293      +19     
- Misses       3625     3651      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dschlaep dschlaep merged commit 543655d into main Feb 4, 2025
16 checks passed
@dschlaep dschlaep deleted the release/devel_v6.3.0 branch February 4, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants