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

Prepare for upcoming SOILWAT2 release v7.0.0 #535

Merged
merged 21 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8e6d144
Set SOILWAT2 to feature_read_weather
dschlaep Oct 5, 2022
755b3e9
Incorporate SOILWAT2's new weather workflow
dschlaep Oct 5, 2022
d641e3b
Set SOILWAT2 to feature_veg_estimation
dschlaep Nov 17, 2022
657153f
Prepare for upcoming SOILWAT2 release v7.0.0
dschlaep Dec 6, 2022
eb67f2c
Update SOILWAT2 with new SWRC functionality
dschlaep Dec 22, 2022
5505457
Updates for new SOILWAT2 project structure
dschlaep Dec 22, 2022
ec1896b
Clean up "Updates for new SOILWAT2 project structure"
dschlaep Dec 28, 2022
912a4b0
Wrap up updates for re-structured SOILWAT2
dschlaep Dec 29, 2022
26cecad
Merge pull request #536 from DrylandEcology/feature_SOILWAT2_restructure
dschlaep Dec 29, 2022
c871c2f
Merge branch 'Seed_Dispersal' (with SOILWAT2 v6.7.0) into feature_SOI…
dschlaep Jan 14, 2023
777cf5b
Updated Submodule
Jan 29, 2023
95b7b2f
STEPWAT2 handles more daily weather variables
Jan 29, 2023
a890167
Merge branch 'feature_SOILWAT2_v700_devel' into read_more_daily_input
Jan 31, 2023
bbd3c65
Removed unnecessary "flag" in `_sxw_generate_weather()`
Jan 31, 2023
c974dc6
Merge branch 'Seed_Dispersal' (with bugfix_arm64) into feature_SOILWA…
dschlaep Feb 20, 2023
2a87eca
Merge branch 'feature_SOILWAT2_v700_devel' (with bugfix_arm64) into r…
dschlaep Feb 20, 2023
6fcc81e
SOILWAT2 updated handling of solar radiation inputs
dschlaep Feb 23, 2023
fa0dcd8
Update SOILWAT2 to latest commit on read_more_daily_input
dschlaep Jun 5, 2023
1e97e9e
Merge pull request #539 from DrylandEcology/read_more_daily_input
dschlaep Jun 5, 2023
0f1d102
Update SOILWAT2 to latest version on devel_v7.0.0
dschlaep Jun 5, 2023
9037e90
Finalize branch with update to released SOILWAT2 v7.0.0
dschlaep Jun 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*.exe
*.o
*.so
obj

# Packages #
############
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "sw_src"]
path = sw_src
url = https://github.com/DrylandEcology/SOILWAT2.git
branch = master
branch = release/devel_v7.0.0
ignore = dirty
4 changes: 2 additions & 2 deletions ST_colonization.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/

#include "ST_colonization.h"
#include "sw_src/myMemory.h"
#include "sw_src/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/filefuncs.h"
#include "ST_functions.h"
#include "ST_globals.h"

Expand Down
2 changes: 1 addition & 1 deletion ST_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef STEPPE_DEF_H
#define STEPPE_DEF_H

#include "sw_src/generic.h"
#include "sw_src/include/generic.h"

/* see #include "ST_structs.h" below */

Expand Down
6 changes: 3 additions & 3 deletions ST_environs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#include "ST_steppe.h"
#include "ST_globals.h"
#include "sw_src/pcg/pcg_basic.h"
#include "sw_src/rands.h"
#include "sw_src/external/pcg/pcg_basic.h"
#include "sw_src/include/rands.h"
#include "sxw.h" // externs `*SXW`
#include "sxw_funcs.h"
#include "sw_src/filefuncs.h"
#include "sw_src/include/filefuncs.h"

