Skip to main content

Module 3: estimating cultivar coefficients (GLUE), soil data and water-limited production

This notebook follows the third day of a DSSAT training course:

  1. estimate the coefficients of a soybean cultivar from field data with GLUE, ported to Python in docs/notebooks/glue.py from DSSAT’s GLUE tool;
  2. read and estimate soil water limits;
  3. switch the water balance on and look at water-limited production: soil water in each layer, the soil’s capacity to store water, and automatic irrigation.

Data. Soybean experiments IUAM8801, IUAM9001, OHWO8801, OHWO9001 and UFGA7902 (Williams-82; the course’s GLUE exercise) and IUAM9701, IUAM9702 for an independent check; peanut UFGA8401; maize UFGA8201 and the soil file, all from DSSAT/dssat-csm-data (BSD-3) at a pinned commit. From the course data (notebooks/course-data/): the Colorado maize experiments of GLUE self test 4 and the Umariya and Orangeburg soil sheets. GLUE follows DSSAT/glue (BSD-3) at commit e86093e.

Needs. As in modules 1 and 2. The GLUE part runs about 36,000 soybean seasons; on a many-core machine that takes a few minutes (it runs up to 99 parameter sets per experiment file and many files at once).

engine   : C:\TEMP\dsn\dssat\dscsm048.exe
csm-data : C:\Users\benny\OneDrive\Documents\Github\dssat-csm-data @ 99c95b34
GLUE     : https://github.com/DSSAT/glue/blob/e86093e400fbbdfc8e2c751c98acc2136835c3af/Calculation.r
workers  : 48

1. Estimating cultivar coefficients with GLUE### The observationsThe five treatments the course’s GLUE exercise selects for Williams-82 soybean (a maturity group 3cultivar) are used for calibration: treatment 1 of IUAM8801, IUAM9001, OHWO8801 and OHWO9001, and the fullyirrigated treatment 4 of UFGA7902. Two more(IUAM9701 and IUAM9702) are kept back to test the result: only their yield was measured.

exp ADAP MDAP HWAM CWAM PWAM LAIX HWUM
0 IUAM8801 51.0 129 2368.0 6117.0 3604.0 5.57 0.1270
1 IUAM9001 66.0 139 3168.0 6674.0 4552.0 6.29 0.1682
2 OHWO8801 71.0 145 3976.0 8090.0 5194.0 7.65 0.1510
3 OHWO9001 NaN 150 3149.0 7113.0 4915.0 7.21 0.1640
4 UFGA7902 38.0 93 2474.0 3893.0 NaN 3.15 0.1750

Priors: what may each coefficient be?GLUE starts from a range for every coefficient. DSSAT keeps them in the cultivar file itself: a MINIMA anda MAXIMA row, and a !Calibration row that flags each coefficient as P (phenology), G (growth) orN (not calibrated). GLUE draws parameter sets uniformly within the ranges(Uniform.r).

coef flag min max default outside_range
0 CSDL P 11.780 14.600 13.400 False
1 PPSEN P 0.129 0.385 0.285 False
2 EM-FL P 9.000 28.900 19.000 False
3 FL-SH N 5.000 10.000 8.300 False
4 FL-SD P 11.000 22.000 14.200 False
5 SD-PM P 22.000 37.700 32.200 False
6 FL-LF N 18.000 26.000 28.000 True
7 LFMAX G 1.000 1.400 0.970 True
8 SLAVR G 300.000 400.000 385.000 False
9 SIZLF G 137.000 230.000 180.000 False
10 XFRT N 1.000 1.000 1.000 False
11 WTPSD G 0.150 0.190 0.180 False
12 SFDUR G 17.000 25.500 26.000 True
13 SDPDV G 1.700 2.440 2.400 False
14 PODUR N 10.000 10.000 12.000 True
15 THRSH N 77.000 78.000 77.000 False
16 SDPRO N 0.400 0.405 0.405 False
17 SDLIP N 0.200 0.205 0.205 False

The likelihoodFor each measurement GLUE computes how likely the simulated value is if the measurement has a normal error,exp(-(M - S)^2 / (2 var)) / sqrt(2 pi var)(Calculation.r).The variances are fixed inMeasurementVariance_All.csv:a standard deviation of 3 days for anthesis and 7 days for maturity, and a coefficient of variation forweights (0.3 for yields and tops, 0.1 for seed size, 0.4 for LAI). Likelihoods are multiplied over themeasurements of an experiment, normalised over the parameter sets, multiplied over the experiments andnormalised again. Round 1 fits the phenology coefficients to the dates; round 2 keeps the best round-1values and fits the growth coefficients to the weights.

