Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions scripts/ccpp_datafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from metavar import Var
from parse_tools import read_xml_file, write_xml_file
from parse_tools import ParseContext, ParseSource
from suite_objects import VerticalLoop, Subcycle
from suite_objects import Subcycle

# Global data
_INDENT_STR = " "
Expand Down Expand Up @@ -1094,9 +1094,6 @@ def _add_suite_object(parent, suite_object):
if ptype:
obj_elem.set("phase", ptype)
# end if
if isinstance(suite_object, VerticalLoop):
obj_elem.set("dimension_name", suite_object.dimension_name)
# end if
if isinstance(suite_object, Subcycle):
obj_elem.set("loop", suite_object._loop)
# end if
Expand Down
336 changes: 20 additions & 316 deletions scripts/suite_objects.py

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions test/capgen_test/temp_adjust.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ subroutine temp_adjust_run(foo, timestep, interstitial_var, temp_prev, temp_laye

integer, intent(in) :: foo
real(kind=kind_phys), intent(in) :: timestep
real(kind=kind_phys), intent(inout), optional :: qv(:)
real(kind=kind_phys), intent(inout), optional :: qv(:, :)
real(kind=kind_phys), intent(inout) :: ps(:)
! codee format off
REAL(kind_phys), intent(in) :: temp_prev(:)
REAL(kind_phys), intent(inout) :: temp_layer(foo)
REAL(kind_phys), intent(in) :: temp_prev(:,:)
REAL(kind_phys), intent(inout) :: temp_layer(:,:)
! codee format on
real(kind=kind_temp), intent(in) :: to_promote(:)
real(kind=kind_temp), intent(in) :: to_promote(:, :)
real(kind=kind_phys), intent(in) :: promote_pcnst(:)
integer, intent(out) :: interstitial_var(:)
character(len=512), intent(out) :: errmsg
Expand Down Expand Up @@ -73,8 +73,8 @@ subroutine temp_adjust_run(foo, timestep, interstitial_var, temp_prev, temp_laye
end if

do col_index = 1, foo
temp_layer(col_index) = temp_layer(col_index) + temp_prev(col_index)
if (present(qv)) qv(col_index) = qv(col_index) + 1.0_kind_phys
temp_layer(col_index, :) = temp_layer(col_index, :) + temp_prev(col_index, :)
if (present(qv)) qv(col_index, :) = qv(col_index, :) + 1.0_kind_phys
end do
if (present(innie) .and. present(outie) .and. present(optsie)) then
outie = innie * optsie
Expand Down
8 changes: 4 additions & 4 deletions test/capgen_test/temp_adjust.meta
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
[ temp_prev ]
standard_name = potential_temperature_at_previous_timestep
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[ temp_layer ]
standard_name = potential_temperature
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
diagnostic_name = temperature
[ qv ]
standard_name = water_vapor_specific_humidity
units = kg kg-1
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
Expand All @@ -86,7 +86,7 @@
[ to_promote ]
standard_name = promote_this_variable_to_suite
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_temp
intent = in
Expand Down
2 changes: 1 addition & 1 deletion test/capgen_test/temp_calc_adjust.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ subroutine temp_calc_adjust_run(nbox, timestep, temp_level, temp_calc, &
integer, intent(in) :: nbox
real(kind=kind_phys), intent(in) :: timestep
real(kind=kind_phys), intent(in) :: temp_level(:, :)
real(kind=kind_phys), intent(out) :: temp_calc(:)
real(kind=kind_phys), intent(out) :: temp_calc(:, :)
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
!----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion test/capgen_test/temp_calc_adjust.meta
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
[ temp_calc ]
standard_name = potential_temperature_at_previous_timestep
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
Expand Down
52 changes: 26 additions & 26 deletions test/ddthost_test/temp_adjust.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ module temp_adjust
!> \section arg_table_temp_adjust_run Argument Table
!! \htmlinclude arg_table_temp_adjust_run.html
!!
subroutine temp_adjust_run(foo, timestep, temp_prev, temp_layer, qv, ps, &
to_promote, promote_pcnst, errmsg, errflg, innie, outie, optsie)

integer, intent(in) :: foo
real(kind_phys), intent(in) :: timestep
real(kind_phys), intent(inout),optional :: qv(:)
real(kind_phys), intent(inout) :: ps(:)
real(kind_phys), intent(in) :: temp_prev(:)
real(kind_phys), intent(inout) :: temp_layer(foo)
real(kind_phys), intent(in) :: to_promote(:)
real(kind_phys), intent(in) :: promote_pcnst(:)
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
real(kind_phys), optional, intent(in) :: innie
real(kind_phys), optional, intent(out) :: outie
real(kind_phys), optional, intent(inout) :: optsie
subroutine temp_adjust_run(foo, timestep, temp_prev, temp_layer, qv, ps, &
to_promote, promote_pcnst, errmsg, errflg, innie, outie, optsie)

integer, intent(in) :: foo
real(kind=kind_phys), intent(in) :: timestep
real(kind=kind_phys), intent(inout), optional :: qv(:, :)
real(kind=kind_phys), intent(inout) :: ps(:)
real(kind=kind_phys), intent(in) :: temp_prev(:, :)
real(kind=kind_phys), intent(inout) :: temp_layer(:, :)
real(kind=kind_phys), intent(in) :: to_promote(:, :)
real(kind=kind_phys), intent(in) :: promote_pcnst(:)
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
real(kind=kind_phys), optional, intent(in) :: innie
real(kind=kind_phys), optional, intent(out) :: outie
real(kind=kind_phys), optional, intent(inout) :: optsie
!----------------------------------------------------------------

integer :: col_index
Expand All @@ -41,23 +41,23 @@ subroutine temp_adjust_run(foo, timestep, temp_prev, temp_layer, qv, ps, &
errflg = 0

do col_index = 1, foo
temp_layer(col_index) = temp_layer(col_index) + temp_prev(col_index)
if (present(qv)) qv(col_index) = qv(col_index) + 1.0_kind_phys
temp_layer(col_index, :) = temp_layer(col_index, :) + temp_prev(col_index, :)
if (present(qv)) qv(col_index, :) = qv(col_index, :) + 1.0_kind_phys
end do
if (present(innie) .and. present(outie) .and. present(optsie)) then
outie = innie * optsie
optsie = optsie + 1.0_kind_phys
outie = innie * optsie
optsie = optsie + 1.0_kind_phys
end if

end subroutine temp_adjust_run

!> \section arg_table_temp_adjust_init Argument Table
!! \htmlinclude arg_table_temp_adjust_init.html
!!
subroutine temp_adjust_init (errmsg, errflg)
subroutine temp_adjust_init(errmsg, errflg)

character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg

! This routine currently does nothing

Expand All @@ -69,10 +69,10 @@ end subroutine temp_adjust_init
!> \section arg_table_temp_adjust_finalize Argument Table
!! \htmlinclude arg_table_temp_adjust_finalize.html
!!
subroutine temp_adjust_finalize (errmsg, errflg)
subroutine temp_adjust_finalize(errmsg, errflg)

character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg

! This routine currently does nothing

Expand Down
8 changes: 4 additions & 4 deletions test/ddthost_test/temp_adjust.meta
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@
[ temp_prev ]
standard_name = potential_temperature_at_previous_timestep
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[ temp_layer ]
standard_name = potential_temperature
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
diagnostic_name = temperature
[ qv ]
standard_name = water_vapor_specific_humidity
units = kg kg-1
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
Expand All @@ -55,7 +55,7 @@
[ to_promote ]
standard_name = promote_this_variable_to_suite
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
Expand Down
120 changes: 60 additions & 60 deletions test/ddthost_test/temp_calc_adjust.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,93 +3,93 @@

module temp_calc_adjust

use ccpp_kinds, only: kind_phys
use ccpp_kinds, only: kind_phys

implicit none
private
implicit none
private

public :: temp_calc_adjust_init
public :: temp_calc_adjust_run
public :: temp_calc_adjust_finalize
public :: temp_calc_adjust_init
public :: temp_calc_adjust_run
public :: temp_calc_adjust_finalize

contains

!> \section arg_table_temp_calc_adjust_run Argument Table
!! \htmlinclude arg_table_temp_calc_adjust_run.html
!!
subroutine temp_calc_adjust_run(nbox, timestep, temp_level, temp_calc, &
errmsg, errflg)
!> \section arg_table_temp_calc_adjust_run Argument Table
!! \htmlinclude arg_table_temp_calc_adjust_run.html
!!
subroutine temp_calc_adjust_run(nbox, timestep, temp_level, temp_calc, &
errmsg, errflg)

integer, intent(in) :: nbox
real(kind_phys), intent(in) :: timestep
real(kind_phys), intent(in) :: temp_level(:,:)
real(kind_phys), intent(out) :: temp_calc(:)
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
!----------------------------------------------------------------
integer, intent(in) :: nbox
real(kind=kind_phys), intent(in) :: timestep
real(kind=kind_phys), intent(in) :: temp_level(:, :)
real(kind=kind_phys), intent(out) :: temp_calc(:, :)
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
!----------------------------------------------------------------

integer :: col_index
real(kind_phys) :: bar = 1.0_kind_phys
integer :: col_index
real(kind=kind_phys) :: bar = 1.0_kind_phys

errmsg = ''
errflg = 0
errmsg = ''
errflg = 0

call temp_calc_adjust_nested_subroutine(temp_calc)
if (check_foo()) then
call foo(bar)
end if
call temp_calc_adjust_nested_subroutine(temp_calc)
if (check_foo()) then
call foo(bar)
end if

contains
contains

elemental subroutine temp_calc_adjust_nested_subroutine(temp)
elemental subroutine temp_calc_adjust_nested_subroutine(temp)

real(kind_phys), intent(out) :: temp
!-------------------------------------------------------------
real(kind=kind_phys), intent(out) :: temp
!-------------------------------------------------------------

temp = 1.0_kind_phys
temp = 1.0_kind_phys

end subroutine temp_calc_adjust_nested_subroutine
end subroutine temp_calc_adjust_nested_subroutine

subroutine foo(bar)
real(kind_phys), intent(inout) :: bar
bar = bar + 1.0_kind_phys
subroutine foo(bar)
real(kind=kind_phys), intent(inout) :: bar
bar = bar + 1.0_kind_phys

end subroutine
end subroutine foo

logical function check_foo()
check_foo = .true.
end function check_foo
logical function check_foo()
check_foo = .true.
end function check_foo

end subroutine
end subroutine temp_calc_adjust_run

!> \section arg_table_temp_calc_adjust_init Argument Table
!! \htmlinclude arg_table_temp_calc_adjust_init.html
!!
subroutine temp_calc_adjust_init (errmsg, errflg)
!> \section arg_table_temp_calc_adjust_init Argument Table
!! \htmlinclude arg_table_temp_calc_adjust_init.html
!!
subroutine temp_calc_adjust_init(errmsg, errflg)

character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg

! This routine currently does nothing
! This routine currently does nothing

errmsg = ''
errflg = 0
errmsg = ''
errflg = 0

end subroutine temp_calc_adjust_init
end subroutine temp_calc_adjust_init

!> \section arg_table_temp_calc_adjust_finalize Argument Table
!! \htmlinclude arg_table_temp_calc_adjust_finalize.html
!!
subroutine temp_calc_adjust_finalize (errmsg, errflg)
!> \section arg_table_temp_calc_adjust_finalize Argument Table
!! \htmlinclude arg_table_temp_calc_adjust_finalize.html
!!
subroutine temp_calc_adjust_finalize(errmsg, errflg)

character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg

! This routine currently does nothing
! This routine currently does nothing

errmsg = ''
errflg = 0
errmsg = ''
errflg = 0

end subroutine temp_calc_adjust_finalize
end subroutine temp_calc_adjust_finalize

end module temp_calc_adjust
2 changes: 1 addition & 1 deletion test/ddthost_test/temp_calc_adjust.meta
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
[ temp_calc ]
standard_name = potential_temperature_at_previous_timestep
units = K
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
Expand Down
Loading