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

Soilwat co2 effects #22

Merged
merged 90 commits into from
Dec 14, 2017
Merged

Soilwat co2 effects #22

merged 90 commits into from
Dec 14, 2017

Commits on Mar 23, 2017

  1. Add initial CO2 effects on biomass

    TODO:
    * Remove the additional start() parameters once that data is transferred to inputData
    * Test with rSFSW2 and rSOILWAT2 once changes have been done there (has succesfully worked with local old repos)
    * Confirm placement of global variable initializations
    Zachary-Kramer committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    1755c28 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2017

  1. Add support for rSOILWAT2

    Includes:
    * Adding a structure SW_Carbon to avoid clogging up the global space
    * Moved R CO2 settings to S4 class
    * onGet/onSet functions to interact with S4 class and its respective object
    * Removal of additional parameters to SEXP start()
    
    SOILWAT2 remains fully functional by itself, and seems fully functional with rSOILWAT2's CO2 branch
    Zachary-Kramer committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    4e07494 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2017

  1. Configuration menu
    Copy the full SHA
    71bcd9f View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2017

  1. Configuration menu
    Copy the full SHA
    1a53bcf View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2017

  1. Change multiplier equations and PPMs

    This changes results massively. Linear equations were previously used for WUE and Biomass multipliers, which have been switched to power equations in this commit. Additionally, the correct source is being used for the PPMs now.
    Zachary-Kramer committed Apr 28, 2017
    Configuration menu
    Copy the full SHA
    2ff6863 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2017

  1. Changes to output

    * @biomass --> @CO2EFFECTS
    * Added yearly output
    * Added a total biomass column
    * Added a WUE multiplier column
    * Removed additional column
    * This slot, and this slot only, now reflects the proper future simulation years
    Zachary-Kramer committed May 2, 2017
    Configuration menu
    Copy the full SHA
    1de06cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b9e2f19 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2017

  1. ALL output slots now display correct simulation year

    Previously, when future scenarios were run, the original years would be used as output. For instance, a scenario in 2020-2050 would have outputs from 1980-2010. I've utilized the delta year that I pass in for carbon effects and added it to the model year ONLY IN THE OUTPUT FUNCTIONALITY. The rest of the model still needs the 'incorrect' years.
    Zachary-Kramer committed May 4, 2017
    Configuration menu
    Copy the full SHA
    050dfbb View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2017

  1. Close #16

    Apply biomass multiplier to tree's fraction live biomass, not total biomass. Note that the output column name still needs to be changed in rSFSW2/rSOILWAT2.
    Zachary-Kramer committed Jul 1, 2017
    Configuration menu
    Copy the full SHA
    0649b9f View commit details
    Browse the repository at this point in the history
  2. @CO2EFFECTS Column "TreeBiomass" --> "TreePctLive"

    Disregard the description in the last commit, I forgot that SOILWAT2 holds the instance of the rSOILWAT2 output class
    Zachary-Kramer committed Jul 1, 2017
    Configuration menu
    Copy the full SHA
    cfd7b66 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2017

  1. Configuration menu
    Copy the full SHA
    0259df9 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2017

  1. Configuration menu
    Copy the full SHA
    469652c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c17ce29 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2f644d1 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2017

  1. Add a constructor for the SW_CARBON structure, remove legacy defensiv…

    …e code
    
    Close #29: CO2 multipliers incorrect when scenario doesn't exist
    Close #34: Properly initialize the CO2 variables
    Zachary-Kramer committed Aug 19, 2017
    Configuration menu
    Copy the full SHA
    0810780 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2017

  1. Configuration menu
    Copy the full SHA
    9b075bb View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2017

  1. Merge branch 'master' into soilwat_co2_effects

    # Conflicts:
    #	makefile --> merged
    #	makefile_n --> removed
    Zachary-Kramer committed Sep 1, 2017
    Configuration menu
    Copy the full SHA
    06ecd23 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2017

  1. Close #15: Reformat CO2 code

    Tabs to spaces, reducing reliance on hard-coded values, constructor, comments, change the stomatal term to water-usage efficiency, be more consistent on variable names
    Zachary-Kramer committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    9940e62 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2017

  1. Reset the default input year to 2010

    2280 was used to test the performance and robustness of CO2 calculations
    Zachary-Kramer committed Sep 27, 2017
    Configuration menu
    Copy the full SHA
    75b1359 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2017

  1. 2 Configuration menu
    Copy the full SHA
    6d4c7e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a924ee9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a8b55a2 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2017

  1. Configuration menu
    Copy the full SHA
    cd23a9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8f656b View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2017

  1. Configuration menu
    Copy the full SHA
    ebd139a View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2017

  1. Configuration menu
    Copy the full SHA
    09795c5 View commit details
    Browse the repository at this point in the history
  2. Updated 'onSet_swCarbon'

    - updated code because GET_SLOT(object, install("CO2ppm") is now a
    matrix with two columns 'Year' and 'CO2ppm'
    - we first need to find the correct row based on 'Year'
    - then we can loop and extract CO2 concentration data
    dschlaep committed Nov 16, 2017
    2 Configuration menu
    Copy the full SHA
    2be529c View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2017

  1. Prepare code to use function SW_CBN_read to read CO2 from file

    - functions 'onGetInputDataFromFiles' and '_read_inputs' are now
    reading in CO2 data from the input file on disk -- in parallel to their
    behavior of reading in all other data from disk files
    - function 'onGetInputDataFromFiles' gained an internal 'debug'
    variable which now prints debug statements (instead having comments in
    the code)
    - Function 'SW_CBN_read' is currently a mock
    dschlaep committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    445fa79 View commit details
    Browse the repository at this point in the history
  2. Implement functionality of 'SW_CBN_read'

    - split previous '#ifndef RSOILWAT' version of function
    'calculate_CO2_multipliers' up into its two parts:
    (1) read data from file --> code copied to 'SW_CBN_read'
    (2) calculate CO2 multipliers --> code merged with '#ifdef RSOILWAT'
    version of function 'calculate_CO2_multipliers'
    
    - nonsensical CO2 value check "ppm < 0.1 && ppm > -0.1" replaced with
    "LT(ppm, 0.)" in function 'calculate_CO2_multipliers'
    dschlaep committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    bdb5afa View commit details
    Browse the repository at this point in the history
  3. Update documentation

    dschlaep committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    08ae6cd View commit details
    Browse the repository at this point in the history
  4. Fix SW_CBN_read: module-level MyFileName must exist

    Previously, the module-level variable 'MyFileName' was only created if
    not RSOILWAT, but the new function 'SW_CBN_read' needs this variable
    whether or not RSOILWAT
    dschlaep committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    c7ec0b6 View commit details
    Browse the repository at this point in the history
  5. Fix rSOILWAT2 compilation issues

    Code still not functional
    Zachary-Kramer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    6434458 View commit details
    Browse the repository at this point in the history
  6. Clean up warnings with C function registration for rSOILWAT2

    - variable 'CEntries' was not initialized properly because we don't
    have a .C() call in rSOILWAT2
    dschlaep committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    6117125 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2017

  1. Macro for printing

    - addressing issue #33
    - defined macro for printing so that we can write `swprintf(format,
    ...)` whether we are compiling with RSOILWAT flag or for standalone
    SOILWAT2
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    dcc320c View commit details
    Browse the repository at this point in the history
  2. Clarify init function and define cleanly input functions

    - function 'SW_CTL_init_model' no longer calls '_read_inputs' so that
    we can call it inside the function 'onGetInputDataFromFiles' for
    initialization only
    - renamed '_read_inputs' to 'SW_CTL_obtain_inputs'
    - defined 'SW_CTL_read_inputs_from_disk'
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    1349674 View commit details
    Browse the repository at this point in the history
  3. Work towards fixing 'onSet_swCarbon'

    - GET_SLOT(object, install("CO2ppm")) is a vector of length 2 where the
    first element is the vector of years and the second element are the CO2
    values.
    - n = length is now correctly calculated
    - but finding the correct year and extracting the data still fail
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    f116865 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a2d9737 View commit details
    Browse the repository at this point in the history
  5. Work on 'onSet_swCarbon'

    - code compiles for RSOILWAT, but likely crashes during run-time
    - handle S4 class object by coercing to vectors: '*years' and '*CO2ppm'
    - fixed logic of loop to locate index of first year for which we need
    CO2 data --> if we found the index of the year then 'break' (instead of
    'continue') otherwise increment index
    - fixed logic of check that we have enough data --> we need at least
    index plus number of simulation years of available data (and not
    'c->addtl_yr')
    - fixed logic of loop to copy CO2 concentration values to SOILWAT
    variable --> make sure that we don't overflow either the index nor the
    maximal number of CO2 years
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    2e22144 View commit details
    Browse the repository at this point in the history
  6. Make sure that function 'SW_SIT_read' reads carbon settings properly

    - added debug print statements
    - aligned inputting of c->use_bio_mult, c->use_wue_mult, and
    c->scenario with other code in the function
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    84b3de6 View commit details
    Browse the repository at this point in the history
  7. Fix 'onGet_SW_CARBON'

    - close DrylandEcology/rSOILWAT2#77
    - The function 'onGet_SW_CARBON' did not copy the values of the C
    variable `SW_Carbon` into a new created R-typed (S4-classed rSOILWAT2)
    variable representation.
    
    - fix condition of loop to copy CO2 values in function 'onSet_swCarbon'
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    152d0dc View commit details
    Browse the repository at this point in the history
  8. Explain index of struct 'SW_CARBON'

    explain how calendar years are represented
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    5ba8d32 View commit details
    Browse the repository at this point in the history
  9. Fix 'onGet_SW_CARBON' (again)

    - fix column names of CO2ppm matrix
    - also copy 'Scenario' name to C representation
    - use a dedicated SEXP variable 'CO2ppm' to copy the content of the S4
    class slot of same name and convert to a real vector 'values' (which
    can now easily be accessed)
    - cleaner implementation of 'Locate index of first year'
    - fix logic of 'Check that we have enough data' (i is base1 here)
    -
    dschlaep committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    d6d58de View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2017

  1. Updated comments that reference CO2 is 360 ppm

    - contributing to issue #59
    dschlaep committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    ef9e3a4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cae7df8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cb4bf87 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2017

  1. Configuration menu
    Copy the full SHA
    521b8e5 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2017

  1. Configuration menu
    Copy the full SHA
    1eeaa85 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2017

  1. Configuration menu
    Copy the full SHA
    b6c3263 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2017

  1. Configuration menu
    Copy the full SHA
    179f83b View commit details
    Browse the repository at this point in the history
  2. Fix multiple definitions of global variable 'SW_Carbon'

    - The global variable 'SW_Carbon' is defined in 'SW_Carbon.c'.
    - Instead of being externed, it was re-defined in 'SW_Flow_lib.c',
    'SW_Flow.c', 'SW_Site.c', and 'SW_VegProd.c'.
    - Similar bug fix for variables 'SW_VegProd' and 'SW_Model' in file
    'SW_Carbon.c'
    dschlaep committed Nov 27, 2017
    1 Configuration menu
    Copy the full SHA
    392e88b View commit details
    Browse the repository at this point in the history
  3. New file SW_Output_mock.c for unit tests

    - until we resolve issue #85, we need the functions from 'SW_Output.c'
    defined alternatively
    - SW_Output_mock.c provides mock definitions for these functions
    - compiling unit tests with 'SW_Output_mock.c' allows us to include
    'SW_Output.h' in our unit test files
    
    - note: I attempted to eliminate compile warnings (hence some weird
    code snippets), but one warning remains
    > SW_Output_mock.c:204:13: warning: unused function '_echo_outputs'
    [-Wunused-function]
    static void _echo_outputs(void)
    dschlaep committed Nov 27, 2017
    Configuration menu
    Copy the full SHA
    97d373b View commit details
    Browse the repository at this point in the history
  4. Updated 'main' for unit tests

    - We need to initialize and take down SOILWAT2 variables by imitating
    'SW_Main.c/main()' because SOILWAT2 uses (global) states.
    
    - To initialize the global SOILWAT2 variables, I set up the unit test
    code to read from the SOILWAT2-standalone input files contained in the
    folder 'testing/'.
    dschlaep committed Nov 27, 2017
    Configuration menu
    Copy the full SHA
    d75eed9 View commit details
    Browse the repository at this point in the history
  5. First attempt at unit testing 'SW_Carbon'

    - new file with unit tests 'test_SW_Carbon.cc'
    - more unit tests to come
    
    > make test test_run
    c++ -Wall -Wextra -std=gnu++11		 -L. -isystem
    googletest/googletest/include -pthread \
    				test/*.cc -o sw_test -lgtest -lSOILWAT2++ -lm
    ./sw_test
    [==========] Running 3 tests from 3 test cases.
    [----------] Global test environment set-up.
    [----------] 1 test from BetaGeneratorDeathTest
    [ RUN      ] BetaGeneratorDeathTest.Errors
    [       OK ] BetaGeneratorDeathTest.Errors (8 ms)
    [----------] 1 test from BetaGeneratorDeathTest (8 ms total)
    
    [----------] 1 test from CarbonTest
    [ RUN      ] CarbonTest.Constructor
    [       OK ] CarbonTest.Constructor (0 ms)
    [----------] 1 test from CarbonTest (0 ms total)
    
    [----------] 1 test from BetaGeneratorTest
    [ RUN      ] BetaGeneratorTest.ZeroToOneOutput
    [       OK ] BetaGeneratorTest.ZeroToOneOutput (0 ms)
    [----------] 1 test from BetaGeneratorTest (0 ms total)
    
    [----------] Global test environment tear-down
    [==========] 3 tests from 3 test cases ran. (8 ms total)
    [  PASSED  ] 3 tests.
    dschlaep committed Nov 27, 2017
    Configuration menu
    Copy the full SHA
    aa6a51f View commit details
    Browse the repository at this point in the history
  6. Update README to reflect changes in makefile

    - commit 71258d2 introduced new make
    targets
    dschlaep committed Nov 27, 2017
    Configuration menu
    Copy the full SHA
    32b18fd View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2017

  1. Fixes to function 'SW_CBN_read'

    - The file was not closed after it was opened.
    - added 'debug' variable
    - use 'EQ' instead of testing a floating-point number against exact
    equality to 1
    - declare and initialize variables only after code has exited if no
    multiplier is turned on
    dschlaep committed Nov 28, 2017
    Configuration menu
    Copy the full SHA
    21b3768 View commit details
    Browse the repository at this point in the history
  2. Complete unit tests for SW_Carbon functionality

    - close #63
    
    [----------] 4 tests from CarbonTest
    [ RUN      ] CarbonTest.Constructor
    [       OK ] CarbonTest.Constructor (0 ms)
    [ RUN      ] CarbonTest.ReadInputFile
    [       OK ] CarbonTest.ReadInputFile (0 ms)
    [ RUN      ] CarbonTest.CO2multipliers
    [       OK ] CarbonTest.CO2multipliers (1 ms)
    [ RUN      ] CarbonTest.BiomassCO2effect
    [       OK ] CarbonTest.BiomassCO2effect (0 ms)
    [----------] 4 tests from CarbonTest (1 ms total)
    dschlaep committed Nov 28, 2017
    Configuration menu
    Copy the full SHA
    8e17910 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2017

  1. Add code coverage

    - close #20
    
    - makefile gained targets to estimate code coverage
    * 'make cov' = same as 'make test' but with code coverage support
    * 'make cov_run' = run unit tests and gcov on each source file (which
    were in a previous step compiled with 'make cov')
    
    - new bash script 'run_gcov.sh' which executes 'gcov' for each source
    file; used by 'make cov_run'
    
    - updated travis-ci yml to run code coverage unit tests and connect to
    'codecov' server
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    76af7c5 View commit details
    Browse the repository at this point in the history
  2. Improve travis-ci run of code coverage

    - don't execute 'gcov' for unit test code or 'googletest' submodule
    - 'codecov' will run 'gcov' so that we can use 'make test_run' instead
    of 'make cov_run'
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    c29f726 View commit details
    Browse the repository at this point in the history
  3. Improve makefile

    - remove 'test' dependency of target 'test_run' so that we can call on
    travis-ci 'make cov test_run' where 'test_run' calls the binary
    produced by 'cov' and doesn't first compile and overwrite a
    non-coverage version of the binary
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    5131e10 View commit details
    Browse the repository at this point in the history
  4. Moved documentation files to 'doc/'

    - moved old/outdated code change file to 'doc/'
    - moved bibtex library to 'doc/' and updated 'Doxyfile'
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    3c71a59 View commit details
    Browse the repository at this point in the history
  5. Remove compiled documentation files from remote

    - Remove content of `doc/html/` and only generate documentation locally
    - Added content of `doc/html/` to .gitignore
    - close #88
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    e84a3dc View commit details
    Browse the repository at this point in the history
  6. Re-organized variables: move variables to where others of same kind a…

    …lready exist
    
    - variable 'key2obj' in 'SW_Output.c' contained one entry too many:
    removed one 'eVES'
    
    - moved variable 'addtl_yr' from 'SW_CARBON' to 'SW_MODEL' because it
    has nothing to do with atmospheric CO2 concentration but with
    simulation time
    
    - moved 'MAX_CO2_YEAR' from 'SW_Carbon.h' to 'SW_Defines.h' and renamed
    to 'MAX_NYEAR'
    
    - defined new variable 'simyear' in 'SW_MODEL' to avoid repeated
    calculation of 'year + addlt_yr' (e.g., all SW_Output.c/get_* functions
    use 'simyear')
    
    - 'SW_Carbon.h' define many vegetation variables even though this is
    about vegetation and not about [CO2] and despite that 'SW_VegProd.h'
    already deals with the functional types --> 'SW_VegProd.h' no longer
    needs to include 'SW_Carbon.h'
    * removed struct 'PTFs' (plant functional types) from 'SW_Carbon.h'
    * variable 'co2_multipliers' moved from 'SW_CARBON' to 'VegType'
    * function 'apply_CO2' moved from 'SW_Carbon.c' to 'SW_VegProd.c' and
    renamed to 'apply_biomassCO2effect'
    
    - cleaned up struct 'SW_VEGPROD'
    * defined struct 'VegTypeOut' and 'CoverType'
    
    - adjusted unit tests and moved vegetation-related tests to new file
    'test_SW_VegProd.cc'
    
    - passes all unit tests:
    [==========] Running 7 tests from 4 test cases.
    [----------] Global test environment set-up.
    ....
    [----------] Global test environment tear-down
    [==========] 7 tests from 4 test cases ran. (8 ms total)
    [  PASSED  ] 7 tests.
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    2063e38 View commit details
    Browse the repository at this point in the history
  7. Improve 'SW_CBN_read' and eliminate compile warnings

    - function 'SW_CBN_read' gained check that 'year' inputs are not
    negative (values are used as index, hence negative values are not
    allowed).
    
    - eliminate compile warnings
    * warning: 'XXX' may be used uninitialized in this function
    [-Wmaybe-uninitialized]
    * warning: format ‘%d’ expects argument of type ‘int *’, but argument 3
    has type ‘TimeInt *’ [-Wformat=]
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    f57240d View commit details
    Browse the repository at this point in the history
  8. Add debug print statements to 'SW_CBN_read'

    - attempt to eliminate compile warnings
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    ea720d0 View commit details
    Browse the repository at this point in the history
  9. Fix function 'SW_CTL_obtain_inputs'

    - function 'SW_CTL_obtain_inputs' was supposed to call
    `calculate_CO2_multipliers()` which it did in the past
    
    - commit 6db701f removed the call to
    `calculate_CO2_multipliers()` at the end of the function
    `SW_CTL_obtain_inputs` previously named `_read_inputs` without
    replacing it -- for some reason (that I don't understand) git blame and
    diffs don't show this line being deleted by this commit
    dschlaep committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    d3c8522 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0166500 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2017

  1. Unit tests: properly reset global states

    - the order in which tests are executed is not fixed
    - each TEST() must carefully reset global states -- this is a pain
    because our old SOILWAT2 c code is rich in functions that manipulate
    global states
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    bf4826c View commit details
    Browse the repository at this point in the history
  2. Remove debug setting

    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    4175066 View commit details
    Browse the repository at this point in the history
  3. Improve 'LogError'

    - `REvprintf()` returns void unlike `vfprintf()`; thus we cannot check
    for EOF
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    d787ce0 View commit details
    Browse the repository at this point in the history
  4. Fix sumof_vpd

    - function `LogError` should only be called with argument `logfp` and
    no longer with `stderr` or `stdout` directly (see commit
    4e0cc0e)
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    fe029d6 View commit details
    Browse the repository at this point in the history
  5. Fix output for CO2-effect related variables

    - close DrylandEcology/rSOILWAT2#78
    - close DrylandEcology/rSOILWAT2#73
    
    - file 'testing/Input/outsetup_v31.in'
    * fully explain what output columns are
    * rename output file to 'vegetation' from 'co2_effects'
    
    - function '_collect_values()' did not call `SW_OUT_sum_today(eVPD)`
    
    - return value of function 'get_co2effects' was 'void' instead of
    'static void' as every other 'get_*' function
    
    - function 'SW_OUT_flush' did not call `SW_OUT_sum_today(eVPD)`
    
    - function 'sumof_vpd' only ever added biomass values into output slots
    from 'Today' which is 1 -- the correct index is 'SW_Model.doy'
    
    - function 'average_for' precluded 'ObjType's other than 'eSWC' and
    'eWTH' to perform averaging
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    48b586b View commit details
    Browse the repository at this point in the history
  6. Update to inputs for testing simulation

    - turn on all cover types
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    c243ec3 View commit details
    Browse the repository at this point in the history
  7. 'nullptr' is c++11 which is not good for rSOILWAT2

    - replace 'nullptr' with 'NULL'
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    cff992a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    69da0d9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f029b38 View commit details
    Browse the repository at this point in the history
  10. Attempt to fix rSOILWAT #81

    - addressing issue
    DrylandEcology/rSOILWAT2#81
    - define 'OBJECTS' and 'SOURCES' for rSOILWAT2 compilation
    dschlaep committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    bb34a97 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2017

  1. 1 Configuration menu
    Copy the full SHA
    5387c0d View commit details
    Browse the repository at this point in the history
  2. More detailed explanation in prodin comments for CO2 effects

    Coefficients assume that monthly biomass inputs reflect values for
    conditions at 360 ppm CO2, i.e., Coeff1 * x^Coeff2 = 1 for x = 360 CO2
    ppm
    dschlaep committed Dec 1, 2017
    Configuration menu
    Copy the full SHA
    613db62 View commit details
    Browse the repository at this point in the history
  3. Move rSOILWAT2 files and makefile targets to rSOILWAT2/src/

    - addressing DrylandEcology/rSOILWAT2#81
    and DrylandEcology/rSOILWAT2#66
    
    - Makevars, SW_R_init.c, SW_R_lib.c, and SW_R_lib.h are not used by
    SOILWAT2 -- they are rSOILWAT2 files
    - remove rSOILWAT2 shared object target from makefile
    --> this commit requires that the removed files are added to
    rSOILWAT2/src/ and that the source code of SOILWAT2 is now a submodule
    in rSOILWAT2/src/SOILWAT2/ -- instead of rSOILWAT2/src/
    dschlaep committed Dec 1, 2017
    Configuration menu
    Copy the full SHA
    39e23c9 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2017

  1. Fix fatal crash that occured when trying to send a specific error mes…

    …sage
    
    Also, i was a high number because the simstart year was 1979 and only data for 1980-2010 was provided, so the loop iterated i many times.
    Zachary-Kramer committed Dec 2, 2017
    1 Configuration menu
    Copy the full SHA
    48f3588 View commit details
    Browse the repository at this point in the history
  2. Fix end of loop in 'onSet_swCarbon'

    If the 'values' object doesn't contain the value of 'year', then the
    loop was not behaving properly and didn't stop until 'i' was extremely
    large.
    
    Fix: add condition that i remains less than maximum number of years.
    
    This and commit 48f3588 close
    DrylandEcology/rSOILWAT2#80
    dschlaep committed Dec 2, 2017
    Configuration menu
    Copy the full SHA
    005b658 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2017

  1. Configuration menu
    Copy the full SHA
    21f1bbf View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2017

  1. Configuration menu
    Copy the full SHA
    4217f97 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into soilwat_co2_effects

    # Conflicts:
    #	SW_Output.c
    #	SW_Site.c
    #	generic.c
    #	makefile
    #	testing/Input/siteparam.in
    #	testing/Input/veg.in
    #	testing/Input/years.in
    #	testing/files_v31.in
    dschlaep committed Dec 8, 2017
    Configuration menu
    Copy the full SHA
    188fc58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d8944d View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2017

  1. Configuration menu
    Copy the full SHA
    51d03e4 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into soilwat_co2_effects

    # Conflicts:
    #	SW_Output.c
    dschlaep committed Dec 11, 2017
    Configuration menu
    Copy the full SHA
    8204258 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2017

  1. Configuration menu
    Copy the full SHA
    522ac34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    61cca29 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2017

  1. Close #96: Add 'Default' scenario to carbon.in

    siteparam.in still uses RCP85 by default
    Zachary-Kramer committed Dec 14, 2017
    Configuration menu
    Copy the full SHA
    8eb69d2 View commit details
    Browse the repository at this point in the history