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
Hacking a temporary fix for #395 and running CABLE-MPI offline (main branch - commit 95b9b5e) using the crujra_accessN96_1h configuration results in the following divide by zero exception:
It looks like ssnow%ssat_hys(i,k) and ssnow%watr_hys(i,k) are both uninitialised and contain the same garbage value, causing the subtraction of the two values to result in divide by zero.
Steps to reproduce (Gadi)
Apply the following patch to fix the error described in #395 (WARNING - this patch is untested and should not be used for work other than reproducing this issue):
diff --git a/src/offline/cable_parameters.F90 b/src/offline/cable_parameters.F90
index b6133f6..c741eaf 100644
--- a/src/offline/cable_parameters.F90+++ b/src/offline/cable_parameters.F90@@ -3340,11 +3340,11 @@ CONTAINS
totdepth = 0.0
DO is = 1, ms-1
totdepth = totdepth + soil_zse(is) * 100.0 ! unit in centimetres
- veg%froot(:, is) = MIN( 1.0, 1.0-veg%rootbeta(:)**totdepth )+ veg%froot(ifmp:fmp, is) = MIN( 1.0, 1.0-veg%rootbeta(ifmp:fmp)**totdepth )
END DO
- veg%froot(:, ms) = 1.0 - veg%froot(:, ms-1)+ veg%froot(ifmp:fmp, ms) = 1.0 - veg%froot(ifmp:fmp, ms-1)
DO is = ms-1, 2, -1
- veg%froot(:, is) = veg%froot(:, is)-veg%froot(:,is-1)+ veg%froot(ifmp:fmp, is) = veg%froot(ifmp:fmp, is)-veg%froot(ifmp:fmp,is-1)
END DO
END SUBROUTINE init_veg_from_vegin
The steps to reproduce the error are the same as that described in #395.
The text was updated successfully, but these errors were encountered:
Hacking a temporary fix for #395 and running CABLE-MPI offline (
main
branch - commit 95b9b5e) using the crujra_accessN96_1h configuration results in the following divide by zero exception:The exception occurs on this line of the code:
CABLE/src/offline/cable_parameters.F90
Line 2320 in 95b9b5e
It looks like
ssnow%ssat_hys(i,k)
andssnow%watr_hys(i,k)
are both uninitialised and contain the same garbage value, causing the subtraction of the two values to result in divide by zero.Steps to reproduce (Gadi)
Apply the following patch to fix the error described in #395 (WARNING - this patch is untested and should not be used for work other than reproducing this issue):
The steps to reproduce the error are the same as that described in #395.
The text was updated successfully, but these errors were encountered: