-
Notifications
You must be signed in to change notification settings - Fork 664
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
Conversation
@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! |
The Jenkins test results:
|
@@ -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 |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
phys/module_cu_ntiedtke.F
Outdated
ztau = max(ztmst,ztau) | ||
ztau = max(360.,ztau) | ||
if(ntiedtke_dx_opt.eq.1) then | ||
ztau = min(43200.,ztau) | ||
else | ||
ztau = min(10800.,ztau) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
phys/module_cu_ntiedtke.F
Outdated
!-------------------------------- | ||
!* 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.)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
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.
!-------------------------------- | ||
!* 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
The calculated value isn't the same at 15 km and then it increases again
slowly after that.
I also find 15/dx matches your function very closely from 3-15 km,
and would have been much simpler.
…On Thu, Jan 12, 2023 at 7:40 PM weiwangncar ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In phys/module_cu_ntiedtke.F
<#1806 (comment)>:
> @@ -585,6 +590,18 @@ subroutine tiecnvn(pu,pv,pt,pqv,pqc,pqi,pqvf,ptf,poz,pzz,pomg, &
integer i,j,k,lq,km,km1
real dt,ztpp1
real zew,zqs,zcor
+ real scale_fac(lq), dxref
+!
+! set scale-dependency factor when dx is < 15 km
+!
+ dxref = 15000.
+ do j=1,lq
+ 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)
@dudhia <https://github.com/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).
[image: scale1]
<https://user-images.githubusercontent.com/12705680/212224032-4a71232b-6883-4f24-99b1-cfe85b4300ef.png>
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.
[image: scale2]
<https://user-images.githubusercontent.com/12705680/212224436-c8832660-d5b9-4b9e-90b3-626f035cfd69.png>
—
Reply to this email directly, view it on GitHub
<#1806 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIZ77FHQT5X7QKJ475INHTWSC6CVANCNFSM6AAAAAATXYLFXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this 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
@ChunxiZhang-NOAA Can you approve this PR again? Thanks. |
@smileMchen Can you help Chunxi to approve this PR? Somehow his approval is not registered. Thanks! |
@ChunxiZhang-NOAA |
…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.
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:
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.