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.
|
|
||
| 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.
These must be intent(inout) because they are only modified under certain conditions, otherwise let unchanged. Fix also in metadata.
| type = real | ||
| kind = kind_phys | ||
| intent = inout | ||
| intent = out |
| 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.
No, intent(inout), see above. Also fix in physics/GFS_SCNV_generic.meta
| type = real | ||
| kind = kind_phys | ||
| intent = inout | ||
| intent = out |
There was a problem hiding this comment.
du3dt_mtb, du3dt_ogw, du3dt_tms all need to be intent(inout) in both the Fortran code and the metadata
| @@ -1,4 +1,4 @@ | |||
| !> \file cs_conv.F90 | |||
| u> \file cs_conv.F90 | |||
| dimensions = (horizontal_loop_extent) | ||
| type = real | ||
| kind = kind_phys | ||
| intent = inout |
There was a problem hiding this comment.
I think qss_{ocn,ice,lnd} are all intent(out)
| @@ -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.
qg0_ice should be intent(in)
| type = real | ||
| kind = kind_phys | ||
| intent = inout | ||
| intent = out |
There was a problem hiding this comment.
intent(inout) in both metadata and Fortran, because only set if flag_iter is true
There was a problem hiding this comment.
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.
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.
| type = real | ||
| kind = kind_phys | ||
| intent = in | ||
| intent = inout |
There was a problem hiding this comment.
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. |
climbfuji
left a comment
There was a problem hiding this comment.
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: