Skip to content

EAM SCM bug fixes#8542

Draft
huiwanpnnl wants to merge 6 commits into
E3SM-Project:masterfrom
PAESCAL-SciDAC5:eam_scm_bugfixes
Draft

EAM SCM bug fixes#8542
huiwanpnnl wants to merge 6 commits into
E3SM-Project:masterfrom
PAESCAL-SciDAC5:eam_scm_bugfixes

Conversation

@huiwanpnnl

@huiwanpnnl huiwanpnnl commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

This PR builds on top of #8537. It Includes 3 bug fixes for the EAM (Fortran) Single Column Model (SCM):

Fix 1: Revise the behavior of the "fill_end" option when using IOP files to initialize model so that the end values from an IOP file are applied only to model levels outside the IOP domain, not to the upper/lower boundary levels that are just inside the IOP domain. This change is needed for SCM simulations with low model top.

The sample figure below shows two DYCOMS RF01 simulations using a ~10 m vertical resolution and a ~3 km model top. Only after the fix do we see the expected temperature inversion near 900 hPa and the expected stratocumulus cloud layer. These simulations were performed with v3 ("master"), using CLUBB as the turbulence parameterization.

T_and_CLDLIQ__fill_end

Fix 2: In the "dycore" part of the SCM configuration, advance in time the u and v fields (in addition to T, q, etc.). In typical SCM setups, this is not necessary, as u and v are overwritten with values from an IOP file. On the other hand, if the IOP file does not include u, v, or if the user choose to comment out that overwrite, then not advancing u, v in time in the dycore part will lead to erroneous results for winds.


Fix 3: It seems to us (the PAESCAL team) that during an SCM simulation, the subroutine call call iop_setinitial(elem) is done twice. The impact should be negligible and rather harmless in most cases, expect that in one of our attempts to compare a further simplified SCM simulation with a turbulence "offline" test, this extra initialization caused confusion. If @bogensch could confirm that the call of iop_setinitial identified in
4c07d90 is indeed not necessary, we would suggest removing it.

Below is a sample figure, again from the DYCOMS RF01 case, showing the slight impact on CLDLIQ of that second initialization.

CLDLIQ_2vs1_init

My run script, plotting script, and the IC file can be found via NERSC's web portal or in NERSC's CFS under

/global/cfs/projectdirs/m4359/www/amr/RF01_dz_sensitivity/e3sm/202607_PRs/

huiwanpnnl and others added 6 commits July 3, 2026 17:53
In components/eam/src/ and components/homme/src/, the command
  grep -ir 'hyai(1)' *
reveals multiple places where the calculation of air pressure
assumes hybi(1) = 0. This commit adds a few lines to abort
a simulation when hybi(1) is non-zero.
If dosw or dolw is .false. at the first timestep,
set the corresponding heating rates and TOA/SFC fluxes to zero
to avoid floating-point exception in debug runs with LW or SW turned off.
...if all pmid values are higher than a specified threshold (currently set to 450 hPa)
…et_prescribed_scm

This is necessary when we want to run SCM and let the winds evolve.
@rljacob rljacob requested a review from bogensch July 5, 2026 21:35
@rljacob rljacob added EAM Fortran-based E3SM Atmosphere Model SCM single column model labels Jul 5, 2026
@huiwanpnnl

huiwanpnnl commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I intended to make this a draft PR to discuss with @bogensch , but I might have clicked a wrong button -- and clicked it too early (before actually entering my description of the changes.)

@rljacob rljacob marked this pull request as draft July 5, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EAM Fortran-based E3SM Atmosphere Model SCM single column model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants