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

Development for v6.3.0 #249

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "src/SOILWAT2"]
path = src/SOILWAT2
url = https://github.com/DrylandEcology/SOILWAT2
branch = master
branch = feature_nc_input
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: rSOILWAT2
Version: 6.2.0
Version: 6.3.0-9000
Title: An Ecohydrological Ecosystem-Scale Water Balance Simulation Model
Description: Access to the C-based SOILWAT2 v8.0.1 and functionality for
SQLite-database of weather data.
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# rSOILWAT2 v6.3.0-9000


# rSOILWAT2 v6.2.0
* Simulation output remains the same as the previous version unless
relative humidity is calculated from vapor pressure or specific humidity.
Expand Down
11 changes: 7 additions & 4 deletions inst/extdata/example1/Input/domain.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ ymin_bbox 39.59
xmax_bbox -105.58
ymax_bbox 39.59

# Domain Coordinates
SpatialTolerance 1e-6 # Tolerance used to identify matching domain space

# Spinup
SpinupMode 1 # Mode ( 1: repeated random resample; 2: sequence of m years ), default = 1
SpinupScope 1 # Scope ( N ): use first N years of simulation, default = 1
SpinupDuration 0 # Duration ( M ): sample M years of the first N years (no spinup: M = 0), default = 0
SpinupSeed 11 # Seed for randomly generating years for mode 1, default = 11
SpinupMode 1 # Mode ( 1: repeated random resample; 2: sequence of m years ), default = 1
SpinupScope 1 # Scope ( N ): use first N years of simulation, default = 1
SpinupDuration 0 # Duration ( M ): sample M years of the first N years (no spinup: M = 0), default = 0
SpinupSeed 11 # Seed for randomly generating years for mode 1, default = 11
10 changes: 9 additions & 1 deletion inst/extdata/example1/Input/siteparam.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ RCP85


# --- Soil characterization ---
# Is the soil layer depth profile and number of soil layers identical (1) across the entire domain or do they vary among sites/gridcells (0)?
1

# Are inputs of density representing bulk soil (type 1) or the matric component (type 0)?
0


# --- Organic matter ---
# Depth [cm] at which characteristics of organic matter have completely switched from fibric to sapric peat
50


#--- Soil water retention curve (SWRC) ------
#
# Implemented options (`swrc_name`/`ptf_name`, see `swrc2str[]`/`ptf2str[]`):
Expand All @@ -99,7 +107,7 @@ Campbell1974 # Specify soil water retention curve
Cosby1984AndOthers # Specify pedotransfer function
# (if not implemented, then provide SWRC parameters via "swrc_params.in")

0 # Has SWRC parameters (see `has_swrcp`)?
0 # Has SWRC parameters for the mineral soil component (see `has_swrcp`)?
# 0: Estimate with specified pedotransfer function
# 1: Use values from "swrc_params.in"

Expand Down
19 changes: 10 additions & 9 deletions inst/extdata/example1/Input/soils.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
# - imperm = (frac, 0-1) proportion of 'impermeability' to water
# percolation(/infiltration/drainage)
# - soiltemp = (C) initial temperature
# - %om = (frac, 0-1) proportion of organic matter by weight

# USER: the evco and trco columns must sum to 1.0 or they will be normalized.

# The minimum number of soil layers is 1 and the maximum number is `MAX_LAYERS`
# which is defined in `SW_Defines.h`.

# depth matricd gravel_content evco trco_grass trco_shrub trco_tree trco_forb %sand %clay imperm soiltemp
5.0 1.430 0.100 0.813 0.0496 0.134 0.0496 0.134 0.510 0.150 0.000 -1.000
10.0 1.410 0.100 0.153 0.0495 0.094 0.0495 0.094 0.440 0.260 0.000 -1.000
20.0 1.390 0.100 0.034 0.1006 0.176 0.1006 0.176 0.350 0.410 0.000 -1.000
30.0 1.390 0.100 0.000 0.1006 0.175 0.1006 0.175 0.320 0.450 0.000 -1.000
40.0 1.380 0.200 0.000 0.1006 0.110 0.1006 0.110 0.310 0.470 0.000 0.000
60.0 1.150 0.200 0.000 0.1997 0.109 0.1997 0.109 0.320 0.470 0.000 0.000
80.0 1.310 0.200 0.000 0.1997 0.101 0.1997 0.101 0.570 0.280 0.000 1.000
100.0 1.310 0.200 0.000 0.1997 0.101 0.1997 0.101 0.570 0.280 0.000 1.000
# depth matricd gravel_content evco trco_grass trco_shrub trco_tree trco_forb %sand %clay imperm soiltemp %om
5.0 1.430 0.100 0.813 0.0496 0.134 0.0496 0.134 0.510 0.150 0.000 -1.000 0.0
10.0 1.410 0.100 0.153 0.0495 0.094 0.0495 0.094 0.440 0.260 0.000 -1.000 0.0
20.0 1.390 0.100 0.034 0.1006 0.176 0.1006 0.176 0.350 0.410 0.000 -1.000 0.0
30.0 1.390 0.100 0.000 0.1006 0.175 0.1006 0.175 0.320 0.450 0.000 -1.000 0.0
40.0 1.380 0.200 0.000 0.1006 0.110 0.1006 0.110 0.310 0.470 0.000 0.000 0.0
60.0 1.150 0.200 0.000 0.1997 0.109 0.1997 0.109 0.320 0.470 0.000 0.000 0.0
80.0 1.310 0.200 0.000 0.1997 0.101 0.1997 0.101 0.570 0.280 0.000 1.000 0.0
100.0 1.310 0.200 0.000 0.1997 0.101 0.1997 0.101 0.570 0.280 0.000 1.000 0.0
33 changes: 22 additions & 11 deletions inst/extdata/example1/Input/swrc_params.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#------ Input for Soil Water Retention Curves (by soil layer) ------
#------ Input for Soil Water Retention Curves ------