measurement kind value round
0 ADAP sd 3.0 1
1 MDAP sd 7.0 1
2 PWAM cv 0.3 2
3 HWAM cv 0.3 2
4 CWAM cv 0.3 2
5 LAIX cv 0.4 2
6 HWUM cv 0.1 2

Before calibrationWilliams-82 as it is in the engine’s cultivar file:

set exp ADAP MDAP HWAM CWAM PWAM LAIX HWUM
0 1 IUAM8801 58 125 2817 6341 3659 5.711085 0.157695
1 1 IUAM9001 63 133 3700 7450 4998 6.066354 0.149194
2 1 OHWO8801 76 142 3620 7491 4938 6.639524 0.155467
3 1 OHWO9001 75 145 3541 7185 4822 6.609224 0.149739
4 1 UFGA7902 39 97 2772 4422 3922 2.832199 0.145784
5 1 IUAM9701 63 131 3767 8219 5249 7.236816 0.149195
6 1 IUAM9702 65 135 3084 6676 4178 6.818458 0.152660

Round 1: phenology

round 1: 15000 seasons in 264 s; sets that matured everywhere: 2086 of 3000
coef best mean sd prior_min prior_max
0 CSDL 13.249898 13.255926 0.456622 11.781553 14.599494
1 PPSEN 0.267109 0.275741 0.061453 0.129002 0.384951
2 EM-FL 17.393830 17.718176 1.703780 9.000204 28.895782
3 FL-SD 11.895984 17.096515 3.242615 11.001382 21.995934
4 SD-PM 37.552135 31.146929 3.913858 22.002702 37.697495

Round 2: growth

round 2: 15000 seasons in 250 s
coef best mean sd prior_min prior_max
0 LFMAX 1.032143 1.104075 0.085230 1.000186 1.399889
1 SLAVR 396.348431 359.079587 26.647380 300.076718 399.998198
2 SIZLF 175.967169 178.767408 24.894066 137.018047 229.953704
3 WTPSD 0.151384 0.155078 0.004139 0.150003 0.189991
4 SFDUR 20.764567 21.640275 2.154208 17.000121 25.496115
5 SDPDV 2.363773 2.057482 0.208301 1.700413 2.439995

Best values on the edge of their rangeA best value that sits on the edge of its prior range says the data want a value the range does notallow. Here that happens in round 2, and the engine’s own Williams-82 values for LFMAX and SFDUR already lieoutside the ranges of the cultivar file. Round 2 is run again with the ranges of those coefficients widenedby half their width on the side that was hit:

round 2, wider ranges: 15000 seasons in 271 s
coef best side old_min old_max new_min new_max
0 SLAVR 396.348431 max 300.00 400.00 300.00 450.00
1 WTPSD 0.151384 min 0.15 0.19 0.13 0.19
coef best mean sd prior_min prior_max
0 LFMAX 1.020757 1.106673 0.089082 1.000264 1.399933
1 SLAVR 436.675873 387.829469 39.393867 300.099944 449.890096
2 SIZLF 174.747192 176.937396 24.665975 137.001935 229.961366
3 WTPSD 0.146365 0.147339 0.007548 0.130023 0.189992
4 SFDUR 21.500243 20.678409 2.180812 17.000519 25.498369
5 SDPDV 1.728097 2.062645 0.210283 1.700155 2.439532

After calibration, and the independent check

version GLUE GLUE, wider ranges default
variable
ADAP 3.50 3.50 4.58
CWAM 573.07 485.88 509.15
HWAM 504.77 494.17 476.82
HWUM 0.01 0.02 0.02
LAIX 0.55 0.47 0.56
MDAP 3.55 3.55 4.52
PWAM 470.52 483.59 262.74
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module3/glue_info.csv')

GLUE self test 4: a new maize cultivar from ColoradoThe course’s last GLUE exercise calibrates a cultivar that is not yet in DSSAT: the maize hybrid DEKALB52-59 AF, grown at Greeley, Colorado, in 2008 and 2010 with full irrigation and with 40% of it(Anothai et al. 2013). The experiment files, weather and soil file come with the course(course-data/colorado/). The exercise asks for a new cultivar entry CO0801 built from an existing variety;the notebook uses DEKALB 485 (IB1072) of the engine’s cultivar file as that starting point. All fourtreatments are used; their FileA has anthesis, maturity, yield and tops weight.

