Skip to content

Fix ERS and DIMCS failures for when USE_CR_GRID is on#357

Merged
alperaltuntas merged 4 commits into
NCAR:dev/ncarfrom
alperaltuntas:fix_bodner_ers_and_dimcs
Apr 28, 2025
Merged

Fix ERS and DIMCS failures for when USE_CR_GRID is on#357
alperaltuntas merged 4 commits into
NCAR:dev/ncarfrom
alperaltuntas:fix_bodner_ers_and_dimcs

Conversation

@alperaltuntas
Copy link
Copy Markdown
Member

@alperaltuntas alperaltuntas commented Apr 26, 2025

This PR fixes the exact restart reproducibility (ERS) and dimensional consistency (DIMCS) tests that failed when testing ESCOMP/MOM_interface#252, specifically, when USE_CR_GRID is turned on. The fixes are:

  • add dimensional scaling factor for sfc_buoy_flx when set to KPP_buoy_flux
  • register MLD and h_ML as restart fields when BODNER23 is on
  • add missing scale arg when reading Cr_space
  • also fix an OMP bug in Bodner.

@alperaltuntas alperaltuntas self-assigned this Apr 26, 2025
endif

if (MLE_use_PBL_MLD) then
if (MLE_use_PBL_MLD .or. MLE_use_Bodner) then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be MLE_use_PBL_MLD .and. MLE_use_Bodner? I do not think we need to save MLD if MLE_use_Bodner = True and MLE_use_PBL_MLD = False.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In mixedlayer_restrat_Bodner subroutine, BLD (MLD) and h_MLD is needed regardless of MLE_use_PBL_MLD. Hence, the .or. clause.

endif
if (MLE_use_PBL_MLD .or. do_brine_plume .or. use_fpmix .or. &
use_neutral_diffusion .or. use_hor_bnd_diff) then
use_neutral_diffusion .or. use_hor_bnd_diff .or. MLE_use_Bodner) then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Do we need to save h_ML even when MLE_use_PBL_MLD = False?
If not, it might make more sense to have:
... .or. use_hor_bnd_diff .or. (MLE_use_Bodner .and. MLE_use_PBL_MLD)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, h_MLD is needed by mixedlayer_restrat_Bodner regardless of MLE_use_PBL_MLD.

@gustavo-marques gustavo-marques self-requested a review April 28, 2025 16:11
@alperaltuntas alperaltuntas merged commit 6624bf8 into NCAR:dev/ncar Apr 28, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants