scream icon indicating copy to clipboard operation
scream copied to clipboard

Bug in `AtmosphereDriver::set_initial_conditions()` for Physics PG2 Grid

Open mjs271 opened this issue 5 months ago • 0 comments

In working on the DAG constructor, and running the homme_shoc_cld_spa_p3_rrtmgp_pg2_dp case, I discovered, with the help of @bartgol, that, for the PG2 grid, the tracers group and the nc_nuceat_tend and ni_activated fields do not appear to be initialized.

I believe this is due to the logic control used within the process_ic_field() lambda

if (ic_pl.isParameter(fname)) {...}
else if (fname == "phis" or fname == "sgh30") {...}
else if (not (fvphyshack and grid_name == "Physics PG2")) {...}
else if (fvphyshack and grid_name == "Physics GLL") {...}

Specifically, the final 2 evaluate to the same truth condition when fvphyshack == true, and this results in the tracers group being processed twice for the Physics GLL grid and never for the PG2 case, while the fields nc_nuceat_tend and ni_activated never get processed.

mjs271 avatar Sep 27 '24 00:09 mjs271