From 3fd16395e3d4a8537aa47b3f332be6aa5b2e7ddb Mon Sep 17 00:00:00 2001 From: Andrew Brooks Date: Thu, 7 Nov 2024 09:45:22 -0500 Subject: [PATCH] removed save attribute from arrays and moved initialize_arrays subroutine to top of contain block to reslove host association issue --- test_fms/diag_integral/test_diag_integral.F90 | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test_fms/diag_integral/test_diag_integral.F90 b/test_fms/diag_integral/test_diag_integral.F90 index ef9a0e4b5..c8984e3e7 100644 --- a/test_fms/diag_integral/test_diag_integral.F90 +++ b/test_fms/diag_integral/test_diag_integral.F90 @@ -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 @@ -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 @@ -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