Skip to content

Commit

Permalink
Prepare development for v6.0.2 (#238)
Browse files Browse the repository at this point in the history
Accommodate SOILWAT2 v7.1.0 developments (DrylandEcology/SOILWAT2#351)

* This version produces the same output as the previous version.
* Update `SOILWAT2` to v7.1.0 which prepares for thread-safety and reentrancy
* C-side of `rSOILWAT2` gains new globals of the four main abstract types in
  `SOILWAT2` - SW_ALL, SW_OUTPUT_POINTERS, LOG_INFO, and PATH_INFO -
  to interact with `SOILWAT2`.
  • Loading branch information
dschlaep authored Aug 4, 2023
2 parents 22e6011 + e19e793 commit e436a76
Show file tree
Hide file tree
Showing 20 changed files with 397 additions and 327 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rSOILWAT2
Version: 6.0.1
Version: 6.0.2
Title: An Ecohydrological Ecosystem-Scale Water Balance Simulation Model
Description: Access to the C-based SOILWAT2 v7.0.0 and functionality for
Description: Access to the C-based SOILWAT2 v7.1.0 and functionality for
SQLite-database of weather data.
Authors@R: c(
person(
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# rSOILWAT2 v6.0.2
* This version produces the same output as the previous version.
* Update `SOILWAT2` to v7.1.0 which prepares for thread-safety and reentrancy
* C-side of `rSOILWAT2` gains new globals of the four main abstract types in
`SOILWAT2` - SW_ALL, SW_OUTPUT_POINTERS, LOG_INFO, and PATH_INFO -
to interact with `SOILWAT2`.

# rSOILWAT2 v6.0.1

## Bugfix
Expand Down
3 changes: 3 additions & 0 deletions R/Rsw.R
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ sw_exec <- function(

# Run SOILWAT2
res <- .Call(C_start, input, inputData, weatherList, quiet)

slot(res, "version") <- rSW2_version()
slot(res, "timestamp") <- rSW2_timestamp()

Expand Down Expand Up @@ -383,6 +384,7 @@ sw_inputDataFromFiles <- function(
input <- sw_args(dir, files.in, echo = FALSE, quiet = quiet)

res <- .Call(C_onGetInputDataFromFiles, input, quiet)

slot(res, "version") <- rSW2_version()
slot(res, "timestamp") <- rSW2_timestamp()

Expand All @@ -402,6 +404,7 @@ sw_outputData <- function(inputData) {
on.exit(setwd(dir_prev), add = TRUE)

res <- .Call(C_onGetOutput, inputData)

slot(res, "version") <- rSW2_version()
slot(res, "timestamp") <- rSW2_timestamp()

Expand Down
7 changes: 3 additions & 4 deletions R/swWeatherGenerator.R
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,7 @@ dbW_generateWeather <- function(

#--- Process weather in SOILWAT2
set.seed(seed)
dbW_weatherData_round(
.Call(C_rSW2_processAllWeather, weatherData, sw_in),
digits = digits
)
res <- .Call(C_rSW2_processAllWeather, weatherData, sw_in)

dbW_weatherData_round(res, digits = digits)
}
1 change: 0 additions & 1 deletion inst/extdata/example1/Input/outsetup.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
# in any order. For example: 'TIMESTEP mo wk' will output for month and week
#

OUTSEP c
TIMESTEP dy wk mo yr # must be lowercase

# KEY SUMTYPE PERIOD START END FILENAME_PREFIX DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion src/SOILWAT2
Submodule SOILWAT2 updated 79 files
+0 −3 .LSAN_suppr.txt
+5 −0 .github/workflows/main_nix.yml
+3 −0 .gitignore
+36 −0 NEWS.md
+1 −1 external/googletest
+6 −26 include/SW_Carbon.h
+12 −7 include/SW_Control.h
+33 −7 include/SW_Defines.h
+7 −19 include/SW_Files.h
+3 −2 include/SW_Flow.h
+64 −83 include/SW_Flow_lib.h
+14 −10 include/SW_Flow_lib_PET.h
+4 −2 include/SW_Main_lib.h
+11 −36 include/SW_Markov.h
+5 −38 include/SW_Model.h
+150 −249 include/SW_Output.h
+18 −18 include/SW_Output_outarray.h
+21 −46 include/SW_Output_outtext.h
+44 −162 include/SW_Site.h
+4 −23 include/SW_Sky.h
+50 −115 include/SW_SoilWater.h
+1 −4 include/SW_Times.h
+25 −82 include/SW_VegEstab.h
+21 −218 include/SW_VegProd.h
+34 −173 include/SW_Weather.h
+1,060 −0 include/SW_datastructs.h
+12 −23 include/Times.h
+6 −14 include/filefuncs.h
+0 −35 include/generic.h
+2 −13 include/memblock.h
+6 −4 include/myMemory.h
+6 −4 include/rands.h
+9 −2 makefile
+62 −63 src/SW_Carbon.c
+152 −93 src/SW_Control.c
+73 −136 src/SW_Files.c
+276 −393 src/SW_Flow.c
+426 −369 src/SW_Flow_lib.c
+113 −109 src/SW_Flow_lib_PET.c
+34 −16 src/SW_Main.c
+22 −39 src/SW_Main_lib.c
+145 −119 src/SW_Markov.c
+73 −77 src/SW_Model.c
+708 −631 src/SW_Output.c
+1,373 −875 src/SW_Output_get_functions.c
+210 −112 src/SW_Output_mock.c
+65 −63 src/SW_Output_outarray.c
+165 −123 src/SW_Output_outtext.c
+612 −621 src/SW_Site.c
+45 −45 src/SW_Sky.c
+372 −331 src/SW_SoilWater.c
+252 −193 src/SW_VegEstab.c
+290 −251 src/SW_VegProd.c
+287 −208 src/SW_Weather.c
+35 −22 src/Times.c
+27 −30 src/filefuncs.c
+9 −9 src/mymemory.c
+4 −2 src/rands.c
+0 −1 tests/example/Input/outsetup.in
+12 −21 tests/gtests/sw_maintest.cc
+91 −49 tests/gtests/sw_testhelpers.cc
+97 −3 tests/gtests/sw_testhelpers.h
+32 −44 tests/gtests/test_SW_Carbon.cc
+1 −1 tests/gtests/test_SW_Defines.cc
+280 −241 tests/gtests/test_SW_Flow_Lib.cc
+124 −67 tests/gtests/test_SW_Flow_Lib_PET.cc
+309 −227 tests/gtests/test_SW_Flow_lib_temp.cc
+100 −57 tests/gtests/test_SW_Markov.cc
+134 −109 tests/gtests/test_SW_Site.cc
+109 −57 tests/gtests/test_SW_SoilWater.cc
+10 −11 tests/gtests/test_SW_VegEstab.cc
+181 −93 tests/gtests/test_SW_VegProd.cc
+305 −279 tests/gtests/test_SW_Weather.cc
+85 −54 tests/gtests/test_Times.cc
+201 −175 tests/gtests/test_WaterBalance.cc
+5 −4 tests/gtests/test_generic.cc
+8 −6 tests/gtests/test_rands.cc
+293 −67 tools/check_SOILWAT2.sh
+38 −0 tools/run_bin_leaks.sh
Loading

0 comments on commit e436a76

Please sign in to comment.