Closed dschlaep closed 4 years ago
@dschlaep I am very sorry to hear this! What a pain. On a positive note, this bug appears to have not much affect on biomass within STEPWAT2.
Year = 1970 1 iter seed 7, mean total biomass = 544.059
Year = 1980 1 iter seed 7, mean total biomass = 544.157
I also examined output for 100 iters (but of course this is less directly comparable because of potentially different random seeds between runs)
Year = 1970 100 iter seed 0, mean total biomass = 573.24
Year = 1980 100 iter seed 0, mean total biomass = 581.30
STEPWAT2
produces (slightly) different outputs depending on the time the code is executed -- independent of inputs. The output varies depending on whether year (when the simulation is run) is a leap year or not.This issue is caused by a bug in
SOILWAT2
, see https://github.com/DrylandEcology/SOILWAT2/issues/273To reproduce this error: (i) change your time or (ii) modify function
sw_src/Times.c/Time_now()
. Here code for the latter option:--> depending on user time leap/non-leap year,
Output_ref
will be either identical toOutput_ref1970
(non-leap year) or toOutput_ref1980
(leap year), but not both becauseOutput_ref1970
andOutput_ref1980
are different (despite identical seed) -- whereasOutput_ref1970
andOutput_ref1990
are identical (both non-leap years)