Add MYNN surface layer scheme#340
Conversation
The workflow will fail when a fork uses a different repository name.
`hfx` is simply the sensible heat flux, not the sum of latent heat flux and sensible heat flux.
... for fixing compilation errors with MYNN surface layer scheme.
nusbaume
left a comment
There was a problem hiding this comment.
Thanks for bringing in the first MYNN scheme @kuanchihwang! I do have some change requests, mostly related to the location of certain subroutines, the conversion of hard-coded variables to namelist variables, and a few other general requests. Of course if you have any questions or concerns with my requests just let me know. Thanks again!
However, this standard name change deviates from the ESM Standard Name Library. In the ESM Standard Name Library, "ratio_of_height_to_monin_obukhov_length" is defined. However, here "ratio_of_height_at_surface_adjacent_layer_to_monin_obukhov_length" is used.
…ters * To conform to the existing naming convention in state converters, `compute_ ...` has been renamed to `calc_ ...`. * Fix incorrect units in a code comment in state converters.
schemes/mmm/mmm_physics_compat.F90
Outdated
| ! This threshold is hardcoded to the same value as in MMM physics. | ||
| ! It is named `xice_threshold` there. | ||
| real(kind_phys), parameter :: sea_ice_area_fraction_threshold = 0.02_kind_phys |
There was a problem hiding this comment.
Since the comment indicates this is hardcoded to match the value in MMM physics, is it possible to somehow get xice_threshold into this routine? This would eliminate the possibility of it being changed in one location or not the other. Alternatively, could a check be performed somewhere during initialization to make sure they match? Perhaps a check_mmm_constanst routine whose scope is such that it has access to these routines as well as the MMM library ones and performs a one-time check.
There was a problem hiding this comment.
I moved the option definitions to the mmm_physics_compat_init subroutine in fe2728d. Some misleading code comments were also revised. All options are now set in one central place.
To add more clarity, these options are hardcoded in the physics driver of standalone MPAS (e.g., [1][2]). Therefore, it is not possible to reference them (either through use statements or procedure calls) from here.
Unit tests were adjusted accordingly in 1eac9d7.
There was a problem hiding this comment.
@kuanchihwang - I agree that this can be postponed until a future date when namelists are introduced.
The definitions of `isfflx`, `isftcflx`, `iz0tlnd`, `spp_pbl`, and `xice_threshold` have been moved to the `mmm_physics_compat_init` subroutine. This avoids duplicate definitions in multiple places. Also adjust misleading code comments.
nusbaume
left a comment
There was a problem hiding this comment.
Thanks for resolving my concerns @kuanchihwang! I had one last unit update that I missed in the first review, but otherwise everything else looks good to me.
schemes/mmm/mmm_physics_compat.meta
Outdated
| intent = out | ||
| [ xice_threshold ] | ||
| standard_name = sea_ice_area_fraction_threshold_for_mmm_scheme | ||
| units = 1 |
There was a problem hiding this comment.
Apologies for missing this in the first review, but I believe that the units for xice_threshold should be fraction.
Originator(s):
kuanchihwang
Descriptions (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
This PR adds the Mellor-Yamada-Nakanishi-Niino (MYNN) surface layer scheme to the experimental convection-permitting physics suite.
List all namelist files that were added or changed:
None
List all files eliminated and why:
None
List all files added and what they do:
List all existing files that have been modified, and describe the changes:
List all automated tests that failed, as well as an explanation for why they were not fixed:
None
Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?
Answer-changing for the convection-permitting physics suite due to a newly added physics scheme. Nothing is changed for the rest.
If yes to the above question, describe how this code was validated with the new/modified features:
The convection-permitting physics suite is considered an experimental feature. There is no baseline available to validate against because it has never been implemented in CAM-SIMA as well as CAM before.