In this notebook we do some tests to validate the unsaturated zone module applied in GWTSA for non-linear time serie models. Two models have been applied,
The following tests are used:
In [3]:
import numpy as np
import matplotlib.pyplot as plt
import timeit
import pstats, cProfile
from GWTSA import *
In [10]:
# Provide the forcings precipitation and potential evapotransapiration
P = 10 * np.ones(100) #np.random.rand(10000)*3
E =10 * np.ones(100) #np.random.rand(10)
# Provide the model parameters for the soil module
S_cap = 0.10
K_sat = -6.0
Beta = 1.0
D = -3.0
# Provide some details for the timesteps to calculate the soil state
Time_Model = np.arange(0,100,1)
dt= 1
In [5]:
cProfile.runctx("Unsat_Zone.percolation(Time_Model, P, E, S_cap, K_sat, Beta, D, dt)", globals(), locals(), "Profile.prof", sort=-1)
s = pstats.Stats("Profile.prof")
s.strip_dirs().sort_stats("time").print_stats()
In [ ]: