Lightning Threat Indexes: pass w to model#243
Conversation
junwang-noaa
left a comment
There was a problem hiding this comment.
The code change is to bring w field from dycore to physics. It looks good to me.
| 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.
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.
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 |
bensonr
left a comment
There was a problem hiding this comment.
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
wvariable in both implementations. I've moved it to CCPP, but it still needswin the formulation, so this three-line change sendswto 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