Skip to content

Commit

Permalink
Add optional attribute to capgen test
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Feb 12, 2024
1 parent d7bad29 commit 9337a2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/capgen_test/temp_adjust.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ subroutine temp_adjust_run(foo, timestep, temp_prev, temp_layer, qv, ps, &

integer, intent(in) :: foo
real(kind_phys), intent(in) :: timestep
real(kind_phys), intent(inout) :: qv(:)
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)
Expand All @@ -42,7 +42,7 @@ subroutine temp_adjust_run(foo, timestep, temp_prev, temp_layer, qv, ps, &

do col_index = 1, foo
temp_layer(col_index) = temp_layer(col_index) + temp_prev(col_index)
qv(col_index) = qv(col_index) + 1.0_kind_phys
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
1 change: 1 addition & 0 deletions test/capgen_test/temp_adjust.meta
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
kind = kind_phys
intent = inout
diagnostic_name_fixed = Q
optional = True
[ ps ]
standard_name = surface_air_pressure
state_variable = true
Expand Down

0 comments on commit 9337a2e

Please sign in to comment.