-
Notifications
You must be signed in to change notification settings - Fork 146
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
update to deep convection interstitials #125
Conversation
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: ud_mf, dd_mf, dt_mf | ||
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: cnvw, cnvc | ||
real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk, cnvprcp, cnvprcpb | ||
real(kind=kind_phys), dimension(im, levs), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt |
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 we should play safe here and not specify the extends of the dimensions for arrays that might be allocated or not, depending on certain switches. For instance, dt3dt is only allocated if ldiag3d is true:
if (Model%ldiag3d) then
allocate (Diag%du3dt (IM,Model%levs,4))
allocate (Diag%dv3dt (IM,Model%levs,4))
allocate (Diag%dt3dt (IM,Model%levs,6))
allocate (Diag%dq3dt (IM,Model%levs,oz_coeff+5))
!--- needed to allocate GoCart coupling fields
allocate (Diag%upd_mf (IM,Model%levs))
allocate (Diag%dwn_mf (IM,Model%levs))
allocate (Diag%det_mf (IM,Model%levs))
allocate (Diag%cldcov (IM,Model%levs))
endif
I would not specify the dimensional extent, for example
real(kind=kind_phys), dimension(:, :), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt
to be on the safe side.
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.
@llpcarson what do you think?
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.
@llpcarson and I decided to go ahead and merge the PR, and submit a small follow-up PR that changes those array dimensions
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.
Follow-up PR: #127
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.
Approve and fix array dimension specifications as described in the comments in a follow-up PR.
I agree with your reasoning and solution. I see that you merged and will
address this in another PR.
…On Wed, Jul 18, 2018, 9:24 AM Dom Heinzeller ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In physics/GFS_DCNV_generic.f90
<#125 (comment)>:
>
- real(kind=kind_phys), intent(in) :: frain
- real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: rain1, cld1d
- real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: save_u, save_v, save_t, save_qv
- real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: ud_mf, dd_mf, dt_mf
- real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: cnvw, cnvc
+ real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk, cnvprcp, cnvprcpb
+ real(kind=kind_phys), dimension(im, levs), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt
I think we should play safe here and not specify the dimension extents for
arrays that might be allocated or not, depending on certain switches. For
instance, dt3dt is only allocated if ldiag3d is true:
if (Model%ldiag3d) then
allocate (Diag%du3dt (IM,Model%levs,4))
allocate (Diag%dv3dt (IM,Model%levs,4))
allocate (Diag%dt3dt (IM,Model%levs,6))
allocate (Diag%dq3dt (IM,Model%levs,oz_coeff+5))
!--- needed to allocate GoCart coupling fields
allocate (Diag%upd_mf (IM,Model%levs))
allocate (Diag%dwn_mf (IM,Model%levs))
allocate (Diag%det_mf (IM,Model%levs))
allocate (Diag%cldcov (IM,Model%levs))
endif
I would not specify the dimensional extent, for example
real(kind=kind_phys), dimension(:, :), intent(inout) :: dt3dt, dq3dt,
du3dt, dv3dt
to be on the safe side.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#125 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYTu0HVtrOkwEtv5SHrS2FFSevGc2V5qks5uH1MqgaJpZM4VTkqo>
.
|
I updated GFS_DCNV_generic_pre/post to no longer use GFS DDTs since their use limited other models in their data organization. This required passing in many new variables that had previously been part of DDTs. Some corresponding new standard names were added in GFS_typedefs in FV3 and in gmtb_scm_type_defs in SCM. In addition, there was a code stanza added to not break gocart functionality (even though this is not operational) since it would have needed to have been done at some point anyway! Code related to determining array indices for the 'phy_f3d' variable was removed since it was already included in a subroutine within GFS_typedefs during initialization. Instead, the correct portion of phy_f3d is passed in to the routine (using the previously calculated value of ncnvw).