4. Get input for pySWAP#
This example shows how to get input for pySWAP.
import dutchsoils as ds
4.0. Get soil profile#
sp = ds.SoilProfile.from_bofekcluster(1008)
4.1. Get pyswap soil profile discretisation#
sp.get_swapinput_profile(
discretisation_compheights=[1, 2, 5, 10, 20],
discretisation_depths=[10, 20, 30, 40, 100]
)
{'ISUBLAY': [1, 2, 3, 4, 5, 6, 7, 8, 9],
'ISOILLAY': [1, 2, 2, 3, 3, 4, 4, 5, 5],
'HSUBLAY': [10, 20, 5, 25, 20, 5, 10, 5, 100],
'HCOMP': [1, 2, 5, 5, 10, 5, 10, 5, 20],
'NCOMP': [10, 10, 1, 5, 2, 1, 1, 1, 5]}
4.2. Get pyswap soil hydraulic parameters#
sp.get_swapinput_hydraulicparams()
{'ORES': array([0. , 0.01, 0.01, 0.01, 0.01]),
'OSAT': array([0.71862598, 0.573268 , 0.84863548, 0.36584689, 0.36584689]),
'ALFA': array([0.01906191, 0.02785405, 0.01192909, 0.01598691, 0.01598691]),
'NPAR': array([1.1366583 , 1.07995207, 1.27153561, 2.16275113, 2.16275113]),
'KSATFIT': array([ 4.48373535, 9.68929074, 3.40200949, 22.32215442, 22.32215442]),
'LEXP': array([ 1.00000000e-04, -6.09131057e+00, -1.24929996e+00, 2.86796720e+00,
2.86796720e+00]),
'H_ENPR': [0.0, 0.0, 0.0, 0.0, 0.0],
'KSATEXM': array([ 4.48373535, 9.68929074, 3.40200949, 22.32215442, 22.32215442]),
'BDENS': array([ 641., 1044., 232., 1545., 1668.])}
4.3. Get pyswap soil textural fractions#
sp.get_swapinput_fractions()
{'PSAND': array([0.25, 0.1 , 0.25, 0.92, 0.92]),
'PSILT': array([0.35, 0.35, 0.57, 0.06, 0.06]),
'PCLAY': array([0.4 , 0.55, 0.18, 0.02, 0.02]),
'ORGMAT': array([0.2 , 0.07 , 0.75 , 0.03 , 0.004])}