Today on the software engineering standup, I mentioned a problem I was having in SoilBiogeochemPrecisionControl() where the run would crash with a floating-point error on the following line:
It was suggested that I check to see whether the referenced member of that array was NaN or Inf, and indeed it is NaN.
Bill noticed that the decomp_cpools_vr_col array isn't filled with spval, in SoilBiogeochemCarbonStateType → InitHistory(), for c12 as it is for c13 and c14. I tried the following modification:
but unfortunately the same crash happens.
My next course of action is going to be combing the code for all places where decomp_cpools_vr_col is modified, adding an isnan() check after each. Unless, that is, anyone has any ideas? Thanks in advance.
(Also: The array initialization idea I mentioned didn't pan out either.)
Code:
if (abs(cs%decomp_cpools_vr_col(c,j,k)) < ccrit) then
Bill noticed that the decomp_cpools_vr_col array isn't filled with spval, in SoilBiogeochemCarbonStateType → InitHistory(), for c12 as it is for c13 and c14. I tried the following modification:
Code:
diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90
index 7ef4265a4..0e5147a74 100644
--- a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90
+++ b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90
@@ -158,6 +158,7 @@ contains
end if
this%decomp_cpools_col(begc:endc,:) = spval
+ this%decomp_cpools_vr_col(begc:endc,:,:) = spval
do l = 1, ndecomp_pools
if ( nlevdecomp_full > 1 ) then
data2dptr => this%decomp_cpools_vr_col(:,1:nlevsoi,l)
My next course of action is going to be combing the code for all places where decomp_cpools_vr_col is modified, adding an isnan() check after each. Unless, that is, anyone has any ideas? Thanks in advance.
(Also: The array initialization idea I mentioned didn't pan out either.)