Skip to content

Fixing the problem that km_opt=5 breaks km_opt=2 and cleaning codes#1026

Merged
davegill merged 4 commits intowrf-model:developfrom
zhangxsms:3dtke
Jan 28, 2020
Merged

Fixing the problem that km_opt=5 breaks km_opt=2 and cleaning codes#1026
davegill merged 4 commits intowrf-model:developfrom
zhangxsms:3dtke

Conversation

@zhangxsms
Copy link
Contributor

@zhangxsms zhangxsms commented Dec 1, 2019

TYPE: bug fix

KEYWORDS: SMS-3DTKE, package

SOURCE: Xu Zhang (Shanghai Typhoon Institute)

DESCRIPTION OF CHANGES:

  1. Redefined the variable l_scale using a new name l_diss, which does not conflict with
    variables used in km_opt=2.
  2. Packaged seven variables used in the km_opt=5.
  3. Deleted most diagnostic variables such as u_h_tend, v_h_tend, w_h_tend that are
    seldom used by most users, and cleaned up the related codes. Only seven state variables used
    in km_opt=5 are left.

LIST OF MODIFIED FILES:
Registry/Registry.EM_COMMON
Registry/Registry.NMM
dyn_em/module_diffusion_em.F
dyn_em/module_first_rk_step_part2.F
dyn_em/solve_em.F
share/module_check_a_mundo.F

TESTS CONDUCTED:

  • em_fire test with km_opt=2.
  • em_les tests with km_opt=2 and km_opt=5.
  • em_tropical_cyclone with km_opt=2, km_opt=5, and some PBL schemes.

@davegill
Copy link
Contributor

davegill commented Dec 4, 2019

Generic comment to reviewers @weiwangncar @dudhia @smileMchen @kkeene44
Even though this is a bug fix, this is a bug-fix that correctly belongs on the develop branch. This fixes a problem that is only on the develop branch right now.

@davegill
Copy link
Contributor

@zhangxsms @dudhia @weiwangncar
With km_opt=5, I am trying an idealized case which has sf_sfclay_surface = 0, 0, 0,
I am getting this error:

--- ERROR: SMS-3DTKE scheme works with sf_sfclay_physics = 1,5,91
  --- ERROR: Fix km_opt or sf_sfclay_physics in namelist.input.

Is it mandatory that a surface layer scheme be used with km_opt=5? If not, the test in check_a_mundo needs to be corrected.

@zhangxsms
Copy link
Contributor Author

@zhangxsms @dudhia @weiwangncar
With km_opt=5, I am trying an idealized case which has sf_sfclay_surface = 0, 0, 0,
I am getting this error:

--- ERROR: SMS-3DTKE scheme works with sf_sfclay_physics = 1,5,91
  --- ERROR: Fix km_opt or sf_sfclay_physics in namelist.input.

Is it mandatory that a surface layer scheme be used with km_opt=5? If not, the test in check_a_mundo needs to be corrected.

It is not mandatory, km_opt=5 can be used without surface layer (sf_sfclay_physics = 0).

The existing logic in check_a_mundo precluded the use of
"no surface layer scheme" with km_opt=5. To add the "none"
option in, I needed to define "none" in both the ARW and
NMM Registries.

Changes to be committed:
modified:   Registry/Registry.EM_COMMON
modified:   Registry/Registry.NMM
modified:   share/module_check_a_mundo.F
@zhangxsms zhangxsms requested review from a team as code owners January 24, 2020 23:15
@davegill
Copy link
Contributor

@zhangxsms
The last commit should address the ability to run with NO surface layer scheme.

@davegill
Copy link
Contributor

@weiwangncar @dudhia @llpcarson @kkeene44
Folks,
I need Wei or Jimy to approve as this is physics related, and I need Laurie to approve as I added a line in the NMM registry (for a check_a_mundo mod).

Kelly is there because she has superpowers and can approve anything at all, but let's do this by the book.

@davegill davegill merged commit dd0c209 into wrf-model:develop Jan 28, 2020
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.
@zhangxsms zhangxsms deleted the 3dtke branch July 26, 2020 02:34
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.

5 participants