exp ADAP MDAP HWAM CWAM PWAM LAIX HWUM
0 GRCO0801-T1 86 150 13228.0 22112.0 NaN NaN NaN
1 GRCO0801-T2 86 150 8824.0 14331.0 NaN NaN NaN
2 GRCO1001-T1 81 136 11168.0 18881.0 NaN NaN NaN
3 GRCO1001-T2 81 136 5505.0 9294.0 NaN NaN NaN
coef flag min max default
0 P1 P 5.0 450.0 215.0
1 P2 P 0.0 2.0 0.6
2 P5 P 580.0 999.0 785.0
3 G2 G 248.0 990.0 750.0
4 G3 G 5.0 16.5 8.7
5 PHINT N 38.0 75.0 45.0
Colorado GLUE: 16000 seasons in 168 s
coef best mean sd prior_min prior_max round DEKALB 485
0 P1 247.395667 244.454392 22.123239 5.031595 449.343032 1 215.0
1 P2 1.237487 1.242804 0.503020 0.000625 1.997433 1 0.6
2 P5 608.446720 628.558692 34.777022 580.181616 998.953208 1 785.0
0 G2 573.037012 677.914586 195.344033 248.026413 989.798979 2 750.0
1 G3 11.836032 11.985038 2.768234 5.003465 16.492472 2 8.7
DEKALB 485 as it is GLUE: CO0801 observed
exp variable
GRCO0801-T1 ADAP 75.0 84.0 86.0
CWAM 26978.0 25165.0 22112.0
HWAM 16006.0 11103.0 13228.0
MDAP 151.0 151.0 150.0
GRCO0801-T2 ADAP 75.0 84.0 86.0
CWAM 13282.0 15932.0 14331.0
HWAM 7845.0 8518.0 8824.0
MDAP 151.0 151.0 150.0
GRCO1001-T1 ADAP 75.0 82.0 81.0
CWAM 24409.0 23865.0 18881.0
HWAM 12022.0 9650.0 11168.0
MDAP 138.0 132.0 136.0
GRCO1001-T2 ADAP 75.0 82.0 81.0
CWAM 12606.0 13213.0 9294.0
HWAM 5577.0 5281.0 5505.0
MDAP 138.0 132.0 136.0
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module3/co_round2.csv')

Calibration with in-season data: peanut UFGA8401The course’s second calibration exercise works by hand, one coefficient at a time, against growth analysisdata taken during the season: the irrigated treatment of the 1984 Florunner peanut experiment UFGA8401. Itasks for four statistics of four variables (tops weight, seed weight, seed number and pod harvest index): theRMSE, the intercept a and slope b of the regression of simulated on observed values, and Willmott’s d.The suggested coefficients: LFMAX (the size of tops and seed weight), FL-SH and FL-SD moved together(the timing of seed growth), PODUR (the first rise of seed number and pod harvest index) and XFRT (theshare of growth going to pods and seeds).Instead of one run at a time, the notebook runs a grid of all four, so the page can move each one freely.

                     TNAME  CU  MI
N                                 
1                IRRIGATED   1   1
2  RAINFED, EXCEPT IRRIGAT   1   2
cultivar IB0002 FLORUNNER {'LFMAX': np.float64(1.4), 'FL-SH': np.float64(9.2), 'FL-SD': np.float64(18.8), 'PODUR': np.float64(24.0), 'XFRT': np.float64(0.92)}
observed variables: ['CWAD', 'GWAD', 'G#AD', 'HIPD'] 19 dates
375 combinations; XFRT values [np.float64(0.83), np.float64(0.92), 1.0]
soil IBPN910015
375 peanut seasons with daily output in 31 s
Florunner as it is: set 188 mean d 0.979 | best mean d: set 324 0.988
set variable n rmse a b d LFMAX shift PODUR XFRT FL-SH FL-SD
748 188 CWAD 19 1285.118 -332.731 0.893 0.976 1.40 0.0 24.0 0.92 9.2 18.8
749 188 G#AD 19 112.553 -0.454 0.837 0.972 1.40 0.0 24.0 0.92 9.2 18.8
750 188 GWAD 19 590.725 -96.562 0.849 0.974 1.40 0.0 24.0 0.92 9.2 18.8
751 188 HIPD 19 0.034 -0.012 0.987 0.993 1.40 0.0 24.0 0.92 9.2 18.8
1292 324 CWAD 19 1130.797 -254.886 0.906 0.982 1.61 -2.0 24.0 1.00 7.2 16.8
1293 324 G#AD 19 80.448 8.530 0.918 0.987 1.61 -2.0 24.0 1.00 7.2 16.8
1294 324 GWAD 19 402.287 -73.019 0.933 0.989 1.61 -2.0 24.0 1.00 7.2 16.8
1295 324 HIPD 19 0.033 -0.007 1.060 0.994 1.61 -2.0 24.0 1.00 7.2 16.8
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module3/pn_info.csv')

2. Soil dataA DSSAT soil profile lists layers with their lower limit of plant-extractable water (SLLL, the wiltingpoint), drained upper limit (SDUL, field capacity), saturation (SSAT), a root growth factor (SRGF),texture and organic carbon. The water a soil can hold for the crop is the sum over layers of(SDUL - SLLL) x layer thickness. The soil file of DSSAT has twelve generic profiles (three depths offour textures) and the measured Millhopper fine sand of the maize experiment:

id name texture depth_cm paw_mm source
0 IB00000001 DEFAULT - DEEP SILTY CLAY SIC 210.0 276.60 SOIL.SOL
1 IB00000002 DEFAULT - MEDIUM SILTY CLAY SIC 150.0 211.80 SOIL.SOL
2 IB00000003 DEFAULT - SHALLOW SILTY CLAY SIC 60.0 94.20 SOIL.SOL
3 IB00000004 DEFAULT - DEEP SILTY LOAM SIL 210.0 200.55 SOIL.SOL
4 IB00000005 DEFAULT - MEDIUM SILTY LOAM SIL 150.0 139.35 SOIL.SOL
5 IB00000006 DEFAULT - SHALLOW SILTY LOAM SIL 60.0 60.45 SOIL.SOL
6 IB00000007 DEFAULT - DEEP SANDY LOAM SL 210.0 229.20 SOIL.SOL
7 IB00000008 DEFAULT - MEDIUM SANDY LOAM SL 150.0 165.60 SOIL.SOL
8 IB00000009 DEFAULT - SHALLOW SANDY LOAM SL 60.0 72.90 SOIL.SOL
9 IB00000010 DEFAULT - DEEP SAND S 210.0 151.35 SOIL.SOL
10 IB00000011 DEFAULT - MEDIUM SAND S 150.0 109.35 SOIL.SOL
11 IB00000012 DEFAULT - SHALLOW SAND S 60.0 43.95 SOIL.SOL
12 IBSB910017 Orangeburg Sandy Loam -99 203.0 215.10 SOIL.SOL
13 IBMZ910014 Millhopper Fine Sand -99 180.0 160.95 SOIL.SOL

Estimating water limits from textureWhen only texture and organic matter are known, a pedotransfer function estimates the limits. xdssat usesSaxton and Rawls (2006) (src/soils.py); DSSAT’s SBuild tool uses a Saxton and Rawls based method too(Gijsman et al. 2002, as the course exercise says). Applied to the layers above (organic matter taken as 1.724 xorganic carbon):

RMSE LL, DUL, SAT: [0.037, 0.045, 0.059]
id name bottom clay silt OC LL LL_sr DUL DUL_sr SAT SAT_sr
0 IB00000001 DEFAULT - DEEP SILTY CLAY 5.0 50.0 45.0 1.75 0.228 0.292640 0.385 0.422030 0.481 0.544967
1 IB00000001 DEFAULT - DEEP SILTY CLAY 15.0 50.0 45.0 1.75 0.228 0.292640 0.385 0.422030 0.481 0.544967
2 IB00000001 DEFAULT - DEEP SILTY CLAY 30.0 50.0 45.0 1.60 0.249 0.292714 0.406 0.422954 0.482 0.542675
3 IB00000001 DEFAULT - DEEP SILTY CLAY 45.0 50.0 45.0 1.45 0.249 0.292788 0.406 0.423878 0.465 0.540385
4 IB00000001 DEFAULT - DEEP SILTY CLAY 60.0 50.0 45.0 1.45 0.249 0.292788 0.406 0.423878 0.465 0.540385
5 IB00000001 DEFAULT - DEEP SILTY CLAY 90.0 50.0 45.0 1.10 0.308 0.292960 0.456 0.426039 0.468 0.535043
6 IB00000001 DEFAULT - DEEP SILTY CLAY 120.0 50.0 45.0 0.65 0.207 0.293181 0.341 0.428824 0.452 0.528182
7 IB00000001 DEFAULT - DEEP SILTY CLAY 150.0 50.0 45.0 0.30 0.243 0.293353 0.365 0.430995 0.455 0.522851
8 IB00000001 DEFAULT - DEEP SILTY CLAY 180.0 50.0 45.0 0.10 0.259 0.293451 0.361 0.432238 0.457 0.519806
9 IB00000001 DEFAULT - DEEP SILTY CLAY 210.0 50.0 45.0 0.01 0.259 0.293495 0.361 0.432798 0.457 0.518437
10 IB00000002 DEFAULT - MEDIUM SILTY CLAY 5.0 50.0 45.0 1.74 0.228 0.292645 0.385 0.422091 0.463 0.544814
11 IB00000002 DEFAULT - MEDIUM SILTY CLAY 15.0 50.0 45.0 1.74 0.228 0.292645 0.385 0.422091 0.463 0.544814