# A table with up to `MAX_LAYERS` rows (soil layers) and 6 columns:
# - the soil layers must match `soils.in`

# Tables with 6 columns:
# - the interpretation of columns (SWRC parameters) depends on the
# selected SWRC (see `siteparam.in`)
# - unused columns are ignored (if selected SWRC uses fewer than 6 parameters)
Expand All @@ -28,12 +28,23 @@
# * param6 = L, tortuosity/connectivity parameter [-]


# Table with two sets of six SWRC parameters
# * first set (row): characteristics of fibric peat
# * second set (row): characteristics of sapric peat
# * source: Letts et al. 2000, doi:10.1080/07055900.2000.9649643
# param1 param2 param3 param4 param5 param6
1.03 0.93 2.7 2419.2 0.0000 0.0000
1.01 0.83 12.0 0.864 0.0000 0.0000


# Table with six SWRC parameters for up to `MAX_LAYERS` rows (soil layers)
# * the soil layers must match `soils.in`
# param1 param2 param3 param4 param5 param6
18.6080 0.42703 5.3020 24.03047 0.0000 0.0000
20.4644 0.43290 7.0500 14.94351 0.0000 0.0000
22.8402 0.44013 9.4320 13.71177 0.0000 0.0000
24.0381 0.44291 10.0690 13.43171 0.0000 0.0000
24.2159 0.44359 10.3860 14.14351 0.0000 0.0000
23.3507 0.44217 10.3830 40.63764 0.0000 0.0000
12.3880 0.41370 7.3250 37.22899 0.0000 0.0000
12.3880 0.41370 7.3250 37.22899 0.0000 0.0000
18.6080 0.42703 5.3020 53.90697 0.0000 0.0000
20.4644 0.43290 7.0500 37.41493 0.0000 0.0000
22.8402 0.44013 9.4320 23.10175 0.0000 0.0000
24.0381 0.44291 10.0690 19.96388 0.0000 0.0000
24.2159 0.44359 10.3860 18.82977 0.0000 0.0000
23.3507 0.44217 10.3830 19.38407 0.0000 0.0000
12.3880 0.41370 7.3250 52.97183 0.0000 0.0000
12.3880 0.41370 7.3250 52.97183 0.0000 0.0000
16 changes: 14 additions & 2 deletions inst/extdata/example1/Input/swrc_params_FXW.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#------ Input for Soil Water Retention Curves (by soil layer) ------

# A table with up to `MAX_LAYERS` rows (soil layers) and 6 columns:
# - the soil layers must match `soils.in`
# Tables with 6 columns:
# - the interpretation of columns (SWRC parameters) depends on the
# selected SWRC (see `siteparam.in`)
# - unused columns are ignored (if selected SWRC uses fewer than 6 parameters)
Expand All @@ -15,6 +14,19 @@
# * param6 = L, tortuosity/connectivity parameter [-]


# Table with two sets of six SWRC parameters
# * first set (row): characteristics of fibric peat
# * second set (row): characteristics of sapric peat
# * source: Letts et al. 2000, doi:10.1080/07055900.2000.9649643
# * Note: values for the van Genuchten SWRC assumed for
# comparable parameters; however, param4 (m) and param6 (L) are missing
# param1 param2 param3 param4 param5 param6
0.93 0.08 1.9 NaN 2419.2 NaN
0.83 0.003 1.6 NaN 0.864 NaN


# Table with six SWRC parameters for up to `MAX_LAYERS` rows (soil layers)
# * the soil layers must match `soils.in`
# param1 param2 param3 param4 param5 param6
0.437461 0.050757 1.247689 0.308681 22.985379 2.697338
0.452401 0.103033 1.146533 0.195394 89.365566 2.843288
Expand Down
15 changes: 13 additions & 2 deletions inst/extdata/example1/Input/swrc_params_vanGenuchten1980.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#------ Input for Soil Water Retention Curves (by soil layer) ------

# A table with up to `MAX_LAYERS` rows (soil layers) and 6 columns:
# - the soil layers must match `soils.in`
# Tables with 6 columns:
# - the interpretation of columns (SWRC parameters) depends on the
# selected SWRC (see `siteparam.in`)
# - unused columns are ignored (if selected SWRC uses fewer than 6 parameters)
Expand All @@ -13,6 +12,18 @@
# * param4 = n, measure of the pore-size distribution [-]
# * param5 = saturated hydraulic conductivity [cm/day]


# Table with two sets of six SWRC parameters
# * first set (row): characteristics of fibric peat
# * second set (row): characteristics of sapric peat
# * source: Letts et al. 2000, doi:10.1080/07055900.2000.9649643
# param1 param2 param3 param4 param5 param6
0.04 0.93 0.08 1.9 2419.2 0.0000
0.22 0.83 0.003 1.6 0.864 0.0000


# Table with six SWRC parameters for up to `MAX_LAYERS` rows (soil layers)
# * the soil layers must match `soils.in`
# param1 param2 param3 param4 param5 param6
0.07564425 0.3925437 0.010035788 1.412233 19.871040 0
0.10061329 0.4011315 0.009425738 1.352274 9.090754 0
Expand Down
Loading
Loading