@@ -781,7 +781,8 @@ program xgrid_test
781781
782782 subroutine test_unstruct_exchange ()
783783
784- real (r8 _kind), allocatable :: atm_data_in(:,:), atm_data_sg(:,:)
784+ real (r8 _kind), allocatable :: atm_data_in_0(:,:), atm_data_in_1(:,:), atm_data_in_2(:,:), atm_data_in_3(:,:)
785+ real (r8 _kind), allocatable :: atm_data_sg(:,:)
785786 real (r8 _kind), allocatable :: atm_data_sg_1(:,:), atm_data_sg_2(:,:), atm_data_sg_3(:,:)
786787 real (r8 _kind), allocatable :: lnd_data_sg(:,:,:), ice_data_sg(:,:,:)
787788 real (r8 _kind), allocatable :: atm_data_ug(:,:), tmp_sg(:,:,:)
@@ -877,12 +878,18 @@ subroutine test_unstruct_exchange()
877878 allocate (atm_data_ug_2(isc_atm:iec_atm, jsc_atm:jec_atm ) )
878879 allocate (atm_data_ug_3(isc_atm:iec_atm, jsc_atm:jec_atm ) )
879880
880- allocate (atm_data_in(isc_atm:iec_atm, jsc_atm:jec_atm ) )
881+ allocate (atm_data_in_0(isc_atm:iec_atm, jsc_atm:jec_atm ) )
882+ allocate (atm_data_in_1(isc_atm:iec_atm, jsc_atm:jec_atm ) )
883+ allocate (atm_data_in_2(isc_atm:iec_atm, jsc_atm:jec_atm ) )
884+ allocate (atm_data_in_3(isc_atm:iec_atm, jsc_atm:jec_atm ) )
881885 allocate (atm_data_sg(isc_atm:iec_atm, jsc_atm:jec_atm ) )
882886 allocate (atm_data_sg_1(isc_atm:iec_atm, jsc_atm:jec_atm ) )
883887 allocate (atm_data_sg_2(isc_atm:iec_atm, jsc_atm:jec_atm ) )
884888 allocate (atm_data_sg_3(isc_atm:iec_atm, jsc_atm:jec_atm ) )
885- atm_data_in = 0
889+ atm_data_in_0 = 0
890+ atm_data_in_1 = 0
891+ atm_data_in_2 = 0
892+ atm_data_in_3 = 0
886893 atm_data_sg = 0
887894 atm_data_sg_1 = 0
888895 atm_data_sg_2 = 0
@@ -914,11 +921,14 @@ subroutine test_unstruct_exchange()
914921 x_3 = 0
915922 x_4 = 0
916923
917- call random_number (atm_data_in)
918- call put_to_xgrid(atm_data_in, ' ATM' , x_1, Xmap, remap_method= remap_method)
919- call put_to_xgrid(atm_data_in+1 , ' ATM' , x_2, Xmap, remap_method= remap_method, complete= .false. )
920- call put_to_xgrid(atm_data_in+2 , ' ATM' , x_3, Xmap, remap_method= remap_method, complete= .false. )
921- call put_to_xgrid(atm_data_in+3 , ' ATM' , x_4, Xmap, remap_method= remap_method, complete= .true. )
924+ call random_number (atm_data_in_0)
925+ atm_data_in_1 = atm_data_in_0 + 1
926+ atm_data_in_2 = atm_data_in_0 + 2
927+ atm_data_in_3 = atm_data_in_0 + 3
928+ call put_to_xgrid(atm_data_in_0, ' ATM' , x_1, Xmap, remap_method= remap_method)
929+ call put_to_xgrid(atm_data_in_1, ' ATM' , x_2, Xmap, remap_method= remap_method, complete= .false. )
930+ call put_to_xgrid(atm_data_in_2, ' ATM' , x_3, Xmap, remap_method= remap_method, complete= .false. )
931+ call put_to_xgrid(atm_data_in_3, ' ATM' , x_4, Xmap, remap_method= remap_method, complete= .true. )
922932 call get_from_xgrid(lnd_data_sg, ' LND' , x_1, xmap)
923933 call get_from_xgrid(ice_data_sg, ' OCN' , x_1, xmap)
924934 call put_to_xgrid(lnd_data_sg, ' LND' , x_2, xmap)
@@ -936,10 +946,10 @@ subroutine test_unstruct_exchange()
936946 y_3 = 0
937947 y_4 = 0
938948
939- call put_to_xgrid(atm_data_in , ' ATM' , y_1, Xmap_ug, remap_method= remap_method)
940- call put_to_xgrid(atm_data_in +1 , ' ATM' , y_2, Xmap_ug, remap_method= remap_method, complete= .false. )
941- call put_to_xgrid(atm_data_in +2 , ' ATM' , y_3, Xmap_ug, remap_method= remap_method, complete= .false. )
942- call put_to_xgrid(atm_data_in +3 , ' ATM' , y_4, Xmap_ug, remap_method= remap_method, complete= .true. )
949+ call put_to_xgrid(atm_data_in_0 , ' ATM' , y_1, Xmap_ug, remap_method= remap_method)
950+ call put_to_xgrid(atm_data_in_1 , ' ATM' , y_2, Xmap_ug, remap_method= remap_method, complete= .false. )
951+ call put_to_xgrid(atm_data_in_2 , ' ATM' , y_3, Xmap_ug, remap_method= remap_method, complete= .false. )
952+ call put_to_xgrid(atm_data_in_3 , ' ATM' , y_4, Xmap_ug, remap_method= remap_method, complete= .true. )
943953 call get_from_xgrid_ug(lnd_data_ug, ' LND' , y_1, xmap_ug)
944954 call get_from_xgrid(ice_data_ug, ' OCN' , y_1, xmap_ug)
945955 call put_to_xgrid_ug(lnd_data_ug, ' LND' , y_2, xmap_ug)
@@ -967,7 +977,8 @@ subroutine test_unstruct_exchange()
967977
968978 if (ice_pe) deallocate (ice_data_sg, ice_data_ug)
969979 deallocate (tmp_sg, x_1, x_2, x_3, x_4, y_1, y_2, y_3, y_4)
970- deallocate (atm_data_in, atm_data_sg)
980+ deallocate (atm_data_in_0, atm_data_in_1, atm_data_in_2, atm_data_in_3)
981+ deallocate (atm_data_sg)
971982 deallocate (atm_data_sg_1, atm_data_sg_2, atm_data_sg_3)
972983 deallocate (atm_data_ug)
973984 deallocate (atm_data_ug_1, atm_data_ug_2, atm_data_ug_3)
0 commit comments