The course’s soil exercise: Umariya and OrangeburgThe exercise gives the laboratory sheets of two soil series and asks for a DSSAT profile of each, withSBuild filling in the water limits from texture. The sheets’ values are in course-data/umariya_soil.csv(Umariya series, Shahdol district, India) and course-data/orangeburg_soil.csv (Orangeburg series pedon 2,Peach County, Georgia, from Perkins 1987). The notebook builds both profiles with sol.SoilProfile,estimating the water limits with Saxton and Rawls and the root growth factor with soils.root_growth_factor.

particle sizes adding up to 100%?
horizon  top  bottom  sand  silt  clay   sum
     Ap    0      11  62.3  13.2  24.5 100.0
     B1   11      31  55.2  18.4  36.4 110.0
    B12   31      50  45.6  11.1  43.3 100.0
     B2   50      75  38.9  12.9  48.2 100.0
    B31   75     100  33.8  13.6  52.6 100.0
    B32  100     125  32.4  10.7  56.9 100.0
    B33  125     150  30.3  14.3  55.4 100.0

The Umariya sheet’s 11-31 cm layer adds up to 110%: the sheet itself has 55.2% sand, 18.4% silt and 36.4% clay.Saxton and Rawls use sand and clay only, so the notebook keeps those two as printed and shows below what thelayer’s water limits would be if the sand were 45.2% instead (the value that would make the sum 100%).

*SOILS: Course soil exercise: Umariya and Orangeburg

*CMUM000001  course      SCL     150 Umariya series (course sheet)
@SITE        COUNTRY          LAT     LONG SCS FAMILY
 -99         India         23.500   80.750 -99
@ SCOM  SALB  SLU1  SLDR  SLRO  SLNF  SLPF  SMHB  SMPX  SMKE
   -99  0.13   9.3  0.60  75.0  1.00  1.00 IB001 IB001 IB001
@  SLB  SLMH  SLLL  SDUL  SSAT  SRGF  SSKS  SBDM  SLOC  SLCL  SLSI  SLCF  SLNI  SLHW  SLHB  SCEC  SADC
    11   -99 0.157 0.251 0.417 1.000  1.10  1.54  0.97  24.5  13.2   -99   -99   6.7   -99  18.5   -99
    31   -99 0.223 0.327 0.421 0.657  0.20  1.53  0.66  36.4  18.4   -99   -99   6.4   -99  19.3   -99
    50   -99 0.261 0.377 0.442 0.445  0.07  1.48  0.50  43.3  11.1   -99   -99   6.4   -99  24.5   -99
    75   -99 0.288 0.409 0.461 0.287  0.04  1.43  0.40  48.2  12.9   -99   -99   6.4   -99  31.3   -99
   100   -99 0.312 0.435 0.480 0.174  0.02  1.38  0.30  52.6  13.6   -99   -99   5.7   -99  33.5   -99
   125   -99 0.337 0.459 0.494 0.105  0.01  1.34  0.25  56.9  10.7   -99   -99   5.6   -99  36.4   -99
   150   -99 0.328 0.451 0.494 0.064  0.02  1.34  0.10  55.4  14.3   -99   -99   5.7   -99  39.5   -99

*CMOG000002  course      LS      180 Orangeburg pedon 2 (Perkins 1987)
@SITE        COUNTRY          LAT     LONG SCS FAMILY
 -99         USA          -99.000  -99.000 -99
@ SCOM  SALB  SLU1  SLDR  SLRO  SLNF  SLPF  SMHB  SMPX  SMKE
   -99  0.13   9.3  0.60  75.0  1.00  1.00 IB001 IB001 IB001
@  SLB  SLMH  SLLL  SDUL  SSAT  SRGF  SSKS  SBDM  SLOC  SLCL  SLSI  SLCF  SLNI  SLHW  SLHB  SCEC  SADC
    18   -99 0.053 0.124 0.437 0.835  7.64  1.71  1.02   6.7  15.8   -99   -99   5.2   -99   7.9   -99
    28   -99 0.079 0.149 0.393 0.631  3.56  1.68  0.22  13.1  13.8   -99   -99   5.0   -99   4.7   -99
    38   -99 0.118 0.196 0.389 0.517  1.74  1.72  0.18  19.5  12.4   -99   -99   5.1   -99   5.2   -99
    74   -99 0.190 0.287 0.401 0.326  0.37  1.74  0.10  31.6  10.4   -99   -99   5.5   -99   6.7   -99
   122   -99 0.213 0.313 0.408 0.141  0.21  1.72  0.08  35.4   8.0   -99   -99   5.8   -99   6.1   -99
   150   -99 0.233 0.337 0.415 0.066  0.12  1.74  0.04  38.9   6.6   -99   -99   5.9   -99   5.0   -99
   180   -99 0.236 0.340 0.415 0.037  0.11  1.71  0.06  39.4   5.2   -99   -99   5.0   -99   5.6   -99

{'LL_printed': 0.2231236088128,
 'LL_sand45': 0.2223893120128,
 'DUL_printed': 0.3274041546780846,
 'DUL_sand45': 0.33916132251787046,
 'SAT_printed': 0.4209602011587246,
 'SAT_sand45': 0.43506471383051043}

Self test 3 compares the drained upper limit and lower limit of Orangeburg with the sheet’s measured watercontents at 1/3 bar (33 kPa) and 15 bar (1500 kPa). The sheet gives them in % by weight; times bulk densitythey are volumetric. Its own “available water” column, in cm³/cm³, is the check: (8.2 - 2.8) x 1.71 / 100 =0.092 for the top layer, printed as 0.09. Self test 2 compares with soils of the same series already inSOIL.SOL: IBSB910017, an Orangeburg sandy loam.

horizon top bottom clay bulk_density water_33kpa_pct_wt water_1500kpa_pct_wt available_water_fc DUL_measured LL_measured available_check DUL_sr LL_sr
0 Ap 0 18 6.7 1.71 8.2 2.8 0.09 0.14022 0.04788 0.09234 0.123586 0.053408
1 AB 18 28 13.1 1.68 7.5 4.2 0.06 0.12600 0.07056 0.05544 0.148969 0.078930
2 BA 28 38 19.5 1.72 10.2 6.0 0.07 0.17544 0.10320 0.07224 0.195836 0.117693
3 Bt1 38 74 31.6 1.74 14.0 9.9 0.07 0.24360 0.17226 0.07134 0.286747 0.190058
4 Bt2 74 122 35.4 1.72 16.3 11.3 0.09 0.28036 0.19436 0.08600 0.312651 0.212585
5 Bt3 122 150 38.9 1.74 17.7 12.7 0.09 0.30798 0.22098 0.08700 0.337427 0.233117
6 Bt4 150 180 39.4 1.71 16.9 12.8 0.07 0.28899 0.21888 0.07011 0.339911 0.236274
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module3/soil_sheet_orangeburg.csv')

3. Water-limited productionThe course’s water-limited exercise builds UFGA8212.MZX from the potential production experiment ofmodule 1: McCurdy 84aa maize planted on 26 February 1982 (7.2 plants/m², 61 cm rows, 7 cm deep), theMillhopper fine sand, simulation from 25 February with the initial soil water the exercise lists, the waterbalance on and nitrogen off. Treatment 1 is rainfed (no irrigation at all); treatment 2 irrigatesautomatically when the available water in the top 30 cm falls below 50%. Rain and irrigation enter thesoil; water runs off, drains, evaporates from the soil and is taken up by the roots from each layer(Soil/SoilWater/WATBAL.for).filex.build_filex copies a template treatment; the rainfed treatment needs irrigation level 0, which thetemplate’s treatment 1 does not have, and the automatic treatment needs its own simulation-control level.learnlib.set_treatment_levels and a second simulation-control block do what XBuild does for these two.

*TREATMENTS                        -------------FACTOR LEVELS------------
@N R O C TNAME.................... CU FL SA IC MP MI MF MR MC MT ME MH SM
 1 1 0 0 rainfed                    1  1  0  1  1  0  1  0  0  0  0  0  1

*CULTIVARS
@C CR INGENO CNAME
 1 MZ IB0035 McCurdy 84aa

