Skip to content

Implementation of MYNN-EDMF and MYNN-SFC submodules#1455

Open
joeolson42 wants to merge 11 commits into
MPAS-Dev:developfrom
joeolson42:mynnedmf_20260508
Open

Implementation of MYNN-EDMF and MYNN-SFC submodules#1455
joeolson42 wants to merge 11 commits into
MPAS-Dev:developfrom
joeolson42:mynnedmf_20260508

Conversation

@joeolson42
Copy link
Copy Markdown

This PR adds the official MYNN-EDMF and MYNN-SFC submodules to MPAS with via manage_externals. Some notes on the implementation are below:

  1. The submodules were added simultaneously due to the common package (bl_mynnedmf_in) used for both schemes (following the previous implementations).
  2. Two additional packages are added to control the allocation of 10 optional 3d output arrays and 5 tke budget arrays.
  3. a new cloudiness option is added to handle the processing of the MYNN-EDMF subgrid clouds analogous to radiation driver in WRF.
  4. The implementation was complicated by the earlier implementation of MYNN schemes, so renaming of key modules and subroutines was required to allow both submodules to work as alternatives to the other versions. The other schemes should still work but will hopefully be removed.

bl_mynn_cloudpdf = bl_mynn_cloudpdf , &
bl_mynn_mixlength = bl_mynn_mixlength , &
bl_mynn_closure = bl_mynn_closure , &
bl_mynn_stfunc = bl_mynn_stfunc , &
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When this PR branch is merged to the HEAD of the develop branch, I'm seeing a compilation failure with the GNU compilers:

mpas_atmphys_driver_pbl.F:1445:39:

 1445 |                   bl_mynn_stfunc     = bl_mynn_stfunc      ,                                              &
      |                                       1
Error: Keyword argument 'bl_mynn_stfunc' at (1) is not in the procedure; did you mean 'bl_mynn_output'?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

bizarre... I must not have done a "git add mpas_atmphys_driver_pbl.F" before the commit. That line is not in my code. Will update shortly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update. All looks good compilation-wise with the changes in 5a2cdc6.

bl_mynn_ess, &
bl_mynn_tkebudget, &
icloud_bl, &
spp_pbl
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Declaring icloud_bl and spp_pbl here as local variables overrides the variables of the same name imported from the mpas_atmphys_vars module. Since these local variables are pointers, and since they're not set by a call to mpas_pool_get_config when using config_pbl_scheme = 'bl_mynn', we'll get a segmentation fault (the apparent location of the segfault may depend on compiler).

One option to avoid this issues might be to choose different names for the local pointer variables icloud_bl and spp_pbl, and to use those different names only in MYNN-EDMF cases (leaving behavior with the MYNN scheme unchanged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants