Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make MLD_003 computation available to mixedlayer_restrat_Bodner #327

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

alperaltuntas
Copy link
Member

This PR introduces the calculate_mld_003 subroutine, previously a code black in mixedlayer_restrat_OM4, so as to make it available in mixedlayer_restrat_bodner as well. The newly added flag BODNER_USE_MLD_003 determines whether mld_003 is indeed used in mixedlayer_restrat_bodner.

Fixes: #326

"BODNER_USE_MLD_003 is true.", default=.false.)
call get_param(param_file, mdl, "BODNER_USE_MLD_003", CS%Bodner_use_MLD_003, &
"If true, the Bodner parameterization will use the mixed-layer "//&
"depth based on MLD_003.", default=.false.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

MLE_DENSITY_DIFF and MLE_MLD_STRETCH need to be defined when BODNER_USE_MLD_003=True.

if (CS%Bodner_use_MLD_003) then
      call get_param(param_file, mdl, "MLE_DENSITY_DIFF", CS%MLE_density_diff, &
           "Density difference used to detect the mixed-layer "//&
           "depth used for the mixed-layer eddy parameterization "//&
           "by Fox-Kemper et al. (2010)", units="kg/m3", default=0.03, scale=US%kg_m3_to_R)
      call get_param(param_file, mdl, "MLE_MLD_STRETCH", CS%MLE_MLD_stretch, &
             "A scaling coefficient for stretching/shrinking the MLD "//&
             "used in the MLE scheme. This simply multiplies MLD wherever used.",&
             units="nondim", default=1.0)
    endif

@gustavo-marques
Copy link
Collaborator

Thanks for the PR!

In addition to the comment above, I suggest we rename calculate_mld_003 to calculate_mld because the user can set the MLD criteria (MLE_DENSITY_DIFF). Similar for Bodner_use_MLD_003, which should be Bodner_use_MLD.

I suggest we remove this. call to avoid confusion. (#328)

@alperaltuntas
Copy link
Member Author

@gustavo-marques the newly pushed commit should address your comments but let me know otherwise. Note that I renamed the subroutine calculate_mld_003 as detect_mld and the parameter BODNER_USE_MLD_003 as BODNER_DETECT_MLD.

@gustavo-marques
Copy link
Collaborator

Thank you! The last commit addresses all my comments. I approve this PR.

@gustavo-marques gustavo-marques self-requested a review January 3, 2025 13:53
@alperaltuntas alperaltuntas marked this pull request as ready for review January 7, 2025 17:33
@alperaltuntas alperaltuntas merged commit bd33548 into NCAR:dev/ncar Jan 7, 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.

Use MLD_003 in mixedlayer_restrat_Bodner
2 participants