Skip to content

Add missing "IF km_opt==5" tests for diag computations#1013

Merged
davegill merged 1 commit intowrf-model:developfrom
davegill:sms3dtke_km_opt=5_if_tests
Nov 18, 2019
Merged

Add missing "IF km_opt==5" tests for diag computations#1013
davegill merged 1 commit intowrf-model:developfrom
davegill:sms3dtke_km_opt=5_if_tests

Conversation

@davegill
Copy link
Contributor

@davegill davegill commented Nov 15, 2019

TYPE: bug fix

KEYWORDS: sms3dtke, km_opt==5

SOURCE: Internal

DESCRIPTION OF CHANGES:
Each location where the optional diagnostics for km_opt==5 are computed,
instead of only using a local IF test, now a combination of the same local
IF test (T/F do the computation) is used in conjunction with and a test
for if the diagnostic is permitted (is km_opt==5).

The km_opt==5 scheme originally had (and hopefully, will eventually again have)
specified arrays via the package capability in the Registry. Those fields need to be
protected from accidental use when km_opt==2.

LIST OF MODIFIED FILES:
modified: dyn_em/module_diffusion_em.F

TESTS CONDUCTED:

  • Without mods, there are attempts to compute km_opt==5 diags when km_opt==2.
  • With mods, no attempts to compute km_opt==5 diags when km_opt==2.

TYPE: choose one of [bug fix, enhancement, new feature, feature removed, no impact, text only]

KEYWORDS: 5 to 10 words related to commit, separated by commas

SOURCE: Either "developer's name (affiliation)" .XOR. "internal" for a WRF Dev committee member

DESCRIPTION OF CHANGES:

Each location where the optional diagnostics for km_opt==5 are computed,
instead of only using a local IF test, now a combination of the same local
IF test (T/F do the computation) is used in conjunction with and a test
for if the diagnostic is permitted (is km_opt==5).

LIST OF MODIFIED FILES:
modified:   dyn_em/module_diffusion_em.F

TESTS CONDUCTED:
 - [x] Without mods, there are attempts to compute km_opt==5 diags when km_opt==2.
 - [x] With mods, no attempts to compute km_opt==5 diags when km_opt==2.
@dudhia
Copy link
Collaborator

dudhia commented Nov 15, 2019 via email

@davegill
Copy link
Contributor Author

@dudhia @smileMchen @weiwangncar @janmandel
Jimy,
With the top of the repository on the develop branch, every ideal ideal job will fail that uses km_opt=2. I started removing individual variables in the Registry.EM_COMMON file package for sms3dtke, to see if I could find "the one" problematic variable. When that was not successful, I tried looking through the code to see if there were obvious missing IF tests. Both of these activities became too much of a time drain.

The only solution for a working develop branch is to unpackage everything that is new for the sms3dtke option (more than a dozen new arrays) and keep that memory and those fields allocated. The original developer needs to address this problem.

@dudhia
Copy link
Collaborator

dudhia commented Nov 15, 2019 via email

@weiwangncar
Copy link
Collaborator

@davegill This makes sense too.

@davegill davegill merged commit 94e5ed9 into wrf-model:develop Nov 18, 2019
@dudhia
Copy link
Collaborator

dudhia commented Nov 18, 2019 via email

liujake added a commit that referenced this pull request Feb 12, 2020
TYPE: bug fix

KEYWORDS: wrfplus, TL/AD code

SOURCE: internal

DESCRIPTION OF CHANGES:
Two recent WRF model code changes break the wrfplus compilation:
1. ESMF name change 
This modification allowed the CTSM development to use standard ESMF without conflicting 
with WRF _old_ ESMF library namespace.
Commit 8af5385, PR #1066 "Enabling WRF build with ESMF library"
2. module_diffusion_em_ad.F, 3d scale aware TKE (one of these, take your pick)
Commit d059afe, PR #972 "Add a scale-adaptive 3DTKE parameterization scheme as a subgrid mixing option
Commit 6d95883, PR #1012 "SMS3dTKE: Remove broken packaging for km_opt=5"
Commit 94e5ed9, PR #1013 "Add missing "IF km_opt==5" tests for diag computations"
Commit dd0c209, PR #1026 "Fixing the problem that km_opt=5 breaks km_opt=2 and cleaning codes"

LIST OF MODIFIED FILES: 
M       share/mediation_integrate.F
M       wrftladj/module_diffusion_em_ad.F

TESTS CONDUCTED: wrfplus code compiles now.
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