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

PBL + LES restrictions #1596

Merged
merged 7 commits into from
Dec 14, 2021
Merged

PBL + LES restrictions #1596

merged 7 commits into from
Dec 14, 2021

Conversation

davegill
Copy link
Contributor

TYPE: bug fix

KEYWORDS: PBL, LES

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
A few PBL schemes include scalar components that are advected. These fields are
required on all domains. With an LES option on a finer domain, that grid does not
have the additional scalar component, which causes a segfault when trying to
access that field.

Solution:
Restrict what PBL schemes are eligible for use with the LES (no PBL) option.

ISSUE:
Fixes #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.
 &physics
 bl_pbl_physics                      =  5,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  5
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
 &physics
 bl_pbl_physics                      =  6,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  6
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
 &physics
 bl_pbl_physics                      = 16,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  16
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
  1. Hopefully we say All jenkins tests are a 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, LES

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
A few PBL schemes include scalar components that are advected. These fields are
required on all domains. With an LES option on a finer domain, that grid does not
have the additional scalar component, which causes a segfault when trying to
access that field.

Solution:
Restrict what PBL schemes are eligible for use with the LES (no PBL) option.

ISSUE:
Fixes wrf-model#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.
```
 &physics
 bl_pbl_physics                      =  5,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  5
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
```
```
 &physics
 bl_pbl_physics                      =  6,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  6
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
```
```
 &physics
 bl_pbl_physics                      = 16,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  16
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
```
2. Hopefully we say All jenkins tests are a 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.
@davegill
Copy link
Contributor Author

davegill commented Dec 10, 2021

@weiwangncar @dudhia
This PR relies on the assumption that nothing bad happens when we have different fields on different domains. That is not always a great assumption.

@davegill
Copy link
Contributor Author

@weiwangncar @dudhia
Folks,
This simple mod to check_a_mundo makes sure that only PBL schemes that are NOT (MYNN or EEPS) on the coarser grids are permitted to be used with no PBL on a finer domains. This is ready for review for v4.3.2 inclusion.

weiwangncar
weiwangncar previously approved these changes Dec 10, 2021
@davegill
Copy link
Contributor Author

@dudhia
Jimy,
What do you think about this PR? Can we code it :shipit:

Registry/Registry.EM_COMMON Outdated Show resolved Hide resolved
@dudhia
Copy link
Collaborator

dudhia commented Dec 13, 2021 via email

@weiwangncar
Copy link
Collaborator

@davegill @dudhia I'm ok with the decision. But I just wanted to say that sometimes a user could turn off PBL for a test, but it doesn't mean LES is used.

@davegill
Copy link
Contributor Author

@weiwangncar @dudhia
Wei and Jimy,
I put in some small tweaks (getting rid of the name NOPBLSCHEME, edits to the error message, etc). Because of that, you both need to review again!
Almost there ...

@davegill davegill merged commit 712e9cc into wrf-model:release-v4.3.2 Dec 14, 2021
@twjuliano
Copy link
Contributor

twjuliano commented Dec 22, 2021

@davegill @weiwangncar @dudhia Just a heads up... I am running some single domain simulations using MYNN and am unintentionally catching this error. I was able to fix the issue by adding exists = .FALSE. before looping through domains. Thanks.

vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix

KEYWORDS: PBL, LES

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
A few PBL schemes include scalar components that are advected. These fields are
required on all domains. With an LES option on a finer domain, that grid does not
have the additional scalar component, which causes a segfault when trying to
access that field.

Solution:
Restrict what PBL schemes are eligible for use with the LES (no PBL) option.

ISSUE:
Fixes wrf-model#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.
```
 &physics
 bl_pbl_physics                      =  5,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  5
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
```
```
 &physics
 bl_pbl_physics                      =  6,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  6
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
```
```
 &physics
 bl_pbl_physics                      = 16,     0,

--- ERROR: LES PBL on fine grid does not work with CG PBL option  16
           Choose a CG PBL option without any scalar components
           Fix bl_pbl_physics in namelist.input
           Alternatively, remove all of the packaged variables from the CG PBL selection
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    2523
NOTE:       1 namelist settings are wrong. Please check and reset these options
```
2. All jenkins tests are a 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.
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.

4 participants