-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turning off IS_TROPICAL for grasses causes a floating-point exception error during Canopy structure calculations #333
Comments
@mccabete Does it run if you set IALLOM=0? In principle IALLOM=3 should change only the functional form of allometric equations for tropical PFTs only, and not affect temperate PFTs. It sound like a bug in any case, but it would help to figure out if this is a general bug or something specific to IALLOM=3 changing more equations than what it should. |
Yeah, Looking back at my run logs I also get this if IALLOM is 0 |
sorry forgot I did that test run |
The routine causing the crash is reduced_wind8, and from the message you sent, the error is around here (though the exact line 2029 is just a comment) ED2/ED/src/dynamics/canopy_struct_dynamics.f90 Lines 2029 to 2032 in fa80dab
Because there is a division for zero and a log, my hunch is that the floating point exception is coming from there. Perhaps you could add a temporary sanity check like the one below and see what it reports. if ( (height < dheight) .or. rough <= 0.d0 ) then
write(unit=*,fmt='(a)') ' Invalid height scales in reduced_wind8!'
write(unit=*,fmt='(a,1x,es12.5)') 'Height = ',height
write(unit=*,fmt='(a,1x,es12.5)') 'Displacement = ',dheight
write(unit=*,fmt='(a,1x,es12.5)') 'Roughness = ',rough
call fatal_error('Height scales are incorrectly set.','reduced_wind8' &
,'canopy_struct_dynamics.f90')
end if The default temperate C3 grass allometry make them very short, and we impose minimum vegetation height for calculating many things due to numeric stability. I guess this could create instances where height is less than displacement height. If roughness is the culprit, then I don't know... Also, it may be worth trying to run with different ICANTURB settings, to see if the problem is specific to one implementation or a more general issue. |
Thanks for the check code, I'll try it out. I agree, it looks like a height related thing. This was with C4 grasses (PFT 1). |
If I run grasses with IS_TROPICAL = 1, then they are able to produce output. If IS_TROPICAL = 0, it will get an error that traces back to here:
ED2/ED/src/dynamics/canopy_struct_dynamics.f90
Line 2031 in fa80dab
Because it is an issue with logging a height parameter, I suspect that differences in tropical allometries vs non tropical is the culprit. This is under IALLOM = 3 (the beta allometry scheme).
The text was updated successfully, but these errors were encountered: