E3SM icon indicating copy to clipboard operation
E3SM copied to clipboard

floating invalid in `PhosphorusDynamicsMod.F90` with `SMS_D_Ld20.f45_f45.IELMFATES.pm-cpu_intel.elm-fates_eca`

Open ndkeen opened this issue 1 year ago • 4 comments

With Jan23 master and SMS_D_Ld20.f45_f45.IELMFATES.pm-cpu_intel.elm-fates_eca

119: forrtl: error (65): floating invalid
119: Image              PC                Routine            Line        Source
119: libpthread-2.31.s  000015143EFEF910  Unknown               Unknown  Unknown
119: e3sm.exe           00000000033F60C1  phosphorusdynamic         653  PhosphorusDynamicsMod.F90
119: e3sm.exe           0000000002FAF771  ecosystemdynmod_m         431  EcosystemDynMod.F90
119: e3sm.exe           00000000009CA4D5  elm_driver_mp_elm        1042  elm_driver.F90
119: e3sm.exe           0000000000956157  lnd_comp_mct_mp_l         617  lnd_comp_mct.F90
119: e3sm.exe           00000000004A8323  component_mod_mp_         757  component_mod.F90
119: e3sm.exe           000000000046955B  cime_comp_mod_mp_        2915  cime_comp_mod.F90
119: e3sm.exe           0000000000490BCB  MAIN__                    153  cime_driver.F90
119: e3sm.exe           000000000043336D  Unknown               Unknown  Unknown

ndkeen avatar Jan 25 '24 16:01 ndkeen

Seems to be due to lamda_ptase being a NaN, and in pftvarcon.F90, lamda_ptase is not read from parameter file if fates is active. ( pftvarcon.F90 ).

@rgknox @glemieux Need clarification if the code segment in PhosphorusDynamicsMod.F90 ( here ) should be skipped or if the parameter should be read when FATES is active.

peterdschwartz avatar Jan 30 '24 18:01 peterdschwartz

Nice find guys. I had this fixed in my manuscript code, but it never got into master. I recommend moving the read of lamda_ptase to be outside of the use_fates filter (so it is read in for fates and non-fates runs).

https://github.com/E3SM-Project/E3SM/blob/master/components/elm/src/main/pftvarcon.F90#L900-L901

EDIT: ~~Do you guys want to to this or should I submit a PR to this branch?~~ I'll submit a PR as a fix to this

rgknox avatar Jan 30 '24 19:01 rgknox

Same error with master of Feb 26th

ndkeen avatar Feb 27 '24 04:02 ndkeen

@ndkeen this will be fixed by @rgknox PR linked above

peterdschwartz avatar Feb 27 '24 16:02 peterdschwartz