/*********** Locally Used Function Declarations ************/
/***********************************************************/
Expand Down
24 changes: 12 additions & 12 deletions ST_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
#include <string.h>
#include <ctype.h>
#include <dirent.h>
#include "sw_src/generic.h"
#include "sw_src/filefuncs.h"
#include "sw_src/myMemory.h"
#include "sw_src/rands.h"
#include "sw_src/SW_SoilWater.h" // externs SW_Soilwat
#include "sw_src/SW_Weather.h" // externs SW_Weather
#include "sw_src/SW_Markov.h"// externs `markov_rng`
#include "sw_src/include/generic.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/rands.h"
#include "sw_src/include/SW_SoilWater.h" // externs SW_Soilwat
#include "sw_src/include/SW_Weather.h" // externs SW_Weather
#include "sw_src/include/SW_Markov.h"// externs `markov_rng`
#include "ST_grid.h"
#include "ST_steppe.h"
#include "ST_globals.h" // externs `UseProgressBar`
Expand All @@ -51,12 +51,12 @@
#include "ST_colonization.h"
#include "ST_seedDispersal.h" // externs `UseSeedDispersal`
#include "ST_mortality.h" // externs `mortality_rng`, `*_SomeKillage`, `UseCheatgrassWildfire`
#include "sw_src/SW_Output.h"
#include "sw_src/SW_Output_outtext.h"
#include "sw_src/SW_Output_outarray.h"
#include "sw_src/include/SW_Output.h"
#include "sw_src/include/SW_Output_outtext.h"
#include "sw_src/include/SW_Output_outarray.h"

#include "sw_src/SW_Flow.h" // for `SW_FLW_init_run()`
#include "sw_src/SW_Flow_lib.h" // for `SW_ST_init_run()`
#include "sw_src/include/SW_Flow.h" // for `SW_FLW_init_run()`
#include "sw_src/include/SW_Flow_lib.h" // for `SW_ST_init_run()`



Expand Down
18 changes: 9 additions & 9 deletions ST_grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
/******** These modules are necessary to compile ST_grid.c ********/
#include "ST_stats.h"
#include "ST_defines.h"
#include "sw_src/pcg/pcg_basic.h"
#include "sw_src/external/pcg/pcg_basic.h"
#include "sxw_vars.h"
#include "sw_src/SW_Site.h"
#include "sw_src/SW_SoilWater.h"
#include "sw_src/SW_VegProd.h"
#include "sw_src/SW_Model.h"
#include "sw_src/SW_Weather.h"
#include "sw_src/include/SW_Site.h"
#include "sw_src/include/SW_SoilWater.h"
#include "sw_src/include/SW_VegProd.h"
#include "sw_src/include/SW_Model.h"
#include "sw_src/include/SW_Weather.h"
#include "ST_seedDispersal.h"

/*********************** Grid Structures ****************************/

/**
/**
* \brief Soil layer information for a single [cell](\ref CellType)
*
*
* This struct requires dynamic memory allocation, so be carefull when
* instanciating it.
*
*
* \ingroup GRID
*/
typedef struct Soil_st
Expand Down
4 changes: 2 additions & 2 deletions ST_indivs.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <stdlib.h>
#include "ST_steppe.h"
#include "ST_globals.h"
#include "sw_src/filefuncs.h"
#include "sw_src/myMemory.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/myMemory.h"


/******** Modular External Function Declarations ***********/
Expand Down
26 changes: 13 additions & 13 deletions ST_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
#include <string.h>
#include <stdlib.h>
#include "ST_steppe.h"
#include "sw_src/generic.h" // externs `*logfp`, `errstr`, `EchoInits`, `QuietMode`, `logged`
#include "sw_src/filefuncs.h" // externs `inbuf`
#include "sw_src/myMemory.h"
#include "sw_src/SW_VegProd.h"
#include "sw_src/SW_Control.h"
#include "sw_src/pcg/pcg_basic.h"
#include "sw_src/SW_Markov.h"// externs `markov_rng`
#include "sw_src/include/generic.h" // externs `*logfp`, `errstr`, `EchoInits`, `QuietMode`, `logged`
#include "sw_src/include/filefuncs.h" // externs `inbuf`
#include "sw_src/include/myMemory.h"
#include "sw_src/include/SW_VegProd.h"
#include "sw_src/include/SW_Control.h"
#include "sw_src/external/pcg/pcg_basic.h"
#include "sw_src/include/SW_Markov.h"// externs `markov_rng`

#include "sxw_funcs.h"
#include "sxw.h"
// externs `prepare_IterationSummary`, `storeAllIterations`
#include "sw_src/SW_Output.h"
#include "sw_src/SW_Output_outtext.h" // externs `print_IterationSummary`
#include "sw_src/SW_Output_outarray.h"
#include "sw_src/rands.h"
#include "sw_src/include/SW_Output.h"
#include "sw_src/include/SW_Output_outtext.h" // externs `print_IterationSummary`
#include "sw_src/include/SW_Output_outarray.h"
#include "sw_src/include/rands.h"
#include "ST_functions.h" // externs `environs_rng`, `resgroups_rng`, `species_rng`
#include "ST_spinup.h"
#include "ST_stats.h"
Expand Down Expand Up @@ -214,8 +214,6 @@ int main(int argc, char **argv) {
for (iter = 1; iter <= SuperGlobals.runModelIterations; iter++) {
Plot_Initialize();

set_all_rngs(SuperGlobals.randseed, iter, 0, 0);

Globals->currIter = iter;

if (storeAllIterations) {
Expand All @@ -234,6 +232,8 @@ int main(int argc, char **argv) {

//printf("------------------------Repetition/year = %d / %d\n", iter, year);

set_all_rngs(SuperGlobals.randseed, iter, year, 0);

Globals->currYear = year;

rgroup_Establish();
Expand Down
8 changes: 4 additions & 4 deletions ST_mortality.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
#include <string.h>

#include "ST_mortality.h"
#include "sw_src/filefuncs.h"
#include "sw_src/rands.h"
#include "sw_src/myMemory.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/rands.h"
#include "sw_src/include/myMemory.h"
#include "ST_steppe.h"
#include "ST_globals.h"
#include "sw_src/pcg/pcg_basic.h"
#include "sw_src/external/pcg/pcg_basic.h"
#include "sxw_vars.h"


Expand Down
12 changes: 6 additions & 6 deletions ST_mortality.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
#ifndef MORTALITY_H
#define MORTALITY_H

#include "sw_src/generic.h"
#include "sw_src/pcg/pcg_basic.h"
#include "sw_src/include/generic.h"
#include "sw_src/external/pcg/pcg_basic.h"

/* --------------------------- Exported Structs ---------------------------- */

/**
* \brief Information used when simulating the cheatgrass-wildfire loop.
*
*
* The biggest determinant in cheatgrass driven wildfire is precipitation,
* specifically precipitation in Spring and Winter. This struct stores the
* specifically precipitation in Spring and Winter. This struct stores the
* values from previous Spring and Winter precipitation as well as the running
* averages of both.
*
*
* Note that "year" in this context refers to the water year, which runs from
* October to September.
*
*
* \sa _updateCheatgrassPrecip, where this struct is updated each year.
* \author Chandler Haukap
* \date 13 January 2020
Expand Down
6 changes: 3 additions & 3 deletions ST_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
#include <string.h>
#include "ST_steppe.h"
#include "ST_globals.h"
#include "sw_src/filefuncs.h"
#include "sw_src/myMemory.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/myMemory.h"


/******** Modular External Function Declarations ***********/
/* -- truly global functions are declared in functions.h --*/
/***********************************************************/
#include "sw_src/SW_Model.h" // externs `SW_Model`
#include "sw_src/include/SW_Model.h" // externs `SW_Model`


/*------------------------------------------------------*/
Expand Down
6 changes: 3 additions & 3 deletions ST_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#include <ctype.h>
#include <errno.h>
#include "ST_steppe.h"
#include "sw_src/filefuncs.h"
#include "sw_src/myMemory.h"
#include "sw_src/rands.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/rands.h"
#include "sxw_funcs.h"
#include "ST_globals.h"
#include "sxw_vars.h"
Expand Down
6 changes: 3 additions & 3 deletions ST_resgroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include <string.h>
#include "ST_steppe.h"
#include "ST_globals.h"
#include "sw_src/myMemory.h"
#include "sw_src/rands.h"
#include "sw_src/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/rands.h"
#include "sw_src/include/filefuncs.h"
#include "sxw_funcs.h"


Expand Down
6 changes: 3 additions & 3 deletions ST_seedDispersal.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "ST_defines.h"
#include "ST_grid.h"
#include "ST_seedDispersal.h"
#include "sw_src/rands.h"
#include "sw_src/myMemory.h"
#include "sw_src/rands.h"
#include "sw_src/include/rands.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/rands.h"

float _distance(int x1, int y1, int x2, int y2, float cellWidth);
Bool _shouldProduceSeeds(SppIndex sp);
Expand Down
6 changes: 3 additions & 3 deletions ST_species.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <string.h>
#include "ST_steppe.h"
#include "ST_globals.h"
#include "sw_src/filefuncs.h"
#include "sw_src/myMemory.h"
#include "sw_src/rands.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/rands.h"
#include "ST_spinup.h"
#include "ST_seedDispersal.h" // externs `UseSeedDispersal`

Expand Down
22 changes: 11 additions & 11 deletions ST_spinup.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
#include "ST_stats.h"
#include "ST_globals.h" // externs UseProgressBar
#include "ST_mortality.h"
#include "sw_src/rands.h"
#include "sw_src/SW_SoilWater.h" // externs SW_Soilwat
#include "sw_src/SW_Weather.h" // externs SW_Weather
#include "sw_src/SW_Site.h" // externs SW_Site
#include "sw_src/SW_VegProd.h" // externs SW_VegProd
#include "sw_src/SW_Markov.h"// externs `markov_rng`
#include "sw_src/include/rands.h"
#include "sw_src/include/SW_SoilWater.h" // externs SW_Soilwat
#include "sw_src/include/SW_Weather.h" // externs SW_Weather
#include "sw_src/include/SW_Site.h" // externs SW_Site
#include "sw_src/include/SW_VegProd.h" // externs SW_VegProd
#include "sw_src/include/SW_Markov.h"// externs `markov_rng`
#include "sxw_funcs.h"
#include "sw_src/myMemory.h"
#include "sw_src/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "sw_src/include/filefuncs.h"
#include "ST_progressBar.h"
#include "ST_grid.h" // externs grid_rng
// externs `prepare_IterationSummary`, `storeAllIterations`
#include "sw_src/SW_Output.h"
#include "sw_src/SW_Output_outtext.h" // externs `print_IterationSummary`
#include "sw_src/SW_Output_outarray.h"
#include "sw_src/include/SW_Output.h"
#include "sw_src/include/SW_Output_outtext.h" // externs `print_IterationSummary`
#include "sw_src/include/SW_Output_outarray.h"
#include "ST_functions.h" // externs `environs_rng`, `resgroups_rng`, `species_rng`


Expand Down
4 changes: 2 additions & 2 deletions ST_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

#include <string.h>
#include "ST_steppe.h"
#include "sw_src/filefuncs.h"
#include "sw_src/myMemory.h"
#include "sw_src/include/filefuncs.h"
#include "sw_src/include/myMemory.h"
#include "ST_stats.h" // Contains most of the function declarations.
#include "ST_seedDispersal.h" // externs `UseSeedDispersal`
#include "ST_globals.h"
Expand Down
2 changes: 1 addition & 1 deletion ST_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef STEPPE_STRUCT_DEF
#define STEPPE_STRUCT_DEF

#include "sw_src/generic.h"
#include "sw_src/include/generic.h"
#include "ST_mortality.h"

/**
Expand Down
Loading