You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in function cap_inf_rate(float dt_h, float h, float infrate),The unit of Parameter “dt_h” should be hours,but in function inf_ga(), call cap_inf_rate() use "dt" instead of "dt_h", is this misused?
def inf_ga(DTYPE_t [:, :] arr_h, DTYPE_t [:, :] arr_eff_por,
DTYPE_t [:, :] arr_pressure, DTYPE_t [:, :] arr_conduct,
DTYPE_t [:, :] arr_inf_amount, DTYPE_t [:, :] arr_water_soil_content,
DTYPE_t [:, :] arr_inf_out, float dt):
'''Calculate infiltration rate using the Green-Ampt formula
'''
cdef int rmax, cmax, r, c
cdef float dt_h, infrate, avail_porosity, poros_cappress, conduct
rmax = arr_h.shape[0]
cmax = arr_h.shape[1]
for r in prange(rmax, nogil=True):
for c in range(cmax):
dt_h = dt / 3600. # dt from sec to hours
conduct = arr_conduct[r, c]
avail_porosity = arr_eff_por[r, c] - arr_water_soil_content[r, c]
poros_cappress = avail_porosity * arr_pressure[r, c]
infrate = conduct * (1 +
(poros_cappress / arr_inf_amount[r, c]))
# cap the rate
infrate = cap_inf_rate(dt, arr_h[r, c], infrate)
# update total infiltration amount
arr_inf_amount[r, c] += infrate * dt_h
# populate output infiltration array
arr_inf_out[r, c] = infrate
The text was updated successfully, but these errors were encountered:
in function cap_inf_rate(float dt_h, float h, float infrate),The unit of Parameter “dt_h” should be hours,but in function inf_ga(), call cap_inf_rate() use "dt" instead of "dt_h", is this misused?
The text was updated successfully, but these errors were encountered: