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

Reduce computational patch size for intermediate domain for vertical nesting #37

Merged
merged 2 commits into from
Nov 14, 2016
Merged

Reduce computational patch size for intermediate domain for vertical nesting #37

merged 2 commits into from
Nov 14, 2016

Conversation

davegill
Copy link
Contributor

@davegill davegill commented Nov 9, 2016

TYPE: bug fix

KEYWORDS: vertical refinement, intermediate domain, patch

SOURCE: internal

DESCRIPTION OF CHANGES:
The vertical refinement option rebalances the fine grid to
account for the horizontal and vertical interpolation. The
intermediate domain value are coupled with total column pressure.
When the allocated (but initialized to zero) portions of the patch
are part of the computations, floating point errors show up
when using the FPE traps. These values are never used, but the
uninitialized values throw FPEs when we are doing division.

The solution is to require that the computations be entirely
enclosed with the more restrictive of either the patch or domain dimensions
(for the intermediate domain, "patch" and "domain" sizes are not
as intuitive as on a parent or child domain).

LIST OF MODIFIED FILES:
external/RSL_LITE/module_dm.F

TESTS CONDUCTED:

  1. With the mods, the vertical refinement code successfully runs through several time
    steps with the FPE flags activated, and the code was not able to
    do so without these mods.
  2. WTF passes (including the several dozen vertical refinement tests)
  3. The results (with the restrictive index bounds) are bit-for-bit identical with the master results (the
    restricted index computations are INDEED giving the same results). This
    is a comparison of the 1798 regression tests (with and without vertical
    nesting).

I WILL REMOVE THE FOLLOWING IN THE FINAL COMMIT:

  1. As an FYI, HWRF test 3 is not reproducible. It should be fixed XOR removed.
  2. I will squash the fix for the incorrect indexing in the first of two commits.
  3. This bug fix is yet another requirement to get the hybrid coordinate ready to go

…esting

TYPE: bug fix

KEYWORDS: vertical refinement, intermediate domain, patch

SOURCE: internal

DESCRIPTION OF CHANGES: One or more paragraphs describing problem, solution, and required changes.
The vertical refinement option rebalances the fine grid to
account for the horizontal and vertical interpolation.  The
intermediate domain value are coupled with total column pressure.
When the allocated but not initialized portions of the patch
are part of the computations, floating point errors show up
when using the FPE traps.

The solution is to restrict the patch dimensions to be entirely
enclosed with the domain dimensions (for the intermediate
domain).

LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list)
external/RSL_LITE/module_dm.F

TESTS CONDUCTED: Explicitly state if a WTF and or other tests were run, or are pending. For more complicated changes please be explicit!
1) With the mods, the code successfully runs through several time
steps with the FPE flags activated.
2) TO DO: standard WTF
3) TO DO: compare results from modified version to pristine master,
they should be the same
Copy link
Contributor

@mkavulich mkavulich left a comment

Choose a reason for hiding this comment

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

Approved by wrf-dev committee

@davegill davegill merged commit 412c880 into wrf-model:master Nov 14, 2016
@davegill davegill deleted the VERT_REFINE_FIX branch November 14, 2016 19:43
dmey pushed a commit to TEB-model/wrf-teb that referenced this pull request Mar 31, 2020
twjuliano pushed a commit to twjuliano/WRF that referenced this pull request Jun 9, 2022
Code compiled and an old case ran on my end. Thanks for finding the pi change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants