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

Add scale-aware to the new Tiedtke cu scheme as an option #1806

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

weiwangncar
Copy link
Collaborator

@weiwangncar weiwangncar commented Jan 11, 2023

Add scale-aware to the new Tiedtke scheme as an option

TYPE: new feature

KEYWORDS: new Tiedtke cu scheme, scale aware option

SOURCE: internal

DESCRIPTION OF CHANGES:
A scale-aware or grid-distance-dependent option is added to the new Tiedtke scheme. The code is based on the paper by Wang (2022), and can be turned on by using namelist option ntiedtke_dx_opt = 1. The option becomes active when grid sizes is less than 15 km.
Wang, W., 2022: Forecasting Convection with a “Scale-Aware” Tiedtke Cumulus Parameterization Scheme at Kilometer Scales. Wea. Forecasting, 37/8, 1491 - 1507, 10.1175/WAF-D-21-0179.1.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M dyn_em/module_first_rk_step_part1.F
M phys/module_cu_ntiedtke.F
M phys/module_cumulus_driver.F
M run/README.namelist

TESTS CONDUCTED:

  1. Do mods fix problem? How can that be demonstrated, and was that test conducted?
  2. The Jenkins tests have passed.

RELEASE NOTE: A scale-aware or grid-distance-dependent option is added to the new Tiedtke scheme. The code is based on the paper by Wang (2022), and can be turned on by using namelist option ntiedtke_dx_opt = 1. The option becomes active when grid sizes is less than 15 km.

@weiwangncar weiwangncar requested review from a team as code owners January 11, 2023 08:45
@weiwangncar
Copy link
Collaborator Author

@ChunxiZhang-NOAA Thanks for agreeing to add this code to the WRF repository. Can you please review this PR and state your approval or otherwise? Thanks!

@weiwangncar
Copy link
Collaborator Author

The Jenkins test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@@ -191,6 +192,7 @@ subroutine cu_ntiedtke( &
!-- dz8w dz between full levels (m)
!-- qfx upward moisture flux at the surface (kg/m^2/s)
!-- hfx upward heat flux at the surface (w/m^2)
!-- ntiedtke_dx_opt whether the schemem is scale-aware
Copy link
Contributor

@ChunxiZhang-NOAA ChunxiZhang-NOAA Jan 11, 2023

Choose a reason for hiding this comment

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

Would be great if the annotation could be something like "option (switch) for scheme scale-dependency"

Copy link
Collaborator

@dudhia dudhia Jan 11, 2023

Choose a reason for hiding this comment

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

I agree, the name could be better too

Copy link
Collaborator

Choose a reason for hiding this comment

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

...but I see NSAS has a similar name, so it may be OK

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did base this namelist name on nsas option. I was surprised that it didn't refer it as scale-aware.

ztau = max(ztmst,ztau)
ztau = max(360.,ztau)
if(ntiedtke_dx_opt.eq.1) then
ztau = min(43200.,ztau)
else
ztau = min(10800.,ztau)
Copy link
Contributor

Choose a reason for hiding this comment

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

indent here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed.

!--------------------------------
!* 1. specify parameters
!--------------------------------
zcons2=3./(g*ztmst)
zfacbuo = 0.5/(1.+0.5)
if(ntiedtke_dx_opt.eq.1) then
zprcdgw = cprcon*zrg/(scale_fac(jl)**(1./3.))
Copy link
Contributor

Choose a reason for hiding this comment

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

indent here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed.

Copy link
Contributor

@ChunxiZhang-NOAA ChunxiZhang-NOAA left a comment

Choose a reason for hiding this comment

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

Approved with some minor changes

if (dx(j).lt.dxref .and. ntiedtke_dx_opt.eq.1) then
scale_fac(j) = (1.+log(dxref/dx(j)))**3
else
scale_fac(j) = 1.+1.33e-5*dx(j)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this function is discontinuous at 15 km.

Copy link
Collaborator

Choose a reason for hiding this comment

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

also this function increases with dx > 15 km and decreases when < 15 km

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dudhia Here are two plots of the scale factors: The first has two lines one for each of the scale_fac equations (red is the new one).
scale1

The second one is an enlarged one for the lower values of scale_fac, so that you can see the two functions when it crosses 15 km. I would argue that the continuity isn't bad. The original function does increases with DX, but it changes only very slightly with DX.

scale2

!--------------------------------
!* 1. specify parameters
!--------------------------------
zcons2=3./(g*ztmst)
zfacbuo = 0.5/(1.+0.5)
if(ntiedtke_dx_opt.eq.1) then
zprcdgw = cprcon*zrg/(scale_fac(jl)**(1./3.))
else
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is scale_fac defined as the cube of something and then used as the cube root?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see now it is used in other places.

Copy link
Collaborator

Choose a reason for hiding this comment

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

also in the paper I think it says square root?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dudhia Thanks for pointing it out. That is an error in the paper. It is the cubic root that has been used in the code.

@dudhia
Copy link
Collaborator

dudhia commented Jan 13, 2023 via email

Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

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

Still a bit iffy about the slight discontinuity of function at 15 km - can address later

@weiwangncar
Copy link
Collaborator Author

@ChunxiZhang-NOAA Can you approve this PR again? Thanks.

@weiwangncar
Copy link
Collaborator Author

@smileMchen Can you help Chunxi to approve this PR? Somehow his approval is not registered. Thanks!

@kkeene44
Copy link
Collaborator

@ChunxiZhang-NOAA
I'll approve this PR.

@weiwangncar weiwangncar merged commit 7639166 into wrf-model:develop Jan 24, 2023
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
…1806)

Add scale-aware to the new Tiedtke scheme as an option

TYPE: new feature

KEYWORDS: new Tiedtke cu scheme, scale aware option

SOURCE: internal

DESCRIPTION OF CHANGES:
A scale-aware or grid-distance-dependent option is added to the new Tiedtke scheme. The code is based on the paper by Wang (2022), and can be turned on by using namelist option ntiedtke_dx_opt = 1. The option becomes active when grid sizes is less than 15 km.
Wang, W., 2022: Forecasting Convection with a “Scale-Aware” Tiedtke Cumulus Parameterization Scheme at Kilometer Scales. _Wea. Forecasting_, 37/8, 1491 - 1507, 10.1175/WAF-D-21-0179.1.

LIST OF MODIFIED FILES: 
M       Registry/Registry.EM_COMMON
M       dyn_em/module_first_rk_step_part1.F
M       phys/module_cu_ntiedtke.F
M       phys/module_cumulus_driver.F
M       run/README.namelist

TESTS CONDUCTED: 
1. Do mods fix problem? How can that be demonstrated, and was that test conducted?
2. The Jenkins tests have passed.

RELEASE NOTE: A scale-aware or grid-distance-dependent option is added to the new Tiedtke scheme. The code is based on the paper by Wang (2022), and can be turned on by using namelist option ntiedtke_dx_opt = 1. The option becomes active when grid sizes is less than 15 km.
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.

None yet

4 participants