Open phil-blain opened 3 years ago
@phil-blain Thank you for pointing out all of these issues! I suspect that most of them are cases where they aren't actually used in the model calculation until later, when they might have real values, but we should fix them anyhow. Can you tell whether fixing any of them would change the solution? I'm looking for prioritization.
Any volunteers to take care of any of these (maybe you're working on related code?)
I did not investigate in details if it would change the solution... I'm not working on these area of the code currently.
Looking a little closer at these failures. Thanks again @phil-blain for providing the traceback information. None of these should affect the solution, although they might affect the output.
ice_init_column.F90
array apeffn is used but is not initialized if shortwave= 'ccsm3' array albpndn is used but is not initialized if shortwave= 'ccsm3' array albicen is used but is not initialized if calc_Tsfc = .false.
apeffn and albpndn are not used with ccsm3. Rather than putting conditionals inside the loop in order to stop the calculation that uses them (which is just a merge from category values to the cell-aggregate value), it would be easier to just initialize them to zero for any case. Same goes for albicen when calc_Tsfc=F.
ice_history_bgc.F90, ice_history_fsd.F90 Would these problems be fixed simply by calling init_history_bgc and save_init during the run initialization process (i.e. in CICE_InitMod.F90)? Maybe we need a general history initialization routine.
icepack_zsalinity.F90
zsal_tot is NaN
This one does not appear to be initialized in CICE or in the Icepack driver, ever -- definitely a bug. It's strictly a history variable.
Problems in ice_grid.F90
those were fixed in https://github.com/CICE-Consortium/CICE/pull/749
Following #579, and to my request, the machine files for
daley
were updated to use the signalling NaN initialization for debug builds.I ran the 'base_suite' on
master
yesterday for the first time since then and noticed several more failures indebug
cases due to the code using arrays or variable before they are initialized. @apcraig I know you did not activate the flag on other machines so I guess you must be aware of some of these issues, but I spent a little time documenting the failures I got and so I thought it would be worth it to list them here.So here goes my findings:
problems in
ice_init_column.F90
daley_intel_restart_gx3_6x2_alt01_debug_short
array
apeffn
is used but is not initialized ifshortwave= 'ccsm3'
daley_intel_restart_gx3_8x2_alt02_debug_short
array
albpndn
is used but is not initialized ifshortwave= 'ccsm3'
daley_intel_restart_gx3_4x2_alt03_debug_short
same backtrace as above but at line 425 array
albicen
is used but is not initialized ifcalc_Tsfc = .false.
Problems in
ice_history_bgc.F90
daley_intel_smoke_gx3_4x4_alt04_debug_short, daley_intel_smoke_gx3_4x1_debug_isotope
In GDB:
In DDT:
field_accum
is all NaN (which isPP_net
one frame above). Same forgrow_net
,upNO
,upNH
. Looks like the first two are initialized ininit_history_bgc
, called byice_step
, so not yet initialized when we write the initial condition.daley_intel_smoke_gx3_8x2_bgcz_debug, daley_intel_smoke_gx3_8x1_bgcskl_debug
idem for
ocean_bio
Problems in
ice_grid.F90
daley_intel_restart_gbox128_4x2_boxdyn_debug_short, daley_intel_smoke_gbox128_2x2_boxadv_debug_short, daley_intel_smoke_gbox128_4x4_boxrestore_debug_short
lont_bounds
is all NaNProblems in
ice_history_fsd.F90
daley_intel_smoke_gx3_4x2_debug_diag24_fsd1_run5day, daley_intel_restart_gx3_4x2_debug_fsd12_short
aicen_init
is not initialized. (initialized insave_init
called inice_step
).Problems in
icepack_zsalinity.F90
daley_intel_smoke_gx3_8x2_debug_diag24_run5day_zsal
zsal_tot
is NaN.@apcraig @eclare108213 @JFLemieux73