*FIELDS
@L ID_FIELD 
level HWAM CWAM LAIX PRCM IRCM IR#M ETCM EPCM ESCM ROCM DRCM SWXM
0 potential 11859 23174 4.562119 NaN 0 0 NaN NaN NaN NaN NaN NaN
0 rainfed 2010 7144 3.157887 661.0 0 0 330.0 240.0 90.0 35.0 309.0 139.0
0 automatic irrigation 11691 22990 4.562119 661.0 194 12 469.0 389.0 80.0 38.0 354.0 146.0
soil file layers: [5.0, 15.0, 30.0, 60.0, 90.0, 120.0, 150.0, 180.0]
layer top bottom LL DUL SAT
0 1 0.0 5.0 0.026 0.096 0.23
1 2 5.0 15.0 0.025 0.086 0.23
2 3 15.0 30.0 0.025 0.086 0.23
3 4 30.0 45.0 0.025 0.086 0.23
4 5 45.0 60.0 0.025 0.086 0.23
5 6 60.0 90.0 0.028 0.090 0.23
6 7 90.0 120.0 0.028 0.090 0.23
7 8 120.0 150.0 0.029 0.130 0.23
8 9 150.0 180.0 0.070 0.258 0.36

The daily SoilWat output reports soil water (SW1D, SW2D …) for the layers the engine simulates,which are not the layers of the soil file: with the soil layer option MESOL = 2 the engine keeps 5 and15 cm at the top and splits thick layers (LYRSET2, LMATCH.for:263).learnlib.engine_layers, used above, is a port of that rule.### Self test 2: the twelve generic soils, and the course’s twoThe rainfed treatment on each generic profile, on the measured Millhopper fine sand, and on the Umariya andOrangeburg profiles built above. Initial soil water is rebuilt for each soil at 100% of its plant-availablerange (ic_water=1.0), the default the exercise mentions before it sets the Millhopper values by hand.

id name texture depth_cm paw_mm source HWAM CWAM ETCM DRCM ROCM
11 IB00000012 DEFAULT - SHALLOW SAND S 60.0 43.950000 SOIL.SOL 1117 6664 358 221 100
5 IB00000006 DEFAULT - SHALLOW SILTY LOAM SIL 60.0 60.450000 SOIL.SOL 1086 7766 414 99 169
8 IB00000009 DEFAULT - SHALLOW SANDY LOAM SL 60.0 72.900000 SOIL.SOL 1098 7806 408 172 105
2 IB00000003 DEFAULT - SHALLOW SILTY CLAY SIC 60.0 94.200000 SOIL.SOL 2537 9777 415 44 292
10 IB00000011 DEFAULT - MEDIUM SAND S 150.0 109.350000 SOIL.SOL 4020 11515 403 211 67
4 IB00000005 DEFAULT - MEDIUM SILTY LOAM SIL 150.0 139.350000 SOIL.SOL 5643 14510 455 121 148
9 IB00000010 DEFAULT - DEEP SAND S 210.0 151.350000 SOIL.SOL 3856 11161 397 242 44
12 IBMZ910014 Millhopper Fine Sand -99 180.0 160.950000 SOIL.SOL 2010 7144 330 318 35
7 IB00000008 DEFAULT - MEDIUM SANDY LOAM SL 150.0 165.600000 SOIL.SOL 7079 16840 460 177 79
14 CMOG000002 Orangeburg pedon 2 (Perkins 1987) LS 180.0 170.588072 course exercise 3692 10845 406 188 91
13 CMUM000001 Umariya series (course sheet) SCL 150.0 175.347325 course exercise 5220 12750 437 132 138
3 IB00000004 DEFAULT - DEEP SILTY LOAM SIL 210.0 200.550000 SOIL.SOL 5203 13716 448 139 127
1 IB00000002 DEFAULT - MEDIUM SILTY CLAY SIC 150.0 211.800000 SOIL.SOL 10193 21025 483 64 264
6 IB00000007 DEFAULT - DEEP SANDY LOAM SL 210.0 229.200000 SOIL.SOL 6995 16723 460 181 70
0 IB00000001 DEFAULT - DEEP SILTY CLAY SIC 210.0 276.600000 SOIL.SOL 10263 21209 487 80 234

Self test 3: when to irrigateWith IRRIG = A the engine irrigates when the available water in the top IMDEP cm of soil falls toITHRL percent of its capacity, and refills it to ITHRU(Management/IRRIG.for:827, with the available fraction fromSWDEFICIT, lines 1025-1064). The exercise’s grid: depths of 10, 30, 50 and 70 cm and thresholds of 10, 30, 50,70 and 90%.

