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

Release v8.1.1 #452

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Release v8.1.1 #452

wants to merge 14 commits into from

Conversation

dschlaep
Copy link
Member

Small bugfixes

- SWRC_check_parameters_for_*() now check that SWRCp are finite
- SW_SIT_init_run() now only runs SWRC_check_parameters() on organic SWRCp if there is organic matter in the soil
- Update fall-back default values to match those of siteparam.in

- Fix too long warning message
* these messages were previously too long (exceeding MAX_LOG_SIZE = 300 characters) and caused LogError() to throw the error "Programmer: message exceeds the maximum size."
* shortened and simplified warning messages about too many or inconsistent soil temperature profile layers
@dschlaep dschlaep marked this pull request as draft February 17, 2025 19:45
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 67.90123% with 26 lines in your changes missing coverage. Please review.

Project coverage is 74.62%. Comparing base (ac173e3) to head (22e6787).

Files with missing lines Patch % Lines
src/filefuncs.c 68.88% 14 Missing ⚠️
src/SW_Site.c 59.09% 9 Missing ⚠️
src/SW_Files.c 78.57% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #452      +/-   ##
==========================================
+ Coverage   73.78%   74.62%   +0.84%     
==========================================
  Files          20       20              
  Lines        6496     6471      -25     
==========================================
+ Hits         4793     4829      +36     
+ Misses       1703     1642      -61     

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

N1ckP3rsl3y and others added 11 commits February 18, 2025 10:55
- The logfile name is needed earlier in the program execution before SW_OUT_read()
- Remove `logfile.log` in outsetup.in and place it in files.in

- Logfile name gains new directory "logs/" to remove it from the outputs
	* This will also be used in future parallelization development

- Update global constants for the number of input and output files
- Open logfile after reading in files.in
	* Create directory if it does not exist already
- the logfile is now, by default, logs/logfile.log
- all test sites have now snow densities > 0 (previously, snow density at non-target test sites was set to 0) because 0 snow density is now an error (since v8.1.0)

- checks now consistently identify which successful testRuns produced messages (those runs were previously misidentified if they occurred after a failed testRun)
- fix test "SpinUpFixtureTest.SpinupEvaluation": commit 5fe65df "Match code to new structs" on 2024 Jul 2 erroneously switch the variable for the short test run away from correct local_sw

- improve script "Rscript__SW2_SpinupEvaluation.R" to separate out relationships at different initial conditions of soil temperature vs soil moisture
- input tsv updated to include new input group "inSite" with spatial index and row for nc-input of Tsoil_constant
- new example nc-input "inSite/tas-clim.nc"
- updated ncTestRuns code
- Update constants and defines to make room for this new input within the input spreadsheet
- Update `read_spatial_topo_climate_inputs()` to now read in the input group "inSite"
	* Rename to `read_spatial_topo_climate_site_inputs()`
nc-input for constant soil temperature at depth
- close #454 "Monthly scaling of meteorological variables only works for MaxT, MinT and PPT"

- SOILWAT2 v7.0.0 introduced additional daily meteorological variables and associated monthly scaling parameters for manipulative treatment experiments; However, monthly scaling parameters were only correctly applied if at least one scaling parameter among maxT, minT, and PPT was activated; for instance, if the monthly scaling parameter for wind was the only activated parameter, then the code failed to apply the scaling.

- Monthly scaling parameters are now consistently applied

- New tests that failed before this fix with
```
[ RUN      ] WeatherFixtureTest.WeatherMonthlyScalingParameters
tests/gtests/test_SW_Weather.cc:976: Failure
Expected: (SW_Run.Weather.allHist[0].cloudcov_daily[0]) != (allHist[0].cloudcov_daily[0]), actual: 66.483870967741936 vs 66.483870967741936

tests/gtests/test_SW_Weather.cc:1005: Failure
Expected: (SW_Run.Weather.allHist[0].windspeed_daily[0]) != (allHist[0].windspeed_daily[0]), actual: 1.3 vs 1.3

tests/gtests/test_SW_Weather.cc:1034: Failure
Expected: (SW_Run.Weather.allHist[0].r_humidity_daily[0]) != (allHist[0].r_humidity_daily[0]), actual: 61 vs 61

tests/gtests/test_SW_Weather.cc:1063: Failure
Expected: (SW_Run.Weather.allHist[0].actualVaporPressure[0]) != (allHist[0].actualVaporPressure[0]), actual: 0.20245873285008623 vs 0.20245873285008623
```
- Previously, when attempting to delete a subdirectory within a directory we are trying to clean, we would get a warning that it wasn't deleted
- Take a new approach and recursively go through the subdirectory(ies) and delete their content when attempting to clean a directory

- Rename `getfiles()` to `RemoveFilesHelper()` which will do the recursive calls
	* Detects if a directory is present and will recurse into it if we are cleaning the directory
		- I.e., don't recurse if we are removing specific files from a directory
	* Remove any files that match the pattern given when not cleaning a directory
	* Function takes in a maximum recursive depth (currently set to 10)
	* Keep boolean status value, but if a subdirectory fails, recurse up asap
- Remove function `freeGetfilesEarly()`
- `RemoveFiles()`now splits the file name into directory and base names, while splitting it based on '*'
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