Skip to content

Restrict which CG PBLs may use FG LES PBL#1578

Closed
davegill wants to merge 3 commits intowrf-model:release-v4.3.2from
davegill:mynn
Closed

Restrict which CG PBLs may use FG LES PBL#1578
davegill wants to merge 3 commits intowrf-model:release-v4.3.2from
davegill:mynn

Conversation

@davegill
Copy link
Contributor

@davegill davegill commented Nov 5, 2021

TYPE: bug fix

KEYWORDS: PBL, LES

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
Only the YSU PBL scheme has no packaged variables. If a user wants to have any other PBL scheme on the CG,
and an LES PBL on the FG, the model will have memory corruption problems. This error is hard to detect.

Solution:

  1. The variables el_pbl and tke_pbl are added to the list of packaged variables for the LES PBL. While this
    scheme does not need them, this does not add any memory, and this permits both the MYJ and
    ShinHong PBL schemes to be used.
  2. A controlled stop is now in place when any incompatible PBL namelist options are selected.

ISSUES:
Partially addresses #1514

LIST OF MODIFIED FILES:
modified: Registry/Registry.EM_COMMON
modified: share/module_check_a_mundo.F

TESTS CONDUCTED:

  1. When an incompatible CG PBL and FG LES are selected, the code successfully stops.
--- ERROR: LES PBL on fine grid does not work with CG PBL option  5
--- ERROR: Only YSU(1), MYJPBL(2), and ShinHong(11) are acceptable options for LES PBL on the fine grid
--- ERROR: Fix bl_pbl_physics in namelist.input.
--- ERROR: Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2534
NOTE:       1 namelist settings are wrong. Please check and reset these options
-------------------------------------------
  1. Jenkins is all PASS.

RELEASE NOTE: A test was introduced to stop the incorrect combination of particular PBL schemes on coarser grids with the LES PBL option selected on a finer grid. Previously, this problem caused an inconsistent number of variables on the CG and FG, which caused segmentation faults when trying to do feedback or advection of unavailable fields.

TYPE: bug fix

KEYWORDS: PBL, MYNN, LES

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
The MYNN PBL schemes are not to be used on a coarse grid when the LES scheme is used on
a finer grid.

Solution:
A controlled stop is put in place when these namelist options are selected.

LIST OF MODIFIED FILES:
modified:   Registry/Registry.EM_COMMON
modified:   share/module_check_a_mundo.F

TESTS CONDUCTED:
1. When the MYNN and LES are selected, the code successfully stops.
2. Jenkins is all PASS.

RELEASE NOTE: A test was introduced to stop the combination of either of the MYNN PBL schemes on coarser grids with the LES PBL option selected on a finer grid.
@davegill davegill requested review from a team as code owners November 5, 2021 20:05
@davegill davegill changed the base branch from master to release-v4.3.2 November 5, 2021 20:06
@davegill
Copy link
Contributor Author

davegill commented Nov 5, 2021

Jenkins is OK

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 7b6f4290e9e8eb9b3d9ae17a58a2b4406d68de2a, requested by: davegill for PR: https://github.com/wrf-model/WRF/pull/1578. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           17
    Number of Builds       : 48           45
    Number of Simulations  : 160           155        0
    Number of Comparisons  : 101           100        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

kkeene44
kkeene44 previously approved these changes Nov 9, 2021
@dudhia
Copy link
Collaborator

dudhia commented Nov 10, 2021

This is a placeholder stop until a better fix is found. Issue #1514 has some workarounds and can be mentioned in the release note. The stop message could also recommend YSU PBL as a safe option with no packaged arrays. I am not sure if MYJ is safe as it has packaged arrays.

@dudhia
Copy link
Collaborator

dudhia commented Nov 10, 2021

adding el_pbl and tke_pbl to the les package would allow MYJ and shinhong to work with LES in nests (Shin-Hong has these as diagnostics).

Categorize all other CG PBL options as nonacceptable when a FG LES
PBL is requested

modified:   Registry/Registry.EM_COMMON
modified:   share/module_check_a_mundo.F
@davegill davegill changed the title Protect MYNN PBL from being used with LES PBL Restrict which CG PBLs may use FG LES PBL Nov 10, 2021
@davegill
Copy link
Contributor Author

Choosing #1596 "PBL + LES restrictions" as a temporary solution.

@davegill davegill closed this Dec 10, 2021
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.

3 participants