a collection of WRFDA fixes related to ensdim_alpha use cases#1603
Merged
jamiebresch merged 4 commits intowrf-model:developfrom Dec 18, 2021
Merged
Conversation
The bug was introduced when trying to fix a bug for 4D-EnVar (commit wrf-model@b449e865).
Allocate be%cv_mz when use_background_errors=false to avoid memory segmentation fault. Also skip updating analysis and writing out wrfvar_output for offline varbc.
Contributor
Author
|
Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 8cb7a42, requested by: jamiebresch for PR: https://github.com/scala-computing/WRF/pull/1603. For any query please send e-mail to David Gill. |
Contributor
|
Will look into this early this afternoon. |
liujake
approved these changes
Dec 17, 2021
Contributor
liujake
left a comment
There was a problem hiding this comment.
Looks good. WRFDA regression tests passed.
Contributor
|
@davegill I approved 4 PRs by Jamie. You may give another approval when you have a chance. |
davegill
approved these changes
Dec 17, 2021
vlakshmanan-scala
pushed a commit
to scala-computing/WRF
that referenced
this pull request
Apr 4, 2024
…del#1603) TYPE: bug fix KEYWORDS: WRFDA, ensdim_alpha SOURCE: Jamie Bresch and Craig Schwartz (NCAR), Yi-Chuan Lo (Central Weather Bureau, Taiwan) DESCRIPTION OF CHANGES: The PR includes multiple bug fixes that are somewhat intertwined and related to the use of ensembles under not-usually-used scenarios. The root cause of the various problems (reported by Craig Schwartz and Yi-Chuan Lo) is the inclusion of alpha control variable in the ill-designed `be` data structure. The list of fixes: 1. fix minimization for precondition_cg=true (default is false) and orthonorm_gradient=true (default is false) when ensdim_alpha>0. The fix also helps with offline varbc (related to unallocated be%cv_mz when use_background_errors=false). 2. fix for 3DEns-FGAT (num_fgat_time>0 and ensdim_alpha>0 and je_factor=1.0). The bug was introduced when trying to fix a bug for 4D-EnVar (commit wrf-model@b449e865). 3. fix offline varbc when use_background_errors=false (commit wrf-model@d69d7bb breaks this capability) by still allocating be%cv_mz when use_background_errors=false to avoid memory segmentation fault. A bonus fix is to skip updating analysis and writing out wrfvar_output for offline varbc (VARBC.out is the only meaningful output) to save computing resources. 4. skip reading be.dat when ensdim_alpha>0 and je_factor=1.0 (i.e. full ensemble mode) to avoid the hassle of providing a climatology be.dat that is not actually used in assimilation. LIST OF MODIFIED FILES: M var/da/da_main/da_solve.inc M var/da/da_minimisation/da_calculate_gradj.inc M var/da/da_minimisation/da_calculate_j.inc M var/da/da_minimisation/da_minimise_cg.inc M var/da/da_minimisation/da_transform_vtod_wpec.inc M var/da/da_minimisation/da_transform_vtod_wpec_adj.inc M var/da/da_minimisation/da_transform_vtoy.inc M var/da/da_minimisation/da_transform_vtoy_adj.inc M var/da/da_setup_structures/da_setup_be_regional.inc M var/da/da_vtox_transforms/da_transform_vpatox.inc M var/da/da_vtox_transforms/da_transform_vpatox_adj.inc M var/da/da_vtox_transforms/da_transform_vptox.inc M var/da/da_vtox_transforms/da_transform_vptox_adj.inc M var/da/da_vtox_transforms/da_transform_vtox.inc M var/da/da_vtox_transforms/da_transform_vtox_adj.inc M var/da/da_vtox_transforms/da_vtox_transforms.f90 TESTS CONDUCTED: 1. the fixed code (implemented in different versions of WRFDA) has been used extensively in different applications 2. WRFDA regression tests (done by @liujake) passed 2. Jenkins tests all passed RELEASE NOTE: WRFDA has been fixed and enhanced for applications related to offline varbc (use_background_errors=false), 3DEns-FGAT (num_fgat_time>0 and ensdim_alpha>0 and je_factor=1.0), precondition_cg=true and orthonorm_gradient=true when ensdim_alpha>0, full-ensemble mode (ensdim_alpha>0 and je_factor=1.0).
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: bug fix
KEYWORDS: WRFDA, ensdim_alpha
SOURCE: Jamie Bresch and Craig Schwartz (NCAR), Yi-Chuan Lo (Central Weather Bureau, Taiwan)
DESCRIPTION OF CHANGES:
The PR includes multiple bug fixes that are somewhat intertwined and related to the use of ensembles under not-usually-used scenarios.
The root cause of the various problems (reported by Craig Schwartz and Yi-Chuan Lo) is the inclusion of alpha control variable in the ill-designed
bedata structure.The list of fixes:
LIST OF MODIFIED FILES:
M var/da/da_main/da_solve.inc
M var/da/da_minimisation/da_calculate_gradj.inc
M var/da/da_minimisation/da_calculate_j.inc
M var/da/da_minimisation/da_minimise_cg.inc
M var/da/da_minimisation/da_transform_vtod_wpec.inc
M var/da/da_minimisation/da_transform_vtod_wpec_adj.inc
M var/da/da_minimisation/da_transform_vtoy.inc
M var/da/da_minimisation/da_transform_vtoy_adj.inc
M var/da/da_setup_structures/da_setup_be_regional.inc
M var/da/da_vtox_transforms/da_transform_vpatox.inc
M var/da/da_vtox_transforms/da_transform_vpatox_adj.inc
M var/da/da_vtox_transforms/da_transform_vptox.inc
M var/da/da_vtox_transforms/da_transform_vptox_adj.inc
M var/da/da_vtox_transforms/da_transform_vtox.inc
M var/da/da_vtox_transforms/da_transform_vtox_adj.inc
M var/da/da_vtox_transforms/da_vtox_transforms.f90
TESTS CONDUCTED:
RELEASE NOTE: WRFDA has been fixed and enhanced for applications related to offline varbc (use_background_errors=false), 3DEns-FGAT (num_fgat_time>0 and ensdim_alpha>0 and je_factor=1.0), precondition_cg=true and orthonorm_gradient=true when ensdim_alpha>0, full-ensemble mode (ensdim_alpha>0 and je_factor=1.0).