-
Notifications
You must be signed in to change notification settings - Fork 118
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
Lightning Threat Indexes: pass w to model #243
Conversation
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.
The code change is to bring w field from dycore to physics. It looks good to me.
driver/fvGFS/atmosphere.F90
Outdated
@@ -2113,6 +2113,7 @@ subroutine atmos_phys_driver_statein (IPD_Data, Atm_block,flip_vc) | |||
IPD_Data(nb)%Statein%tgrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%pt(i,j,k1))) | |||
IPD_Data(nb)%Statein%ugrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%ua(i,j,k1))) | |||
IPD_Data(nb)%Statein%vgrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%va(i,j,k1))) | |||
IPD_Data(nb)%Statein%wgrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%w(i,j,k1))) |
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 believe this should be protected with an if-test for hydrostatic as w is only defined for non-hydrostatic simulations.
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.
Thank you for noticing that. Also, @junwang-noaa requested that wgrs only be allocated if lightning_threat is enabled, so I'll put both in the same "if" guard.
When implemented in the physics this check will also need to be made.
…On Tue, Feb 28, 2023 at 11:28 AM Rusty Benson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In driver/fvGFS/atmosphere.F90
<#243 (comment)>
:
> @@ -2113,6 +2113,7 @@ subroutine atmos_phys_driver_statein (IPD_Data, Atm_block,flip_vc)
IPD_Data(nb)%Statein%tgrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%pt(i,j,k1)))
IPD_Data(nb)%Statein%ugrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%ua(i,j,k1)))
IPD_Data(nb)%Statein%vgrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%va(i,j,k1)))
+ IPD_Data(nb)%Statein%wgrs(ix,k) = _DBL_(_RL_(Atm(mygrid)%w(i,j,k1)))
I believe this should be protected with an if-test for hydrostatic as w is
only defined for non-hydrostatic simulations.
—
Reply to this email directly, view it on GitHub
<#243 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMUQRVHAESF7WKP2MBXBRQTWZYRT5ANCNFSM6AAAAAAVJ62DUQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
The code that uses wgrs is never reached unless |
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.
Thanks @SamuelTrahanNOAA. I haven't looked at the IPD_Data%Statein ddt in a while, but if it's a pointer and not a pure allocatable, then this all looks good.
From GFS_typedefs.F90: type GFS_statein_type
...
real (kind=kind_phys), pointer :: wgrs (:,:) => null() !< w component of layer wind
...
end type GFS_statein_type
...
subroutine statein_create (Statein, IM, Model)
...
if(Model%lightning_threat) then
allocate (Statein%wgrs (IM,Model%levs))
endif |
@bensonr @laurenchilutti Can you merge in this pr? All tests are done on ufs-community/ufs-weather-model#1642 |
thanks! @bensonr |
Description
This is part of a collection of PRs to add lightning threat indexes to the RRFS. The algorithm was originally ported from HRRR to the GFDL_atmos_cubed_sphere NGGPS diagnostics, using the
w
variable in both implementations. I've moved it to CCPP, but it still needsw
in the formulation, so this three-line change sendsw
to the model.ufs-community/ufs-weather-model#1632
How Has This Been Tested?
A 3km test case from a time that had some lightning was run and compared to the HRRR output. Developers of the scheme found the results to be sufficiently similar. There'll be more extensive testing after this is merged and running in parallels.
Checklist:
Please check all whether they apply or not