Skip to content

Commit

Permalink
removed save attribute from arrays and moved initialize_arrays subrou…
Browse files Browse the repository at this point in the history
…tine to top of contain block to reslove host association issue
  • Loading branch information
abrooks1085 committed Nov 7, 2024
1 parent 3536d39 commit 3fd1639
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions test_fms/diag_integral/test_diag_integral.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ program test_diag_integral
character(9), parameter :: field_nameh='immadeuph' !> made up field name to test
character(8), parameter :: std_digits = 'e23.15e3' !> write out precision for r8_kind data

real(TEST_DI_KIND_), save :: immadeup2(nxy,nxy) !> array to test sum_field_2d
real(TEST_DI_KIND_), save :: immadeup3(nxy,nxy,nxy) !> array to test sum_field_3d
real(TEST_DI_KIND_), save :: immadeupw(nxy,nxy,nxy) !> array to test sum_field_wght_3d
real(TEST_DI_KIND_), save :: weight(nxy,nxy,nxy) !> weights required to test sum_field_wght_3d
real(TEST_DI_KIND_), save :: immadeuph(nxy,nxy) !> array to test sum_field_2d_hemi

real(r8_kind), save :: lat(nxyp,nxyp), lon(nxyp,nxyp)
real(r8_kind), save :: area(nxy,nxy)
real(TEST_DI_KIND_) :: immadeup2(nxy,nxy) !> array to test sum_field_2d
real(TEST_DI_KIND_) :: immadeup3(nxy,nxy,nxy) !> array to test sum_field_3d
real(TEST_DI_KIND_) :: immadeupw(nxy,nxy,nxy) !> array to test sum_field_wght_3d
real(TEST_DI_KIND_) :: weight(nxy,nxy,nxy) !> weights required to test sum_field_wght_3d
real(TEST_DI_KIND_) :: immadeuph(nxy,nxy) !> array to test sum_field_2d_hemi

real(r8_kind) :: lat(nxyp,nxyp), lon(nxyp,nxyp)
real(r8_kind) :: area(nxy,nxy)
type(time_type) :: Time_init, Time

!testing and generating answers
Expand Down Expand Up @@ -96,6 +96,24 @@ program test_diag_integral
call test_sum_diag_integral_field !< compare read in values to the expected values.

contains
!-------------------------------------
!-------------------------------------
subroutine initialize_arrays

!> made up numbers

implicit none

lon=1.0_lkind
lat=1.0_lkind
area=1.0_lkind
immadeup2=1.0_lkind
immadeup3=1.0_lkind
immadeupw=1.0_lkind
immadeuph=1.0_lkind
weight=1.0_lkind

end subroutine initialize_arrays
!-------------------------------------
!-------------------------------------
subroutine test_diag_integral_init
Expand Down Expand Up @@ -204,22 +222,4 @@ subroutine check_answers(answer, outresult, whoami)
end subroutine check_answers
!-------------------------------------
!-------------------------------------
subroutine initialize_arrays

!> made up numbers

implicit none

lon=1.0_lkind
lat=1.0_lkind
area=1.0_lkind
immadeup2=1.0_lkind
immadeup3=1.0_lkind
immadeupw=1.0_lkind
immadeuph=1.0_lkind
weight=1.0_lkind

end subroutine initialize_arrays
!-------------------------------------
!-------------------------------------
end program test_diag_integral

0 comments on commit 3fd1639

Please sign in to comment.