Add vertical nesting checks: no hybrid vert coord, no feedback#1154
Merged
davegill merged 2 commits intowrf-model:release-v4.2from Apr 2, 2020
Merged
Add vertical nesting checks: no hybrid vert coord, no feedback#1154davegill merged 2 commits intowrf-model:release-v4.2from
davegill merged 2 commits intowrf-model:release-v4.2from
Conversation
TYPE: enhancement KEYWORDS: vertial nest, hybrid_opt, feedback SOURCE: internal DESCRIPTION OF CHANGES: Problem: If a user requests a vertical refinement for a nest, there are a couple of capabilities that need to be shut off. Either will cause the model to eventually die and it is really hard to find the problem. Solution: If a users asks for a vertical refinement on the nest, make sure that the terrain following coordinate is used (`hybrid_opt=0`), and that the feedback option is turned off (`feedback=0`). LIST OF MODIFIED FILES: modified: share/module_check_a_mundo.F TESTS CONDUCTED: 1. Jenkins is OK (hopefully) 2. Incorrectly turning on `hybrid_opt=2` or `feedback=1` is now safely trapped. ``` Domain # 1: dx = 30000.000 m Domain # 2: dx = 10000.000 m --- ERROR: vert_refine_method=2 only works with hybrid_opt = 0 --- ERROR: vert_refine_method=2 only works with feedback = 0 -------------- FATAL CALLED --------------- FATAL CALLED FROM FILE: <stdin> LINE: 2293 NOTE: 2 namelist settings are wrong. Please check and reset these options ------------------------------------------- ```
Contributor
Author
|
@kkeene44 |
kkeene44
approved these changes
Apr 2, 2020
davegill
pushed a commit
that referenced
this pull request
Mar 22, 2021
) TYPE: bug fix KEYWORDS: vertical nesting, hybrid vertical coordinate, vert_refine_method, hybrid_opt SOURCE: Robert Arthur and Katie Lundquist (LLNL) DESCRIPTION OF CHANGES: Problem: When vertical nesting is used with the hybrid vertical coordinate option (hybrid_opt=2), large errors occur in the vertically-refined domain. Solution: An incorrect calculation of pb (base pressure) was fixed in subroutine force_domain_em_part2 (module_dm.F). The pb calculation was changed to match similar code in start_em. This fix is within a block of code that is only called if vert_refine_method .ne. 0, in order to rebalance on the "intermediate" nested grid. The error was likely a result of the switch to the new hybrid coordinate definition, which was not updated correctly in this particular subroutine. The check-a-mundo preventing vertical nesting from being used with the hybrid coordinate (see #1154) has also been removed. This PR is related to #901, which addressed vertical nesting with the hybrid coordinate (but did not fully fix the issue), as well as #1408, which addressed vertical nesting with use_theta_m=1. LIST OF MODIFIED FILES: external/RSL_LITE/module_dm.F share/module_check_a_mundo.F TESTS CONDUCTED: 1. The tests conducted here are similar to those in #1408. A 4-domain nested case was completed with vertical refinement on d04. All domains were initialized from a wrfinput file and eta levels were not provided. Pertinent namelist options are: ``` input_from_file = .true., .true., .true., .true., e_vert = 45, 45, 45, 55, vert_refine_method = 0, 0, 0, 2, rebalance = 1, hybrid_opt = 0 or 2, depending on the case use_theta_m = 0 ``` Results are summarized in the plot below, which shows U at the first grid point above the surface on d04 at various output times.  With the original code, vertical nesting works with hybrid_opt=0, but not hybrid_opt=2. With the updated code, results look reasonable for hybrid_opt=2 and are roughly the same as for hybrid_opt=0. Similar patterns are also seen for other variables, such as V and MU, although they are not shown here. 2. Several similar tests were also conducted, as above but with * d04 initialized via interpolation from d03 during runtime, rather than from wrfinput_d04 * eta levels specified for each domain in the namelist * use_theta_m=1 These tests provided qualitatively similar results, showing that the fix works for a range of possible setups. 3. Finally, the tests above were completed with hybrid_opt=0, but using the updated code. These showed bit-for-bit identical results (using diffwrf) to the same cases using the original code, confirming that previous vertical nesting functionality with hybrid_opt=0 is maintained. This was done for both use_theta_m options, 0 and 1. 4. Jenkins testing is OK RELEASE NOTE: Vertical nesting now works with the hybrid vertical coordinate.
vlakshmanan-scala
pushed a commit
to scala-computing/WRF
that referenced
this pull request
Apr 4, 2024
…f-model#1435) TYPE: bug fix KEYWORDS: vertical nesting, hybrid vertical coordinate, vert_refine_method, hybrid_opt SOURCE: Robert Arthur and Katie Lundquist (LLNL) DESCRIPTION OF CHANGES: Problem: When vertical nesting is used with the hybrid vertical coordinate option (hybrid_opt=2), large errors occur in the vertically-refined domain. Solution: An incorrect calculation of pb (base pressure) was fixed in subroutine force_domain_em_part2 (module_dm.F). The pb calculation was changed to match similar code in start_em. This fix is within a block of code that is only called if vert_refine_method .ne. 0, in order to rebalance on the "intermediate" nested grid. The error was likely a result of the switch to the new hybrid coordinate definition, which was not updated correctly in this particular subroutine. The check-a-mundo preventing vertical nesting from being used with the hybrid coordinate (see wrf-model#1154) has also been removed. This PR is related to wrf-model#901, which addressed vertical nesting with the hybrid coordinate (but did not fully fix the issue), as well as wrf-model#1408, which addressed vertical nesting with use_theta_m=1. LIST OF MODIFIED FILES: external/RSL_LITE/module_dm.F share/module_check_a_mundo.F TESTS CONDUCTED: 1. The tests conducted here are similar to those in wrf-model#1408. A 4-domain nested case was completed with vertical refinement on d04. All domains were initialized from a wrfinput file and eta levels were not provided. Pertinent namelist options are: ``` input_from_file = .true., .true., .true., .true., e_vert = 45, 45, 45, 55, vert_refine_method = 0, 0, 0, 2, rebalance = 1, hybrid_opt = 0 or 2, depending on the case use_theta_m = 0 ``` Results are summarized in the plot below, which shows U at the first grid point above the surface on d04 at various output times.  With the original code, vertical nesting works with hybrid_opt=0, but not hybrid_opt=2. With the updated code, results look reasonable for hybrid_opt=2 and are roughly the same as for hybrid_opt=0. Similar patterns are also seen for other variables, such as V and MU, although they are not shown here. 2. Several similar tests were also conducted, as above but with * d04 initialized via interpolation from d03 during runtime, rather than from wrfinput_d04 * eta levels specified for each domain in the namelist * use_theta_m=1 These tests provided qualitatively similar results, showing that the fix works for a range of possible setups. 3. Finally, the tests above were completed with hybrid_opt=0, but using the updated code. These showed bit-for-bit identical results (using diffwrf) to the same cases using the original code, confirming that previous vertical nesting functionality with hybrid_opt=0 is maintained. This was done for both use_theta_m options, 0 and 1. 4. Jenkins testing is OK RELEASE NOTE: Vertical nesting now works with the hybrid vertical coordinate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TYPE: enhancement
KEYWORDS: vertial nest, hybrid_opt, feedback
SOURCE: internal
DESCRIPTION OF CHANGES:
Problem:
If a user requests a vertical refinement for a nest, there are a couple
of capabilities that need to be shut off. Either will cause the model
to eventually die, and they are really hard to otherwise find.
Solution:
If a users asks for a vertical refinement on the nest, make sure that the
terrain following coordinate is used (
hybrid_opt=0), and that thefeedback option is turned off (
feedback=0).LIST OF MODIFIED FILES:
modified: share/module_check_a_mundo.F
TESTS CONDUCTED:
hybrid_opt=2orfeedback=1is now safely trapped.