Recent Releases of SOILWAT2
SOILWAT2 - v8.1.1
-
Simulation output remains the same as the previous version.
-
Soil water retention curve parameters that are non-finite now throw an error.
-
Fix scaling of daily meteorological variables (#454).
-
Warning and error messages are now, by default, written to logs/logfile.log
-
nc-based SOILWAT2 can now use a "netCDF" file to provide inputs for constant soil temperature at depth "Tsoil_constant" (which now can vary across the simulation domain). The new example input is "inSite/tas-clim.nc" reproducing the corresponding value from text-based "siteparam.in".
Hydrosphere - Freshwater and Hydrology
- C
Published by N1ckP3rsl3y 2 months ago

SOILWAT2 - v8.1.0
-
This version produces similar but not identical simulation output as previously because of the following changes:
- Small deviations arise from replacing all remaining variables of type float with type double (see commit 62237ae on 2024-July-30).
- Saturated percolation is now limited which leads to different outcomes during periods of high infiltration (e.g., snowmelt) and during conditions of low hydraulic conductivity (e.g., frozen soils, sapric organic matter).
- Depth of snowpack is now consistent with snowpack water content.
- Surface temperature extremes are now less sensitive to high biomass, and average surface temperature is now more consistent with daily extremes.
-
The two modes of SOILWAT2 can now be compiled with the following flags:
make CPPFLAGS=-DSWTXT
(or as previouslymake all
) for txt-basedmake CPPFLAGS=-DSWNC
for nc-based SOILWAT2.
-
SOILWAT2 now ends gracefully with termination (SIGTERM) and interrupt (SIGINT, commonly CTRL+C on the keyboard) signals.
-
nc-based SOILWAT2 can now use a large variety of
"netCDF"
data sources as inputs (#389; @N1ckP3rsl3y, @dschlaep). The user identifies in"SW2_netCDF_input_variables.tsv"
which input variables are provided by"netCDF"
(and vary among simulation runs, i.e., sites or grid cells); remaining inputs are obtained from the same text files as in txt-based mode (and are constant among simulation runs). -
"ncTestRuns"
provide a new framework that comprehensively tests nc-based SOILWAT2 via the script"tools/check_ncTestRuns.sh"
by creating, executing, and checking more than 40 test runs.- Comprehensive set of spatial configurations of simulation domains and input netCDFs (see
"tests/ncTestRuns/data-raw/metadata_testRuns.csv"
) - Runs with daily inputs from external data sources including
"Daymet"
,"gridMET"
, and"MACAv2METDATA"
(if available) - One site/grid cell in the simulation domain is set up to correspond to the reference run (which, by default, is equivalent to
"tests/example"
in txt-based mode); output at that site/grid cell is compared against the reference output
- Comprehensive set of spatial configurations of simulation domains and input netCDFs (see
-
Tests now require
c++17
and utilizegoogletest
v1.15.2
(issue #427). -
SOILWAT2 can now represent the influence of soil organic matter on the soil water retention curve and the saturated hydraulic conductivity parameter (#397; @dschlaep). The implemented approach first determines organic matter properties for the soil layers assuming fibric peat characteristics at the soil surface and characteristics of sapric peat at a user-specified depth. Then, bulk soil parameters of the soil water retention curve are estimated as linear combinations of properties for the mineral soil component and of properties for the organic matter soil component using the proportion of organic matter in the bulk soil as weights. The bulk soil saturated hydraulic conductivity parameter accounts for flow pathways through organic matter above a threshold and assumes conductivities through mineral and organic components in series outside of those pathways.
-
Saturated percolation is now limited. The upper bound is a function based on the saturated hydraulic conductivity parameter (which includes effects of organic matter), frozen soils, and a user-specified
"permeability"
factor. -
Fix the calculation of depth of snowpack (#441; @dschlaep). Depth of snowpack is now calculated after sublimation occurred and is based on snowpack density that now is always larger than 0; this now makes depth of snowpack and snowpack water content consistent.
-
Fix the estimation of surface temperature (#440; @dschlaep). Biomass effects are now capped at a value at which cooling and heating effects on minimum and maximum surface temperature result, across average conditions, in no change for mean surface temperature. Effects of maximum air temperature on maximum surface temperature are limited to air temperatures above freezing. Minimum and maximum surface temperature are now set to their average (with a warning) if the initial estimate of minimum surface temperature is larger than the initial estimate of maximum surface temperature. Average surface temperature is now (by default) estimated from minimum and maximum surface temperature (instead of independently as previously), but the old method can be selected.
Changes to inputs
- New input via
"siteparam.in"
to specify the depth at which characteristics of organic matter have completely switched from fibric to sapric peat (default is 50 cm). - New input via
"siteparam.in"
to select the method for estimating surface temperature (with a new default). - New input via
"soils.in"
to provide the proportion of soil organic matter to bulk soil by weight for each soil layer. - New input via
"swrc_params*.in"
to provide parameter values of the soil water retention curve representing fibric and sapric peat. Note: Some parameter values for the"FXW"
SWRC are missing. "climate.in"
: new snow density values for July, August and September estimated with linear interpolation from June and October values.- New command line option
"-p"
to prepare the domain/progress, index, and output files; with this flag, no simulations will be run.
Changes to inputs for nc-based SOILWAT2
- New tab-separated value
"tsv"
input file"SW2_netCDF_input_variables.tsv"
that lists, activates, and describes each input from"netCDF"
files. This file replaces"files_nc.in"
. "desc_nc.in"
provides new inputs for the names of geographic and projected"CRS"
variables as well as names for the spatial coordinate axes and variables.- New example inputs as
"netCDF"
files that exactly txt-based inputs"inClimate/monthlyClimate.nc"
corresponding to"climate.in"
"inSoil/soil.nc"
and"inSoil/swrcp.nc"
corresponding to"soils.in"
and"swrc_params.in"
"inTopo/topo.nc"
corresponding to"modelrun.in"
"inVeg/veg2.nc"
and"inVeg/vegPFT.nc"
corresponding to"veg.in"
"inWeather/weather.nc"
corresponding to"data_weather/weath.*"
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v8.0.1...v8.1.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep 3 months ago

SOILWAT2 - v8.0.1
-
Simulation output remains the same as the previous version unless relative humidity is calculated from vapor pressure or specific humidity.
-
Fix the calculation of relative humidity (#435; @dschlaep). Previously, relative humidity was incorrectly calculated if based on vapor pressure or specific humidity. The calculation of relative humidity from specific humidity now also uses elevation (to estimate air pressure).
-
Fix the count of days on which a missing weather value was replaced by a non-missing value from the preceding day for the method
"LOCF"
(last observation carried forward; #437; @dschlaep). Previously, any day with a missing weather value was counted. -
Changes to inputs: Units of specific humidity inputs changed from
"%"
to"g kg-1"
.
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v8.0.0...v8.0.1
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep 5 months ago

SOILWAT2 - v8.0.0
-
Simulation output remains the same as the previous version. However, output of establishment/recruitment for two species is now generated by default by the example simulation run.
-
SOILWAT2 can now be compiled in one of two modes:
"nc"
and"text"
(#361, #362, #363; @N1ckP3rsl3y, @dschlaep):"nc"
-based SOILWAT2: output files are produced in"netCDF"
format; input files in"netCDF"
format are currently limited to the"domain"
. This mode is compiled if the new preprocessor definition"SWNETCDF"
and the"netCDF-c"
library are available, e.g.,make CPPFLAGS=-DSWNETCDF all
"text"
-based SOILWAT2 (as previously): output files are plain text that are formatted as comma-separated values"csv"
; input files are plain text.
-
SOILWAT2 now represents a simulation
"domain"
, i.e., a set of (independent) simulation units/runs (#360; @N1ckP3rsl3y, @dschlaep). A"domain"
is defined by either a set of"sites"
or by a"xy"
-grid. The current simulation set consists of simulation units within a"domain"
that have not yet been simulated. Simulation units are identified via"suid"
(simulation unit identifier).- Input text files are read once and now populate a
"template"
that is used for each simulation unit. - New
SW_CTL_RunSimSet()
loops over the simulation set or runs one user specified simulation unit. It writes warning and error messages from all simulation units to thelogfile
but does not exit if a simulation unit fails (main()
will exit with an error if it fails or if every simulation unit produced an error). - New
SW_CTL_run_sw()
takes a deep copy of the"template"
as basis for each simulation unit. - For
"netCDF"
-based SOILWAT2, information about the"domain"
(i.e., simulation units and their geographic locations) is obtained from"domain.nc"
(#361; @N1ckP3rsl3y, @dschlaep). - For
"nc"
-based SOILWAT2, simulation progress (success/failure) is tracked by"progress.nc"
(#387; @N1ckP3rsl3y, @dschlaep); progress tracking makes re-starts after partial completion of the simulation set by an earlier execution possible.
- Input text files are read once and now populate a
-
SOILWAT2 can now be compiled with
"udunits2"
to convert output to user requested units (#392; @dschlaep, @N1ckP3rsl3y).- Unit conversion is available only in
"nc"
-mode and if compiled with the new preprocessor definition"SWUDUNITS"
and if the"udunits2"
library is available, e.g.,make CPPFLAGS='-DSWNETCDF -DSWUDUNITS' all
. - Users request output units via field
"netCDF units"
of the input file"SW2_netCDF_output_variables.tsv"
.
- Unit conversion is available only in
-
Tests now utilize the same template/deep-copy approach (@dschlaep), i.e., input files from
test/example/
populate a"template"
and test fixture deep copy the"template"
(avoiding repeated reading from disk). -
SOILWAT2 gained basic time tracking and reporting (#380; @dschlaep). Temporal resolution may only be full seconds (for C99) but could be sub-seconds (for C11 or later). The runs over the simulation set end gracefully if a user specified wall time limit is (nearly) reached (nearly is defined by
SW_WRAPUPTIME
). A report is written tostdout
or (silently) to thelogfile
if user requested quiet mode; the report includes- Overall wall time and proportion of wall time for the simulation set
- Time of simulation units and reports average, standard deviation minimum and maximum time.
-
SOILWAT2 gained spin-up functionality (#379; @niteflyunicorns, @dschlaep). A user-requested sequence of (random) years is simulated (without output) before the actual simulation run to provide better starting values (e.g., soil moisture, soil temperature). User inputs are obtained from
"domain.in"
. -
The random number generator
"pcg"
is now a submodule of a forked copy of the previous repositoryimneme/pcg-c-basic
(#353; @dschlaep). This allowed us to fix a function declaration without a prototype. -
Specified a consistent code style and formatted code, header include directives, doxygen documentation, and updated code contribution guidelines (#316; @dschlaep).
Changes to inputs
- New input file
"domain.in"
with input variables that specify type and spatial dimensions of the simulation"domain"
(with a backwards compatible default of one site), start and end year (the latter previously in"years.in"
), and spin-up information (mode, duration, scope). This input file uses a key-value pair approach, i.e., inputs must use the correct key while they don't have to be on a specific line (as they have to be in other input files). - Input file
"years.in"
was removed (content moved to"domain.in"
). - New input file
"modelrun.in"
with inputs for geographic coordinates and topography (previously in"siteparam.in"
). - Input file
"siteparam.in"
lost inputs for geographic coordinates and topography (content moved to"modelrun.in"
). - Input file
"files.in"
gained two entries for"nc"
-based SOILWAT2. - New command line option
"-s X"
whereX
is a simulation unit identifier; if the option"-s X"
is absent orX
is0
, then all simulation units in the simulation"domain"
are run; otherwise, only the simulation unitX
is run. - New command line option
"-t X"
whereX
is the wall time limit in seconds. The code gracefully ends early if the wall time reaches a limit ofX - SW_WRAPUPTIME
seconds; if the option"-t X"
is absent, then there is (practically) no wall time limit. - New command line option
"-r"
to rename netCDF domain template file to domain file name provided in"Input_nc/files_nc.in"
.
Changes to outputs
- Output of establishment/recruitment for two species is now generated by default by the example simulation run (#411; @dschlaep).
"nc"
-based SOILWAT2
Changes to inputs and outputs for "nc"
-based SOILWAT2 is compiled if the new preprocessor definition"SWNETCDF"
is available, e.g.,make CPPFLAGS=-DSWNETCDF all
; the capability to convert units is compiled with the new preprocessor definition"SWUDUNITS"
, e.g.,make CPPFLAGS='-DSWNETCDF -DSWUDUNITS' all
- User-specified paths to external headers and libraries can be provided
"netCDF-c"
headers:NC_CFLAGS="-I/path/to/include"
"netCDF-c"
library:NC_LIBS="-I/path/to/lib"
"udunits2"
headers:UD_CFLAGS="-I/path/to/include"
"udunits2"
library:UD_LIBS="-I/path/to/lib"
"expat"
headers:EX_CFLAGS="-I/path/to/include"
"expat"
library:EX_LIBS="-I/path/to/lib"
- New input directory
"Input_nc/"
that describes"nc"
-based inputs (paths provided by new entries in"files.in"
). - New text input file
"files_nc.in"
that lists for each input purpose (currently,"domain"
and"progress"
are implemented) the path to the"netCDF"
input file and associated variable name. - New text input file
"attribues_nc.in"
to provide global attributes and a geographic (and optionally a projected)"CRS"
(coordinate reference system) that describe the"domain.nc"
. - A user provided
"domain.nc"
that describes the simulation"domain"
. Specifications must be consistent with"domain.in"
. If absent, a template is automatically generated based on"domain.in"
. - A user provided
"progress.nc"
that describes the simulation"progress"
. Specifications must be consistent with"domain.nc"
. The"progress"
variable can optionally be contained in"domain.nc"
instead of a separate file. If absent, it is automatically generated based on"domain.nc"
. - New tab-separated value
"tsv"
input file"SW2_netCDF_output_variables.tsv"
that lists, activates, and describes each output variable in"netCDF"
mode. - All outputs are written to
"netCDF"
files based on user requests from"SW2_netCDF_output_variables.tsv"
. Each"netCDF"
output file contains the output variables from one output group"outkey"
and one output period (daily, weekly, monthly, yearly).
Full Changelog
https://github.com/DrylandEcology/SOILWAT2/compare/v7.2.0...v8.0.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep 10 months ago

SOILWAT2 - v7.2.0
-
Simulation output remains the same as the previous version.
-
SOILWAT2 now handles errors more gracefully (#368; @N1ckP3rsl3y, @dschlaep).
- Code no longer crashes on error immediately (except for STEPWAT2).
- Code stores messages of warnings and error status.
- All functions now check for errors and return early
(after cleaning up memory).
-
SOILWAT2 now defines its own structure for random numbers (#373; @dschlaep).
This allows to hide implementation details, i.e., STEPWAT2 will no
longer need to interact directly withpcg
and rSOILWAT2 will no longer
depend onpcg
which it never has used. -
New
sw_strtok()
is thread-safe and replaces not thread-safestrtok()
(#376; @N1ckP3rsl3y). -
Obsolete code in DEBUG_MEM* sections is removed (#369; @dschlaep).
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v7.1.0...v7.2.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 1 year ago

SOILWAT2 - v7.1.0
-
Simulation output remains the same as the previous version.
-
Prepare for SOILWAT2 to become thread-safe and reentrant (#346; @N1ckP3rsl3y)
- Definition clarifications
- Thread-safe - Multiple threads (a future SOILWAT2 development)
will not influence each other unintentionally. Here, we implemented
structures to enable thread-local storage, i.e., each thread operates
on local data structures or with static data. - Reentrant - The ability to correctly execute any part of the program
by multiple threads simultaneously but independently from others.
- Thread-safe - Multiple threads (a future SOILWAT2 development)
- All non-static variables are replaced by local variables;
functions gained arguments to pass local variables by reference
(replacing global variables). - New main abstract types
- SW_ALL - Contains the existing structures that are relevant
for the simulation itself, e.g., SW_MODEL, SW_SOILWAT, SW_WEATHER. - PATH_INFO - Holds information about location of input and output data,
e.g., directories, file paths to input data. - SW_OUTPUT_POINTERS - Points to requested output subroutines.
- LOG_INFO - Manages information for logging warnings and errors.
- SW_ALL - Contains the existing structures that are relevant
- Definition clarifications
-
Tests now require
c++14
and utilizegoogletest
v1.14.0
(issue #339). -
Bugfixes
- Fix an error where a pointer was freed even though it was not allocated
(issue #356; @dschlaep). - Fix memory leak in test of
SW_VPD_construct()
(issue #205; @dschlaep).
- Fix an error where a pointer was freed even though it was not allocated
Changes to inputs
- The output separator
OUTSEP
has been unused since the switch (v4.0.0
)
from writing free-form text files to"csv"
spreadsheets
(where the separator is fixed to a comma); the occurrence of
OUTSEP
in"outsetup.in"
is now deprecated and triggers a warning.
What's Changes
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v7.0.0...v7.1.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 1 year ago

SOILWAT2 - v7.0.0
-
This version produces nearly identical simulation output
as the previous release under default values for the new inputs.
Small deviations arise due to a fix in the handling of soil moisture values
when between field capacity and saturation. -
Multiple soil water release curves (
SWRC
) are now implemented and can be
selected with new inputswrc_name
. ImplementedSWRCs
currently include
"Campbell1974"
,"vanGenuchten1980"
, and"FXW"
. New inputhas_swrcp
determines if parameters for aSWRC
are estimated at run-time via an
implemented pedotransfer function (PTF
) based on new inputptf_name
or
if they are provided as inputs via new input file"swrc_params.in"
.
rSOILWAT2
implements additional pedotransfer functions. See documentation
entry of"swrc_ptf"
for additional details and for guidance on how to
implement additionalSWRCs
andPTFs
(issue #315; @dschlaep). -
Soil density inputs can now represent either matric or bulk density
(issue #280; @dschlaep).- Automatic conversion between matric and bulk density as needed
using the new inputtype_soilDensityInput
.
- Automatic conversion between matric and bulk density as needed
-
Daily weather inputs that force a simulation are now processed
all at once; previously, values were processed for one year at a time during
the main simulation loop (issue #311; @dschlaep, @N1ckP3rsl3y).- Daily weather inputs are now obtained by
readAllWeather()
viaSW_WTH_read()
duringSW_CTL_read_inputs_from_disk()
, i.e.,
the same time as other inputs are read from files. - Then, weather values are "finalized", i.e., missing values are imputed
(e.g., by the weather generator) and scaled with monthly parameters,
byfinalizeAllWeather()
viaSW_WTH_finalize_all_weather()
;
this must occur before the simulation is "initialized"
bySW_CTL_init_run()
.
- Daily weather inputs are now obtained by
-
SOILWAT2 gains the ability to calculate long-term climate summaries
(issue #317; @N1ckP3rsl3y, @dschlaep).- New
calcSiteClimate()
calculates monthly and annual time
series of climate variables from daily weather. - New
averageClimateAcrossYears()
calculates long-term climate summaries. - Both functions are based on
rSOILWAT2::calc_SiteClimate()
which was previously coded in R. - This version fixes issues from the previous R version:
- Mean annual temperature is now the mean across years of
means across days within year of mean daily temperature. - Years at locations in the southern hemisphere are now adjusted to start
on July 1 of the previous calendar year. - The cheatgrass-related variables, i.e.,
Month7th_PPT_mm
,
MeanTemp_ofDriestQuarter_C
, andMinTemp_of2ndMonth_C
,
are now adjusted for location by hemisphere.
- Mean annual temperature is now the mean across years of
- New
-
SOILWAT2 gains the ability to estimate fractional land cover
representing a potential natural vegetation based on climate relationships
(using new inputveg_method
) instead of reading land cover values
from input files (issue #318; @N1ckP3rsl3y, @dschlaep).- New
estimatePotNatVegComposition()
estimates
fractional land cover representing a potential natural vegetation
based on climate relationships.
This function is based onrSOILWAT2::estimate_PotNatVeg_composition()
which was previously coded in R. - New
estimateVegetationFromClimate()
(which is called bySW_VPD_init_run()
) usesveg_method
to determine
at run time if a simulation utilizesaverageClimateAcrossYears()
and
estimatePotNatVegComposition()
to set land cover values
instead of using the cover values provided in the input file. - This version fixes issues from the previous R version:
- The
C4
grass correction based on Teeri & Stowe 1976 is now applied
as documented (rSOILWAT2
issue #218). - The sum of all grass components, if fixed, is now incorporated into
the total sum of all fixed components (rSOILWAT2
issue #219).
- The
- New
Changes to inputs
- New inputs via
"siteparam.in"
select a soil water release curveswrc_name
and determine parameter sourcehas_swrcp
, i.e.,
either estimated via selected pedotransfer functionptf_name
or
values obtained from new input file"swrc_params.in"
.
Default values"Campbell1974"
,"Cosby1984AndOthers"
, and 0
(i.e., usePTF
to estimate paramaters) reproduce previous behavior. - New input file
"swrc_params.in"
to provide parameters of the selected
soil water release curve (if not estimated via a pedotransfer function)
for each soil layer. - SOILWAT2 gains
type_soilDensityInput
as new user input (siteparam.in
)
with default value 0 (i.e., matric soil density)
that reproduces previous behavior. - SOILWAT2 gains
veg_method
as new user input ("veg.in"
)
with default value 0 (i.e., land cover are obtained from input files)
that reproduces previous behavior.
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v6.7.0...v7.0.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 2 years ago

SOILWAT2 - v6.7.0
- This version produces exactly the same simulation output as the previous release under default values (i.e., vegetation establishment is turned off).
- Functionality to calculate and output establishment/recruitment of species now works again and is now covered by tests (issue #336, @dschlaep). Note that this functionality assesses yearly the chances of species to recruit/establish based on simulated daily conditions; however, establishment/recruitment outcomes are not utilized to inform the simulation.
- New input via
"<species>.estab"
sets the vegetation type of a species establishment parameters'.
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v6.6.0...v6.7.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 2 years ago

SOILWAT2 - v6.6.0
- Random number generators now produce sequences that can be exactly reproduced.
RandSeed()
gains arguments "initstate" and "initseq" (and lost "seed") to fully seed apcg32
random number generator.RandNorm()
is now re-entrant and discards one of the two generated values. Compilation with"RANDNORMSTATIC"
re-produces the old, not re-entrant implementation.- SOILWAT2 gains
rng_seed
as new user input ("weathsetup.in"
). SW_MKV_construct()
now only seedsmarkov_rng
(the random number generator of the weather generator) if run asSOILWAT2
using the new inputrng_seed
;SW_MKV_construct()
does not seedmarkov_rng
when run as part ofSTEPWAT2
orrSOILWAT2
(both of which use their ownRNG
initialization procedures).SW_WTH_init_run()
now also initializes yesterday's weather values.
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v6.5.1...v6.6.0
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 2 years ago

SOILWAT2 - v6.5.1
Bugfix rSOILWAT2 issue 194
- Fixed incorrect indexing of output array related to rSOILWAT2. This is documented in issue #194 in rSOILWAT2. (@N1ckP3rsl3y)
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v6.5.0...v6.5.1
Hydrosphere - Freshwater and Hydrology
- C
Published by N1ckP3rsl3y almost 3 years ago

SOILWAT2 - v6.5.0
This version simulates daily minimum, average, and maximum temperature at every soil layer and at the surface (@N1ckP3rsl3y)
- Output category "SOILTEMP" now contains maximum/minimum soil temperature in addition to average soil temperature
- Output category "TEMP" now contains maximum/minimum surface temperature in addition to average surface temperature (and air temperature)
Otherwise, this version produces identical simulations to the previous release.
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v6.4.0...v6.5.0
Hydrosphere - Freshwater and Hydrology
- C
Published by N1ckP3rsl3y almost 3 years ago

SOILWAT2 - v6.4.0
Added the frozen state of soil moisture of each layer to output. (@N1ckP3rsl3y)
Remaining output is unchanged.
Full Changelog: https://github.com/DrylandEcology/SOILWAT2/compare/v6.3.0...v6.4.0
Hydrosphere - Freshwater and Hydrology
- C
Published by N1ckP3rsl3y almost 3 years ago

SOILWAT2 - v6.3.0
This version produces slightly different simulation output from the versions v6.2.x
.
This version improved percolation and behavior at minimum soil water content:
- Unsaturated percolation rate is now adjusted for
swc_min
, i.e., percolation rate is smaller at very low moisture levels. - Bugs fixed so that bare-soil evaporation, transpiration, or hydraulic redistribution no longer remove soil moisture held below
swc_min
; previously, this could occur rarely under specific circumstances. - Lower limit of
swc_min
updated to -30 MPa.
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep about 3 years ago

SOILWAT2 - v6.2.4
This version produces identical simulation output as the previous release.
This version updated the (unit) testing framework and improved documentation:
- Updated submodule googletest: the default branch name is now "main"
- Improved AddressSanitizer settings for tests
- Changed to thread-safe death tests
- Changed to recommended naming scheme for unit tests
- Updated and clarified requirements for compilation (C11 for executable and C++11 plus POSIX API for tests)
- Fixed weather generator death test
- Fixed make targets
bin_debug
andbin_debug_severe
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 3 years ago

SOILWAT2 - v6.2.3
This version produces identical simulation output as the previous release.
This version updated the continuous testing framework, improved documentation, and fixed a minor code issue:
- move CI from travis and appveyor to github actions
- updated googletest (as of v1.11.0, Jun 11, 2021) requires newer gcc and clang versions (>= 5.0, https://github.com/google/googletest)
than currently implemented for travis and appveyor scripts (gcc v4.9 and clang v3.5) - avoid codecov's bash uploader; it will be retired by Feb 1, 2022 (https://docs.codecov.com/docs/about-the-codecov-bash-uploader)
- update documentation
- fix compiler "Warning: array subscript has type char" for function
SW_MDL_read()
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 3 years ago

SOILWAT2 - v6.2.2
This version produces identical simulation output as the previous release; however, the internal organization of global variables was updated and affects how SOILWAT2 works with rSOILWAT2 and STEPWAT2.
-
previously, global variables were defined/implemented in one source file; each other source files that referenced a global variable used a separate extern declaration
--> problem: repeated code/declarations -
new approach:
- define/implement global variables in one source file
- extern declare these variables in the header file belonging to that source file
- include the header file by each other source files that uses a global variable
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 3 years ago

SOILWAT2 - v6.2.0
Additional output variables
-
total transpiration (summed across soil layers and vegetation types) -- individual components available in "SW_TRANSP"
-
evaporation from bare-soil (summed across soil layers) -- individual components available in "SW_EVAPSOIL"
-
evaporation from canopy water (summed across vegetation types) -- individual components available in "SW_EVAPSURFACE"
-
evaporation from surface water (sum of evaporation from litter-intercepted and ponded water) -- individual components available in "SW_EVAPSURFACE"
-
evaporation from snowpack (sublimation) -- also available in "SW_PRECIP"
-
leaf area index (LAI)
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 3 years ago

SOILWAT2 - v6.1.0
Bugfixes
- Fixed calculation of residual soil moisture if gravel is present (close #282)
- Fixed setup/initialization of soil temperature module (not relevant for
SOILWAT2
but forrSOILWAT2
and potentiallySTEPWAT2
): values of a previous run (instead of default and initial values) were used to start a new simulation run (including frozen layer status, error status, and internal time step)
New features/improvements
- New command line options:
-h
(to print help/usage information);-v
(to print version and compile time metadata) - Version and metadata are printed by
main()
unless-q
(quiet mode) - Additional unit test output to create plots of PET as function of radiation, relative humidity, wind speed, and cover (optional)
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 4 years ago

SOILWAT2 - v6.0.0
- Improved estimation of radiation on tilted surfaces
- code now accounts for seasonally varying sun-earth distance
- new approach implements a clear-sky model (additionally attenuated by a cloud factor) and a separation model to treat direct beam and diffuse radiation separately (previously, code estimated only direct beam insolation and used a crude all-sky model)
- code estimates now all possible sunrise and sunset hour angles for a horizontal and a tilted surface (with 0, 1, or 2 periods of possible sunlight) as well as the daily integral of the cosine of the solar incidence angle and the daily integral of the sine of the solar altitude angle (previous estimates were increasingly wrong the further away from equator the slope was facing)
- new approach implements an anisotropic transposition model to transpose direct beam and diffuse components of global radiation from a horizontal to a tilted surface and to estimate a reflected radiation component
- User visible changes to inputs
climate.in
: "Atmospheric transmissivity" is removed (was not used by code since a very long time/ever?)siteparam.in
:Longitude
is a new input (for complete documentation of location, but currently not used by code)Latitude
is now in degrees (instead of radians -- so that all input angles are in the same units)Aspect
changed orientation: now, S = 0 (degrees), E=-90, N=±180, W=90 (previously, N=0, E=90, S=180, W=270)
weathsetup.in
- flag to toggle source of daily meteorological forcing between weather generator to fill in missing inputs (1) and using only inputs from files (0) gained a new option (2) that indicates to use only the weather generator and to not check for weather input files
- input to declare first year of weather input files gained a new option (-1) to indicate that first year of weather inputs corresponds to first year of simulation period
- removed "number of days to use in a moving average of temperature" (was not used by code since a long time)
- User visible changes to outputs
- Output type "PET" gained four new variables:
PET_H_oh_MJm-2
= extraterrestrial horizontal solar irradiation [MJ / m2]PET_H_ot_MJm-2
= extraterrestrial tilted solar irradiation [MJ / m2]PET_H_gh_MJm-2
= global horizontal irradiation [MJ / m2]PET_H_gt_MJm-2
= global tilted irradiation [MJ / m2]
- Output type "PET" gained four new variables:
-
Additional testing
- Additional testing output can be generated by passing appropriate flags when running
unit tests. Scripts are available to create sun hour angles plots for horizontal and tilted surfaces:- Numbers of daylight hours and of sunrise(s)/sunset(s) for each latitude and day of year for some slope/aspect combinations
- Sunrise(s)/sunset(s) hour angles for each latitude and some slope/aspect/day of year combinations
- Additional testing output can be generated by passing appropriate flags when running
CPPFLAGS=-DSW2_SolarPosition_Test__hourangles_by_lat_and_doy make test test_run
Rscript tools/plot__SW2_SolarPosition_Test__hourangles_by_lat_and_doy.R
CPPFLAGS=-DSW2_SolarPosition_Test__hourangles_by_lats make test test_run
Rscript tools/plot__SW2_SolarPosition_Test__hourangles_by_lats.R
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 4 years ago

SOILWAT2 - v5.5.0
- Overhauled code for model setup, user inputs, run initialization, and setting a new year
such that outputs no longer depend on the time when the code is executed (closed #272, #273, and #274) - No user visible changes to inputs or use
- Outputs have changed slightly
- Few changes to the interface relevant for STEPWAT2 and rSOILWAT2
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep about 5 years ago

SOILWAT2 - v5.4.0
This version addressed documentation and unit testing:
User visible changes:
- Create and open documentation and user manual with
make doc doc_open
Details:
-
Documentation:
- 'User manual' for SOILWAT2 provided as part of doxygen documentation (close #217, close #74)
- Detailed installation instructions included in doxygen documentation (close #75)
- Code contributor manual as part of doxygen documentation (close 86)
- Doxygen warnings fixed (close #266)
- Input units of biomass documented (close #265)
-
Unit tests:
- Contributed to the documentation and unit testing for all SOILWAT2 functions (see #216, see #219, see #76; close #73)
- Unit tests for functions in
SW_Flow_lib.c
(close #117; contributed to #19)
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 5 years ago

SOILWAT2 - v5.3.0
Two new functions to change soil information by function calls and an unrelated helper function:
set_soillayers()
: Creates soil layers based on function arguments (instead of reading
them from an input file as _read_layers() does)derive_soilRegions()
: Determines soil transpiration regions based on input parameterssum_across_vegtypes()
: Sum up values across vegetation types
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 5 years ago

SOILWAT2 - v5.2.0-zenodo
Identical to v5.2.0, but needed for zenodo to create doi
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 6 years ago

SOILWAT2 - v5.2.0
-
corrected output when run with
STEPWAT2
-
new output target
BIOMASS
provides output for- cover (%) for bare-ground, trees, shrubs, forbs, grasses
- biomass (g/m2 as component of total) for total, trees, shrubs, forbs, grasses, and litter
- live biomass (g/m2 as component of total) total, trees, shrubs, forbs, grasses
--> user visible change to the input file outsetup.in
which gained a new row!
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 6 years ago

SOILWAT2 - v5.0.0
This version introduces new equations for interception by vegetation:
The equations are now based on work by Vegas Galdos et al. 2012 and Gerrits 2010:
- for vegetation canopies: kSmax * log10(1 + LAI_live + kdead * LAI_dead)
- for litter: kSmax * log10(1 + litter_density)
User visible changes include:
- Input/veg.in
- Input/climate.in
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 6 years ago

SOILWAT2 - v4.2.2
More carefully setting up unit test MainSoilTemperatureFunction_LyrMAX
-
keep soil bulk density fixed, SWC(wilting point), SWC(field capacity), SWC(saturation) fixed and physically well defined
-
only set SWC by a uniform random number and keep it between field capacity and wilting point
-
new script
many_test_runs.sh
to repeatedly run unit tests
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep about 6 years ago

SOILWAT2 - v4.2.0
- Random numbers now generated using the PCG pseudo-random number generator.
- This RNG allows multiple streams. The Markov weather generator is on its own stream so no other functions requesting random numbers can change the weather.
- Unit tests ensure the pcg rng works correctly.
- Two new functions added: RandUniIntRange(first, last) returns an integer between first and last (inclusive) and RandUniFloatRange(first, last) returns a float between first and last (inclusive)
Hydrosphere - Freshwater and Hydrology
- C
Published by chaukap over 6 years ago

SOILWAT2 - v4.1.3
Better compilation and use in rSOILWAT2
we have three documented and suppressed/ignored problems:
- memory leak (use of a suppression file): #205
- compile warning #208: treating c input as c++
- compile warning #214: variable array length
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 7 years ago

SOILWAT2 - v4.1.2
- adjustments so that the clang compiler works
- set submodule googletest to specific commit
- specify specific warnings in the makefile to be ignored (instead of propagated to errors)
- more consistent CI across compilers on
travis
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 7 years ago

SOILWAT2 - v4.0.3
- Defined new macro
EQ_w_tol
- Fix check for whether fractions of vegetation components, evaporation coefficients, and transpiration coefficients each sum to 1
- Updated default inputs so that a default run produces no warnings/notes
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep almost 7 years ago

SOILWAT2 - v3.6.0
-
Move rSOILWAT2 code to rSOILWAT2 repository
-
define global variables for number and names of output columns (and functions to set them)
-
removed inefficiencies in output code (some loops, e.g., over time periods, repeated themselves)
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 7 years ago

SOILWAT2 - v3.2.9
- cleaner code
- defined swprintf to be used both by rSOILWAT and SOILWAT2-standalone code
- improved makefile
- eliminated (almost all) compiler warnings
- improved handling of unit tests (i.e., don't include any more source files in the unit test files as we did initially)
- many other improvements
Hydrosphere - Freshwater and Hydrology
- C
Published by dschlaep over 7 years ago

SOILWAT2 - SOILWAT v3.2.2
Fixed some compatibility issues with Windows and SOILWAT/Rsoilwat.
This included removing some unnecessary calls to 'Rinterface.h' in a number of C files, as well as change how the mkdir() macro definition operates for different OS's.
@dschlaep provided the code for changing the macro defintions
@CaitlinA suggested the removal of the 'Rinterface.h' inclusions
-Charlie
Hydrosphere - Freshwater and Hydrology
- C
Published by gopherchucks over 8 years ago

SOILWAT2 - Version 31 SoilWat.
SoilWat v31
This version has all the changes from SoilWat v30 and Rsoilwat v31. Rsoilwat fixed a lot of memory issues and changed some aspects of the execution. It can compile as a executable or as a R library. The compiler flag RSOILWAT should be used, when making an R library. The project Rsoilwat uses this as its source code.
Hydrosphere - Freshwater and Hydrology
- C
Published by ryanmurf over 10 years ago
