-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fixes/modifications to ccpp-physics for transition to capgen #584
Conversation
not found errors found by capgen.
and out of order arguments for transition to capgen.
physics/GFS_MP_generic.F90
Outdated
@@ -22,8 +22,8 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, | |||
real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 | |||
real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 | |||
|
|||
real(kind=kind_phys), dimension(im, levs), intent(inout) :: save_t, save_qv | |||
real(kind=kind_phys), dimension(im, levs, ntrac), intent(inout) :: save_q | |||
real(kind=kind_phys), dimension(im, levs), intent(out) :: save_t, save_qv |
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.
These must be intent(inout) because they are only modified under certain conditions, otherwise let unchanged. Fix also in metadata.
physics/GFS_MP_generic.meta
Outdated
@@ -96,7 +96,7 @@ | |||
dimensions = (horizontal_loop_extent,vertical_dimension) | |||
type = real | |||
kind = kind_phys | |||
intent = inout | |||
intent = out |
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.
See above
physics/GFS_SCNV_generic.F90
Outdated
@@ -25,7 +25,7 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, | |||
logical, intent(in) :: ldiag3d, qdiag3d, flag_for_scnv_generic_tend | |||
real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor | |||
|
|||
real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u, save_v, save_t, save_qv | |||
real(kind=kind_phys), dimension(im,levs), intent(out) :: save_u, save_v, save_t, save_qv |
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.
No, intent(inout), see above. Also fix in physics/GFS_SCNV_generic.meta
physics/cires_ugwp.meta
Outdated
@@ -697,7 +697,7 @@ | |||
dimensions = (horizontal_loop_extent,vertical_dimension) | |||
type = real | |||
kind = kind_phys | |||
intent = inout | |||
intent = out |
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.
du3dt_mtb, du3dt_ogw, du3dt_tms all need to be intent(inout) in both the Fortran code and the metadata
physics/cs_conv.F90
Outdated
@@ -1,4 +1,4 @@ | |||
!> \file cs_conv.F90 | |||
u> \file cs_conv.F90 |
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.
Revert typo
physics/gfdl_sfc_layer.meta
Outdated
@@ -783,20 +783,26 @@ | |||
dimensions = (horizontal_loop_extent) | |||
type = real | |||
kind = kind_phys | |||
intent = inout |
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 qss_{ocn,ice,lnd} are all intent(out)
physics/m_micro_interstitial.F90
Outdated
@@ -176,12 +176,12 @@ subroutine m_micro_post_run( & | |||
real(kind=kind_phys), intent(inout) :: qsnw(1:im,1:levs) | |||
real(kind=kind_phys), intent(inout) :: qgl(1:im,1:levs) | |||
real(kind=kind_phys), intent(inout) :: gq0_ice(1:im,1:levs) |
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.
qg0_ice should be intent(in)
physics/module_MYJSFC_wrapper.meta
Outdated
@@ -379,7 +379,7 @@ | |||
dimensions = (horizontal_loop_extent) | |||
type = real | |||
kind = kind_phys | |||
intent = inout | |||
intent = out |
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.
intent(inout) in both metadata and Fortran, because only set if flag_iter is true
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.
same for ch, ffm, ffh, ffn10, ffh2, wind
real(kind_phys), intent(inout) :: f_rimef(1:ncol,1:nlev) | ||
real(kind_phys), intent(out ) :: f_ice(1:ncol,1:nlev) | ||
real(kind_phys), intent(out ) :: f_rain(1:ncol,1:nlev) | ||
real(kind_phys), intent(out ) :: f_rimef(1:ncol,1:nlev) |
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.
This scheme is a bit messy ... can you also make the following change, please? In lines 57-59, please remove the "optional" keyword and change optional = T
to F
in the metadata file (init routine).
Your changes in lines 164-166 are fine.
physics/sfc_drv_ruc.meta
Outdated
@@ -697,7 +697,7 @@ | |||
dimensions = (horizontal_loop_extent) | |||
type = real | |||
kind = kind_phys | |||
intent = in | |||
intent = inout |
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.
srflag should be intent(in) in both Fortran and metadata
Thanks @JulieSchramm for making those changes. I'll add the PR to the UFS commit queue. You may have to pull in changes from master one more time when it is our turn. |
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.
Looks good. Will approve once regression testing has been completed.
…in branch to ufs-community/ccpp-physics ufs/dev branch (NCAR#584) * Officially changed the ccpp-physics pointer from NCAR/ccpp-physics main branch to ufs-community/ccpp-physics ufs/dev branch
Mostly fixes to intent mismatches, out of order arguments and subroutines.
Not tested.
Outstanding issues with passing capgen consistency check include: