Skip to content

Commit

Permalink
Added save attribute to Host Associated Arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
abrooks1085 committed Oct 24, 2024
1 parent bd9cbeb commit 4db6c52
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
23 changes: 12 additions & 11 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_) :: 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)
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)
type(time_type) :: Time_init, Time

!testing and generating answers
Expand Down Expand Up @@ -175,12 +175,13 @@ end subroutine test_sum_diag_integral_field
!-------------------------------------
subroutine read_diag_integral_file

character(*), parameter :: di_file='diag_integral.out'
integer :: iunit
character(17), parameter :: di_file='diag_integral.out'
integer, parameter :: iunit=100

character(100) :: cline1, cline2, cline3, cline4, cline5, clin6

!> read in computed values
open(newunit=iunit, file=di_file)
open(unit=iunit,file=trim(di_file))
read(iunit,*) cline1, cline2, cline3, cline4, cline5, clin6
read(iunit,*) itime, field_avg2, field_avg3, field_avgw, field_avgh
close(iunit)
Expand Down
6 changes: 3 additions & 3 deletions test_fms/topography/test_topography.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ program test_top
integer, parameter :: lkind = TEST_TOP_KIND_ ! kind parameter for mixed precision

real(kind=TEST_TOP_KIND_), parameter :: deg2rad = real(pi, TEST_TOP_KIND_)/180.0_lkind
real(kind=TEST_TOP_KIND_), dimension(2,2) :: lon2d, lat2d ! in radians
real(kind=TEST_TOP_KIND_), dimension(2) :: lon1d, lat1d ! in radians
real(kind=TEST_TOP_KIND_), dimension(2,2), save :: lon2d, lat2d ! in radians
real(kind=TEST_TOP_KIND_), dimension(2), save :: lon1d, lat1d ! in radians

call fms_init
call topography_init
Expand Down Expand Up @@ -352,4 +352,4 @@ end subroutine check_answers



end program test_top
end program test_top

0 comments on commit 4db6c52

Please sign in to comment.