depth_cm 10 30 50 70
threshold
10 7403.0 9183.0 9381.0 7927.0
30 9732.0 11016.0 11505.0 10753.0
50 10194.0 11691.0 11859.0 11818.0
70 11842.0 11859.0 11859.0 11859.0
90 11824.0 11859.0 11859.0 11859.0

Self test 4: other years at GainesvilleThe same rainfed and automatically irrigated maize planted on 26 February of every year for whichdssat-csm-data has a full Gainesville weather file. All the experiment’s dates move with planting.

28 years: [2006, 2007, 2021, 2022, 1958, 1959, 1960, 1961, 1962, 1964, 1965, 1966, 1968, 1969, 1970, 1971, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1989, 1990] | skipped, unreadable: ['UFGA6701.WTH', 'UFGA7601.WTH', 'UFGA9601.WTH']
level automatic irrigation rainfed
year
1958 10654 7867
1959 11733 9545
1960 11418 1687
1961 12821 1673
1962 11743 2484
1964 11559 4321
1965 13407 1754
1966 12213 7788
1968 11251 3248
1969 10103 2943
1970 12149 4648
1971 13106 4277
1978 11496 2652
1979 13017 6511
1980 10870 6213
1981 10387 1324
1982 11691 2010
1983 11862 4840
1984 10493 3145
1985 9794 3356
1986 14648 4081
1987 10847 4401
1989 10183 2051
1990 11194 1754
2006 10554 1322
2007 11378 3946
2021 11564 2082
2022 9837 5559
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module3/wl_files.csv')

Paddy rice: the flood water balanceFor rice grown in bunded, puddled fields the water balance has one more store: the flood above the soil. Bundshold rain and irrigation as standing water up to their height; the flood loses water by evaporation, byinfiltration into the puddled soil at a percolation rate, and by spilling over the bund. The engine keeps thisbalance daily (Management/Paddy_Mgmt.for, written to FloodW.OUT by Management/OpFlood.for) when theirrigation section of the experiment file sets the paddy operations: IR010 puddling, IR008 percolation rate(mm/day), IR009 bund height (mm), IR011 constant flood depth (mm) and IR006 flood depth (mm) (codes andmeanings from the engine’s DETAIL.CDE).The runs use xdssat’s own rice template, templates/XDRI8601.RIX (IRRI’s IRMZ8601 experiment at Munoz,Philippines, with an added rainfed bunded water level), with its three water regimes, in the dry season as in theexperiment (transplanted early February 1986) and in the wet season (1 July 1986), nitrogen off.

TRNO season regime HWAM PRCM IRCM ROCM DRCM ETCM days_to_maturity flood_days flood_mean flood_evap infiltration over_bund WSPD WSGD
0 1 dry season flooded, 50 mm kept 8939 13 784 0 178 577 89 91 46.233333 151.2 596.8 0.0 0.000000 0.000000
1 2 dry season flooded, drained twice 8939 13 859 75 178 577 89 91 44.169892 151.2 596.8 75.0 0.000000 0.000000
2 3 dry season rainfed, bunded 8760 834 0 0 458 463 161 1 0.013939 0.0 834.0 0.0 0.328917 0.359965
3 4 wet season flooded, 50 mm kept 8876 1109 77 317 198 541 97 100 99.623762 153.0 582.4 317.3 0.000000 0.000000
4 5 wet season flooded, drained twice 8876 1109 241 481 198 541 97 100 78.639604 153.0 582.4 481.0 0.000000 0.000000
5 6 wet season rainfed, bunded 8876 1109 0 258 196 538 97 99 100.369307 149.4 581.5 258.2 0.000000 0.000000
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module3/flood_files.csv')

4. Things to try- Run GLUE with N = 500 and again with N = 3000. How much do the best values move? That spread is part of the answer, not noise to hide.- Remove one calibration experiment and recalibrate. Which coefficients change most?- Build your own soil profile with SoilProfile and saxton_rawls (sand, clay and organic matter of your field) and run the rainfed maize on it.- In the automatic irrigation runs, which threshold gives most grain per mm of water applied, and is it the one that gives the highest yield?- Run GLUE for DEKALB 52-59 AF a second time with another seed, as the exercise suggests. How far apart are the two answers?- In the peanut grid, is the combination with the best mean d also best for each variable on its own?

0
engine C:\TEMP\dsn\dssat\dscsm048.exe
csm_data_commit 99c95b340acb9515c2d0a8ab582f5fbbf076f345
csm_os_commit 25c93b9a2f73f8ec45bf441b198dac5fb7b22849
glue_commit e86093e400fbbdfc8e2c751c98acc2136835c3af
run_on 2026-11-07 11:10
Back to top