119 array, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
121 type(group_halo_update_type),
intent(inout) :: group
123 type(group_halo_update_type),
intent(inout) :: groupp
125 real,
dimension(:,:),
intent(inout) :: array
126 type(domain2D),
intent(inout) :: domain
127 integer,
optional,
intent(in) :: flags
128 integer,
optional,
intent(in) :: position
129 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
130 logical,
optional,
intent(in) :: complete
132 logical :: is_complete
151 call mpp_update_domains(array, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
155 if (mpp_group_update_initialized(group))
then 159 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo)
163 if(
present(complete)) is_complete = complete
179 array, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
181 type(group_halo_update_type),
intent(inout) :: group
183 type(group_halo_update_type),
intent(inout) :: groupp
185 real,
dimension(:,:,:),
intent(inout) :: array
186 type(domain2D),
intent(inout) :: domain
187 integer,
optional,
intent(in) :: flags
188 integer,
optional,
intent(in) :: position
189 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
190 logical,
optional,
intent(in) :: complete
192 logical :: is_complete
212 call mpp_update_domains(array, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
216 if (mpp_group_update_initialized(group))
then 220 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo)
224 if(
present(complete)) is_complete = complete
239 array, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
240 type(group_halo_update_type),
intent(inout) :: group
242 type(group_halo_update_type),
intent(inout) :: groupp
244 real,
dimension(:,:,:,:),
intent(inout) :: array
245 type(domain2D),
intent(inout) :: domain
246 integer,
optional,
intent(in) :: flags
247 integer,
optional,
intent(in) :: position
248 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
249 logical,
optional,
intent(in) :: complete
251 logical :: is_complete
273 call mpp_update_domains(array, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
277 if (mpp_group_update_initialized(group))
then 281 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo)
285 if(
present(complete)) is_complete = complete
302 u_cmpt, v_cmpt, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
303 type(group_halo_update_type),
intent(inout) :: group
305 type(group_halo_update_type),
intent(inout) :: groupp
307 real,
dimension(:,:),
intent(inout) :: u_cmpt, v_cmpt
308 type(domain2d),
intent(inout) :: domain
309 integer,
optional,
intent(in) :: flags
310 integer,
optional,
intent(in) :: gridtype
311 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
312 logical,
optional,
intent(in) :: complete
314 logical :: is_complete
339 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
343 if (mpp_group_update_initialized(group))
then 347 flags=flags, gridtype=gridtype, &
348 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo)
352 if(
present(complete)) is_complete = complete
367 u_cmpt, v_cmpt, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
368 type(group_halo_update_type),
intent(inout) :: group
370 type(group_halo_update_type),
intent(inout) :: groupp
372 real,
dimension(:,:,:),
intent(inout) :: u_cmpt, v_cmpt
373 type(domain2d),
intent(inout) :: domain
374 integer,
optional,
intent(in) :: flags
375 integer,
optional,
intent(in) :: gridtype
376 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
377 logical,
optional,
intent(in) :: complete
379 logical :: is_complete
404 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
408 if (mpp_group_update_initialized(group))
then 412 flags=flags, gridtype=gridtype, &
413 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo)
417 if(
present(complete)) is_complete = complete
436 type(group_halo_update_type),
intent(inout) :: group
438 type(group_halo_update_type),
intent(inout) :: groupp
440 type(
domain2d),
intent(inout) :: domain
468 array, arrayp, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
469 type(group_halo_update_type),
intent(inout) :: group
471 type(group_halo_update_type),
intent(inout) :: groupp
473 real,
dimension(:,:),
intent(inout) :: array, arrayp
474 real(8) :: array8(10,10)
475 type(domain2D),
intent(inout) :: domain
476 integer,
optional,
intent(in) :: flags
477 integer,
optional,
intent(in) :: position
478 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
479 logical,
optional,
intent(in) :: complete
481 logical :: is_complete
500 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
512 array, arrayp, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
513 type(group_halo_update_type),
intent(inout) :: group
515 type(group_halo_update_type),
intent(inout) :: groupp
517 real,
dimension(:,:,:),
intent(inout) :: array, arrayp
518 type(domain2D),
intent(inout) :: domain
519 integer,
optional,
intent(in) :: flags
520 integer,
optional,
intent(in) :: position
521 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
522 logical,
optional,
intent(in) :: complete
524 logical :: is_complete
544 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
556 array, arrayp, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
557 type(group_halo_update_type),
intent(inout) :: group
559 type(group_halo_update_type),
intent(inout) :: groupp
561 real,
dimension(:,:,:,:),
intent(inout) :: array, arrayp
562 type(domain2D),
intent(inout) :: domain
563 integer,
optional,
intent(in) :: flags
564 integer,
optional,
intent(in) :: position
565 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
566 logical,
optional,
intent(in) :: complete
568 logical :: is_complete
590 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
604 u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
605 type(group_halo_update_type),
intent(inout) :: group
607 type(group_halo_update_type),
intent(inout) :: groupp
609 real,
dimension(:,:),
intent(inout) :: u_cmpt, v_cmpt, u_cmptp, v_cmptp
610 type(domain2d),
intent(inout) :: domain
611 integer,
optional,
intent(in) :: flags
612 integer,
optional,
intent(in) :: gridtype
613 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
614 logical,
optional,
intent(in) :: complete
616 logical :: is_complete
641 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
653 u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
654 type(group_halo_update_type),
intent(inout) :: group
656 type(group_halo_update_type),
intent(inout) :: groupp
658 real,
dimension(:,:,:),
intent(inout) :: u_cmpt, v_cmpt, u_cmptp, v_cmptp
659 type(domain2d),
intent(inout) :: domain
660 integer,
optional,
intent(in) :: flags
661 integer,
optional,
intent(in) :: gridtype
662 integer,
optional,
intent(in) :: whalo, ehalo, shalo, nhalo
663 logical,
optional,
intent(in) :: complete
665 logical :: is_complete
690 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
706 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: q
707 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: q_ad
708 INTEGER,
INTENT(IN) :: npx, npy
710 INTEGER,
INTENT(IN) :: fill
711 LOGICAL,
OPTIONAL,
INTENT(IN) :: agrid, bgrid
715 REAL(kind=4) :: tmp_ad
717 REAL(kind=4) :: tmp_ad0
719 REAL(kind=8) :: tmp_ad1
721 REAL(kind=8) :: tmp_ad2
723 REAL(kind=4) :: tmp_ad3
725 REAL(kind=4) :: tmp_ad4
727 REAL(kind=4) :: tmp_ad5
729 REAL(kind=4) :: tmp_ad6
731 REAL(kind=4) :: tmp_ad7
733 REAL(kind=4) :: tmp_ad8
735 REAL(kind=4) :: tmp_ad9
736 REAL(kind=4) :: tmp10
737 REAL(kind=4) :: tmp_ad10
738 REAL(kind=4) :: tmp11
739 REAL(kind=4) :: tmp_ad11
740 REAL(kind=4) :: tmp12
741 REAL(kind=4) :: tmp_ad12
742 REAL(kind=4) :: tmp13
743 REAL(kind=4) :: tmp_ad13
744 REAL(kind=4) :: tmp14
745 REAL(kind=4) :: tmp_ad14
746 REAL(kind=4) :: tmp15
747 REAL(kind=4) :: tmp_ad15
748 REAL(kind=4) :: tmp16
749 REAL(kind=4) :: tmp_ad16
750 REAL(kind=4) :: tmp17
751 REAL(kind=4) :: tmp_ad17
752 REAL(kind=4) :: tmp18
753 REAL(kind=4) :: tmp_ad18
754 REAL(kind=4) :: tmp19
755 REAL(kind=4) :: tmp_ad19
756 REAL(kind=4) :: tmp20
757 REAL(kind=4) :: tmp_ad20
758 REAL(kind=4) :: tmp21
759 REAL(kind=4) :: tmp_ad21
760 REAL(kind=4) :: tmp22
761 REAL(kind=4) :: tmp_ad22
763 IF (
PRESENT(bgrid))
THEN 770 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 776 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 782 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 788 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 798 IF (branch .NE. 0)
THEN 799 tmp_ad2 = q_ad(npx+i, npy+j)
800 q_ad(npx+i, npy+j) = 0.0
801 q_ad(npx+j, npy-i) = q_ad(npx+j, npy-i) + tmp_ad2
804 IF (branch .EQ. 0)
THEN 805 tmp_ad1 = q_ad(npx+i, 1-j)
806 q_ad(npx+i, 1-j) = 0.0
807 q_ad(npx+j, i+1) = q_ad(npx+j, i+1) + tmp_ad1
810 IF (branch .EQ. 0)
THEN 811 tmp_ad0 = q_ad(1-i, npy+j)
812 q_ad(1-i, npy+j) = 0.0
813 q_ad(1-j, npy-i) = q_ad(1-j, npy-i) + tmp_ad0
816 IF (branch .EQ. 0)
THEN 817 tmp_ad = q_ad(1-i, 1-j)
819 q_ad(1-j, i+1) = q_ad(1-j, i+1) + tmp_ad
827 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 833 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 839 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 845 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 855 IF (branch .NE. 0)
THEN 856 tmp_ad6 = q_ad(npx+j, npy+i)
857 q_ad(npx+j, npy+i) = 0.0
858 q_ad(npx-i, npy+j) = q_ad(npx-i, npy+j) + tmp_ad6
861 IF (branch .EQ. 0)
THEN 862 tmp_ad5 = q_ad(npx+j, 1-i)
863 q_ad(npx+j, 1-i) = 0.0
864 q_ad(npx-i, 1-j) = q_ad(npx-i, 1-j) + tmp_ad5
867 IF (branch .EQ. 0)
THEN 868 tmp_ad4 = q_ad(1-j, npy+i)
869 q_ad(1-j, npy+i) = 0.0
870 q_ad(i+1, npy+j) = q_ad(i+1, npy+j) + tmp_ad4
873 IF (branch .EQ. 0)
THEN 874 tmp_ad3 = q_ad(1-j, 1-i)
876 q_ad(i+1, 1-j) = q_ad(i+1, 1-j) + tmp_ad3
884 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 890 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 896 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 902 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 912 IF (branch .NE. 0)
THEN 913 tmp_ad10 = q_ad(npx+i, npy+j)
914 q_ad(npx+i, npy+j) = 0.0
915 q_ad(npx+j, npy-i) = q_ad(npx+j, npy-i) + tmp_ad10
918 IF (branch .EQ. 0)
THEN 919 tmp_ad9 = q_ad(npx+i, 1-j)
920 q_ad(npx+i, 1-j) = 0.0
921 q_ad(npx+j, i+1) = q_ad(npx+j, i+1) + tmp_ad9
924 IF (branch .EQ. 0)
THEN 925 tmp_ad8 = q_ad(1-i, npy+j)
926 q_ad(1-i, npy+j) = 0.0
927 q_ad(1-j, npy-i) = q_ad(1-j, npy-i) + tmp_ad8
930 IF (branch .EQ. 0)
THEN 931 tmp_ad7 = q_ad(1-i, 1-j)
933 q_ad(1-j, i+1) = q_ad(1-j, i+1) + tmp_ad7
939 ELSE IF (
PRESENT(agrid))
THEN 946 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 952 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 958 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 964 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 974 IF (branch .NE. 0)
THEN 975 tmp_ad14 = q_ad(npx-1+i, npy-1+j)
976 q_ad(npx-1+i, npy-1+j) = 0.0
977 q_ad(npx-1+j, npy-1-i+1) = q_ad(npx-1+j, npy-1-i+1) + &
981 IF (branch .EQ. 0)
THEN 982 tmp_ad13 = q_ad(npx-1+i, 1-j)
983 q_ad(npx-1+i, 1-j) = 0.0
984 q_ad(npx-1+j, i) = q_ad(npx-1+j, i) + tmp_ad13
987 IF (branch .EQ. 0)
THEN 988 tmp_ad12 = q_ad(1-i, npy-1+j)
989 q_ad(1-i, npy-1+j) = 0.0
990 q_ad(1-j, npy-1-i+1) = q_ad(1-j, npy-1-i+1) + tmp_ad12
993 IF (branch .EQ. 0)
THEN 994 tmp_ad11 = q_ad(1-i, 1-j)
996 q_ad(1-j, i) = q_ad(1-j, i) + tmp_ad11
1004 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1010 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1016 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1022 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1032 IF (branch .NE. 0)
THEN 1033 tmp_ad18 = q_ad(npx-1+j, npy-1+i)
1034 q_ad(npx-1+j, npy-1+i) = 0.0
1035 q_ad(npx-1-i+1, npy-1+j) = q_ad(npx-1-i+1, npy-1+j) + &
1039 IF (branch .EQ. 0)
THEN 1040 tmp_ad17 = q_ad(npx-1+j, 1-i)
1041 q_ad(npx-1+j, 1-i) = 0.0
1042 q_ad(npx-1-i+1, 1-j) = q_ad(npx-1-i+1, 1-j) + tmp_ad17
1045 IF (branch .EQ. 0)
THEN 1046 tmp_ad16 = q_ad(1-j, npy-1+i)
1047 q_ad(1-j, npy-1+i) = 0.0
1048 q_ad(i, npy-1+j) = q_ad(i, npy-1+j) + tmp_ad16
1051 IF (branch .EQ. 0)
THEN 1052 tmp_ad15 = q_ad(1-j, 1-i)
1053 q_ad(1-j, 1-i) = 0.0
1054 q_ad(i, 1-j) = q_ad(i, 1-j) + tmp_ad15
1062 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1068 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1074 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1080 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1090 IF (branch .NE. 0)
THEN 1091 tmp_ad22 = q_ad(npx-1+j, npy-1+i)
1092 q_ad(npx-1+j, npy-1+i) = 0.0
1093 q_ad(npx-1-i+1, npy-1+j) = q_ad(npx-1-i+1, npy-1+j) + &
1097 IF (branch .EQ. 0)
THEN 1098 tmp_ad21 = q_ad(npx-1+j, 1-i)
1099 q_ad(npx-1+j, 1-i) = 0.0
1100 q_ad(npx-1-i+1, 1-j) = q_ad(npx-1-i+1, 1-j) + tmp_ad21
1103 IF (branch .EQ. 0)
THEN 1104 tmp_ad20 = q_ad(1-j, npy-1+i)
1105 q_ad(1-j, npy-1+i) = 0.0
1106 q_ad(i, npy-1+j) = q_ad(i, npy-1+j) + tmp_ad20
1109 IF (branch .EQ. 0)
THEN 1110 tmp_ad19 = q_ad(1-j, 1-i)
1111 q_ad(1-j, 1-i) = 0.0
1112 q_ad(i, 1-j) = q_ad(i, 1-j) + tmp_ad19
1124 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: q
1125 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: q_ad
1126 INTEGER,
INTENT(IN) :: npx, npy
1128 INTEGER,
INTENT(IN) :: fill
1129 LOGICAL,
OPTIONAL,
INTENT(IN) :: agrid, bgrid
1133 REAL(kind=8) :: tmp_ad
1134 REAL(kind=8) :: tmp0
1135 REAL(kind=8) :: tmp_ad0
1136 REAL(kind=8) :: tmp1
1137 REAL(kind=8) :: tmp_ad1
1138 REAL(kind=8) :: tmp2
1139 REAL(kind=8) :: tmp_ad2
1140 REAL(kind=8) :: tmp3
1141 REAL(kind=8) :: tmp_ad3
1142 REAL(kind=8) :: tmp4
1143 REAL(kind=8) :: tmp_ad4
1144 REAL(kind=8) :: tmp5
1145 REAL(kind=8) :: tmp_ad5
1146 REAL(kind=8) :: tmp6
1147 REAL(kind=8) :: tmp_ad6
1148 REAL(kind=8) :: tmp7
1149 REAL(kind=8) :: tmp_ad7
1150 REAL(kind=8) :: tmp8
1151 REAL(kind=8) :: tmp_ad8
1152 REAL(kind=8) :: tmp9
1153 REAL(kind=8) :: tmp_ad9
1154 REAL(kind=8) :: tmp10
1155 REAL(kind=8) :: tmp_ad10
1156 REAL(kind=8) :: tmp11
1157 REAL(kind=8) :: tmp_ad11
1158 REAL(kind=8) :: tmp12
1159 REAL(kind=8) :: tmp_ad12
1160 REAL(kind=8) :: tmp13
1161 REAL(kind=8) :: tmp_ad13
1162 REAL(kind=8) :: tmp14
1163 REAL(kind=8) :: tmp_ad14
1164 REAL(kind=8) :: tmp15
1165 REAL(kind=8) :: tmp_ad15
1166 REAL(kind=8) :: tmp16
1167 REAL(kind=8) :: tmp_ad16
1168 REAL(kind=8) :: tmp17
1169 REAL(kind=8) :: tmp_ad17
1170 REAL(kind=8) :: tmp18
1171 REAL(kind=8) :: tmp_ad18
1172 REAL(kind=8) :: tmp19
1173 REAL(kind=8) :: tmp_ad19
1174 REAL(kind=8) :: tmp20
1175 REAL(kind=8) :: tmp_ad20
1176 REAL(kind=8) :: tmp21
1177 REAL(kind=8) :: tmp_ad21
1178 REAL(kind=8) :: tmp22
1179 REAL(kind=8) :: tmp_ad22
1181 IF (
PRESENT(bgrid))
THEN 1188 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1194 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1200 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1206 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1216 IF (branch .NE. 0)
THEN 1217 tmp_ad2 = q_ad(npx+i, npy+j)
1218 q_ad(npx+i, npy+j) = 0.0
1219 q_ad(npx+j, npy-i) = q_ad(npx+j, npy-i) + tmp_ad2
1222 IF (branch .EQ. 0)
THEN 1223 tmp_ad1 = q_ad(npx+i, 1-j)
1224 q_ad(npx+i, 1-j) = 0.0
1225 q_ad(npx+j, i+1) = q_ad(npx+j, i+1) + tmp_ad1
1228 IF (branch .EQ. 0)
THEN 1229 tmp_ad0 = q_ad(1-i, npy+j)
1230 q_ad(1-i, npy+j) = 0.0
1231 q_ad(1-j, npy-i) = q_ad(1-j, npy-i) + tmp_ad0
1234 IF (branch .EQ. 0)
THEN 1235 tmp_ad = q_ad(1-i, 1-j)
1236 q_ad(1-i, 1-j) = 0.0
1237 q_ad(1-j, i+1) = q_ad(1-j, i+1) + tmp_ad
1245 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1251 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1257 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1263 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1273 IF (branch .NE. 0)
THEN 1274 tmp_ad6 = q_ad(npx+j, npy+i)
1275 q_ad(npx+j, npy+i) = 0.0
1276 q_ad(npx-i, npy+j) = q_ad(npx-i, npy+j) + tmp_ad6
1279 IF (branch .EQ. 0)
THEN 1280 tmp_ad5 = q_ad(npx+j, 1-i)
1281 q_ad(npx+j, 1-i) = 0.0
1282 q_ad(npx-i, 1-j) = q_ad(npx-i, 1-j) + tmp_ad5
1285 IF (branch .EQ. 0)
THEN 1286 tmp_ad4 = q_ad(1-j, npy+i)
1287 q_ad(1-j, npy+i) = 0.0
1288 q_ad(i+1, npy+j) = q_ad(i+1, npy+j) + tmp_ad4
1291 IF (branch .EQ. 0)
THEN 1292 tmp_ad3 = q_ad(1-j, 1-i)
1293 q_ad(1-j, 1-i) = 0.0
1294 q_ad(i+1, 1-j) = q_ad(i+1, 1-j) + tmp_ad3
1302 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1308 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1314 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1320 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1330 IF (branch .NE. 0)
THEN 1331 tmp_ad10 = q_ad(npx+i, npy+j)
1332 q_ad(npx+i, npy+j) = 0.0
1333 q_ad(npx+j, npy-i) = q_ad(npx+j, npy-i) + tmp_ad10
1336 IF (branch .EQ. 0)
THEN 1337 tmp_ad9 = q_ad(npx+i, 1-j)
1338 q_ad(npx+i, 1-j) = 0.0
1339 q_ad(npx+j, i+1) = q_ad(npx+j, i+1) + tmp_ad9
1342 IF (branch .EQ. 0)
THEN 1343 tmp_ad8 = q_ad(1-i, npy+j)
1344 q_ad(1-i, npy+j) = 0.0
1345 q_ad(1-j, npy-i) = q_ad(1-j, npy-i) + tmp_ad8
1348 IF (branch .EQ. 0)
THEN 1349 tmp_ad7 = q_ad(1-i, 1-j)
1350 q_ad(1-i, 1-j) = 0.0
1351 q_ad(1-j, i+1) = q_ad(1-j, i+1) + tmp_ad7
1357 ELSE IF (
PRESENT(agrid))
THEN 1364 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1370 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1376 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1382 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1392 IF (branch .NE. 0)
THEN 1393 tmp_ad14 = q_ad(npx-1+i, npy-1+j)
1394 q_ad(npx-1+i, npy-1+j) = 0.0
1395 q_ad(npx-1+j, npy-1-i+1) = q_ad(npx-1+j, npy-1-i+1) + &
1399 IF (branch .EQ. 0)
THEN 1400 tmp_ad13 = q_ad(npx-1+i, 1-j)
1401 q_ad(npx-1+i, 1-j) = 0.0
1402 q_ad(npx-1+j, i) = q_ad(npx-1+j, i) + tmp_ad13
1405 IF (branch .EQ. 0)
THEN 1406 tmp_ad12 = q_ad(1-i, npy-1+j)
1407 q_ad(1-i, npy-1+j) = 0.0
1408 q_ad(1-j, npy-1-i+1) = q_ad(1-j, npy-1-i+1) + tmp_ad12
1411 IF (branch .EQ. 0)
THEN 1412 tmp_ad11 = q_ad(1-i, 1-j)
1413 q_ad(1-i, 1-j) = 0.0
1414 q_ad(1-j, i) = q_ad(1-j, i) + tmp_ad11
1422 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1428 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1434 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1440 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1450 IF (branch .NE. 0)
THEN 1451 tmp_ad18 = q_ad(npx-1+j, npy-1+i)
1452 q_ad(npx-1+j, npy-1+i) = 0.0
1453 q_ad(npx-1-i+1, npy-1+j) = q_ad(npx-1-i+1, npy-1+j) + &
1457 IF (branch .EQ. 0)
THEN 1458 tmp_ad17 = q_ad(npx-1+j, 1-i)
1459 q_ad(npx-1+j, 1-i) = 0.0
1460 q_ad(npx-1-i+1, 1-j) = q_ad(npx-1-i+1, 1-j) + tmp_ad17
1463 IF (branch .EQ. 0)
THEN 1464 tmp_ad16 = q_ad(1-j, npy-1+i)
1465 q_ad(1-j, npy-1+i) = 0.0
1466 q_ad(i, npy-1+j) = q_ad(i, npy-1+j) + tmp_ad16
1469 IF (branch .EQ. 0)
THEN 1470 tmp_ad15 = q_ad(1-j, 1-i)
1471 q_ad(1-j, 1-i) = 0.0
1472 q_ad(i, 1-j) = q_ad(i, 1-j) + tmp_ad15
1480 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1486 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1492 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1498 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1508 IF (branch .NE. 0)
THEN 1509 tmp_ad22 = q_ad(npx-1+j, npy-1+i)
1510 q_ad(npx-1+j, npy-1+i) = 0.0
1511 q_ad(npx-1-i+1, npy-1+j) = q_ad(npx-1-i+1, npy-1+j) + &
1515 IF (branch .EQ. 0)
THEN 1516 tmp_ad21 = q_ad(npx-1+j, 1-i)
1517 q_ad(npx-1+j, 1-i) = 0.0
1518 q_ad(npx-1-i+1, 1-j) = q_ad(npx-1-i+1, 1-j) + tmp_ad21
1521 IF (branch .EQ. 0)
THEN 1522 tmp_ad20 = q_ad(1-j, npy-1+i)
1523 q_ad(1-j, npy-1+i) = 0.0
1524 q_ad(i, npy-1+j) = q_ad(i, npy-1+j) + tmp_ad20
1527 IF (branch .EQ. 0)
THEN 1528 tmp_ad19 = q_ad(1-j, 1-i)
1529 q_ad(1-j, 1-i) = 0.0
1530 q_ad(i, 1-j) = q_ad(i, 1-j) + tmp_ad19
1540 & , agrid, cgrid, vector)
1543 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
1544 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
1546 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
1547 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
1548 INTEGER,
INTENT(IN) :: npx, npy
1549 LOGICAL,
OPTIONAL,
INTENT(IN) :: dgrid, agrid, cgrid, vector
1551 REAL(kind=4) :: mysign
1555 IF (
PRESENT(vector))
THEN 1565 IF (
PRESENT(dgrid))
THEN 1567 ELSE IF (
PRESENT(cgrid))
THEN 1569 ELSE IF (
PRESENT(agrid))
THEN 1578 & , agrid, cgrid, vector)
1581 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
1582 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
1584 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
1585 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
1586 INTEGER,
INTENT(IN) :: npx, npy
1587 LOGICAL,
OPTIONAL,
INTENT(IN) :: dgrid, agrid, cgrid, vector
1589 REAL(kind=8) :: mysign
1593 IF (
PRESENT(vector))
THEN 1603 IF (
PRESENT(dgrid))
THEN 1605 ELSE IF (
PRESENT(cgrid))
THEN 1607 ELSE IF (
PRESENT(agrid))
THEN 1621 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
1622 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
1623 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
1624 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
1625 INTEGER,
INTENT(IN) :: npx, npy
1626 REAL(kind=4),
INTENT(IN) :: mysign
1632 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1638 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1644 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1650 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1660 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1666 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1672 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1678 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1688 IF (branch .NE. 0)
THEN 1689 x_ad(npx-1-i+1, npy-1+j) = x_ad(npx-1-i+1, npy-1+j) + mysign*&
1690 & y_ad(npx-1+j, npy-1+i)
1691 y_ad(npx-1+j, npy-1+i) = 0.0
1694 IF (branch .EQ. 0)
THEN 1695 x_ad(npx-1-i+1, 1-j) = x_ad(npx-1-i+1, 1-j) + y_ad(npx-1+j, 1-&
1697 y_ad(npx-1+j, 1-i) = 0.0
1700 IF (branch .EQ. 0)
THEN 1701 x_ad(i, npy-1+j) = x_ad(i, npy-1+j) + y_ad(1-j, npy-1+i)
1702 y_ad(1-j, npy-1+i) = 0.0
1705 IF (branch .EQ. 0)
THEN 1706 x_ad(i, 1-j) = x_ad(i, 1-j) + mysign*y_ad(1-j, 1-i)
1707 y_ad(1-j, 1-i) = 0.0
1714 IF (branch .NE. 0)
THEN 1715 y_ad(npx-1+j, npy-1-i+1) = y_ad(npx-1+j, npy-1-i+1) + mysign*&
1716 & x_ad(npx-1+i, npy-1+j)
1717 x_ad(npx-1+i, npy-1+j) = 0.0
1720 IF (branch .EQ. 0)
THEN 1721 y_ad(npx-1+j, i) = y_ad(npx-1+j, i) + x_ad(npx-1+i, 1-j)
1722 x_ad(npx-1+i, 1-j) = 0.0
1725 IF (branch .EQ. 0)
THEN 1726 y_ad(1-j, npy-1-i+1) = y_ad(1-j, npy-1-i+1) + x_ad(1-i, npy-1+&
1728 x_ad(1-i, npy-1+j) = 0.0
1731 IF (branch .EQ. 0)
THEN 1732 y_ad(1-j, i) = y_ad(1-j, i) + mysign*x_ad(1-i, 1-j)
1733 x_ad(1-i, 1-j) = 0.0
1742 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
1743 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
1744 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
1745 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
1746 INTEGER,
INTENT(IN) :: npx, npy
1747 REAL(kind=8),
INTENT(IN) :: mysign
1753 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1759 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1765 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1771 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1781 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1787 IF (is .EQ. 1 .AND. je .EQ. npy - 1)
THEN 1793 IF (ie .EQ. npx - 1 .AND. js .EQ. 1)
THEN 1799 IF (ie .EQ. npx - 1 .AND. je .EQ. npy - 1)
THEN 1809 IF (branch .NE. 0)
THEN 1810 x_ad(npx-1-i+1, npy-1+j) = x_ad(npx-1-i+1, npy-1+j) + mysign*&
1811 & y_ad(npx-1+j, npy-1+i)
1812 y_ad(npx-1+j, npy-1+i) = 0.0
1815 IF (branch .EQ. 0)
THEN 1816 x_ad(npx-1-i+1, 1-j) = x_ad(npx-1-i+1, 1-j) + y_ad(npx-1+j, 1-&
1818 y_ad(npx-1+j, 1-i) = 0.0
1821 IF (branch .EQ. 0)
THEN 1822 x_ad(i, npy-1+j) = x_ad(i, npy-1+j) + y_ad(1-j, npy-1+i)
1823 y_ad(1-j, npy-1+i) = 0.0
1826 IF (branch .EQ. 0)
THEN 1827 x_ad(i, 1-j) = x_ad(i, 1-j) + mysign*y_ad(1-j, 1-i)
1828 y_ad(1-j, 1-i) = 0.0
1835 IF (branch .NE. 0)
THEN 1836 y_ad(npx-1+j, npy-1-i+1) = y_ad(npx-1+j, npy-1-i+1) + mysign*&
1837 & x_ad(npx-1+i, npy-1+j)
1838 x_ad(npx-1+i, npy-1+j) = 0.0
1841 IF (branch .EQ. 0)
THEN 1842 y_ad(npx-1+j, i) = y_ad(npx-1+j, i) + x_ad(npx-1+i, 1-j)
1843 x_ad(npx-1+i, 1-j) = 0.0
1846 IF (branch .EQ. 0)
THEN 1847 y_ad(1-j, npy-1-i+1) = y_ad(1-j, npy-1-i+1) + x_ad(1-i, npy-1+&
1849 x_ad(1-i, npy-1+j) = 0.0
1852 IF (branch .EQ. 0)
THEN 1853 y_ad(1-j, i) = y_ad(1-j, i) + mysign*x_ad(1-i, 1-j)
1854 x_ad(1-i, 1-j) = 0.0
1866 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
1867 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
1868 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
1869 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
1870 INTEGER,
INTENT(IN) :: npx, npy
1871 REAL(kind=4),
INTENT(IN) :: mysign
1877 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1883 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 1889 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 1895 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 1905 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 1911 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 1917 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 1923 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 1933 IF (branch .NE. 0)
THEN 1934 x_ad(npx+j, npy-i) = x_ad(npx+j, npy-i) + y_ad(npx-1+i, npy+j)
1935 y_ad(npx-1+i, npy+j) = 0.0
1938 IF (branch .EQ. 0)
THEN 1939 x_ad(npx+j, i) = x_ad(npx+j, i) + mysign*y_ad(npx-1+i, 1-j)
1940 y_ad(npx-1+i, 1-j) = 0.0
1943 IF (branch .EQ. 0)
THEN 1944 x_ad(1-j, npy-i) = x_ad(1-j, npy-i) + mysign*y_ad(1-i, npy+j)
1945 y_ad(1-i, npy+j) = 0.0
1948 IF (branch .EQ. 0)
THEN 1949 x_ad(1-j, i) = x_ad(1-j, i) + y_ad(1-i, 1-j)
1950 y_ad(1-i, 1-j) = 0.0
1957 IF (branch .NE. 0)
THEN 1958 y_ad(npx-j, npy+i) = y_ad(npx-j, npy+i) + x_ad(npx+i, npy-1+j)
1959 x_ad(npx+i, npy-1+j) = 0.0
1962 IF (branch .EQ. 0)
THEN 1963 y_ad(npx-j, 1-i) = y_ad(npx-j, 1-i) + mysign*x_ad(npx+i, 1-j)
1964 x_ad(npx+i, 1-j) = 0.0
1967 IF (branch .EQ. 0)
THEN 1968 y_ad(j, npy+i) = y_ad(j, npy+i) + mysign*x_ad(1-i, npy-1+j)
1969 x_ad(1-i, npy-1+j) = 0.0
1972 IF (branch .EQ. 0)
THEN 1973 y_ad(j, 1-i) = y_ad(j, 1-i) + x_ad(1-i, 1-j)
1974 x_ad(1-i, 1-j) = 0.0
1983 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
1984 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
1985 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
1986 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
1987 INTEGER,
INTENT(IN) :: npx, npy
1988 REAL(kind=8),
INTENT(IN) :: mysign
1994 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 2000 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 2006 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 2012 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 2022 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 2028 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 2034 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 2040 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 2050 IF (branch .NE. 0)
THEN 2051 x_ad(npx+j, npy-i) = x_ad(npx+j, npy-i) + y_ad(npx-1+i, npy+j)
2052 y_ad(npx-1+i, npy+j) = 0.0
2055 IF (branch .EQ. 0)
THEN 2056 x_ad(npx+j, i) = x_ad(npx+j, i) + mysign*y_ad(npx-1+i, 1-j)
2057 y_ad(npx-1+i, 1-j) = 0.0
2060 IF (branch .EQ. 0)
THEN 2061 x_ad(1-j, npy-i) = x_ad(1-j, npy-i) + mysign*y_ad(1-i, npy+j)
2062 y_ad(1-i, npy+j) = 0.0
2065 IF (branch .EQ. 0)
THEN 2066 x_ad(1-j, i) = x_ad(1-j, i) + y_ad(1-i, 1-j)
2067 y_ad(1-i, 1-j) = 0.0
2074 IF (branch .NE. 0)
THEN 2075 y_ad(npx-j, npy+i) = y_ad(npx-j, npy+i) + x_ad(npx+i, npy-1+j)
2076 x_ad(npx+i, npy-1+j) = 0.0
2079 IF (branch .EQ. 0)
THEN 2080 y_ad(npx-j, 1-i) = y_ad(npx-j, 1-i) + mysign*x_ad(npx+i, 1-j)
2081 x_ad(npx+i, 1-j) = 0.0
2084 IF (branch .EQ. 0)
THEN 2085 y_ad(j, npy+i) = y_ad(j, npy+i) + mysign*x_ad(1-i, npy-1+j)
2086 x_ad(1-i, npy-1+j) = 0.0
2089 IF (branch .EQ. 0)
THEN 2090 y_ad(j, 1-i) = y_ad(j, 1-i) + x_ad(1-i, 1-j)
2091 x_ad(1-i, 1-j) = 0.0
2103 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
2104 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
2105 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
2106 REAL(kind=4),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
2107 INTEGER,
INTENT(IN) :: npx, npy
2108 REAL(kind=4),
INTENT(IN) :: mysign
2118 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 2124 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 2130 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 2136 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 2150 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 2156 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 2162 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 2168 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 2178 IF (branch .NE. 0)
THEN 2179 x_ad(npx-j, npy+i) = x_ad(npx-j, npy+i) + mysign*y_ad(npx+i, &
2181 y_ad(npx+i, npy-1+j) = 0.0
2184 IF (branch .EQ. 0)
THEN 2185 x_ad(npx-j, 1-i) = x_ad(npx-j, 1-i) + y_ad(npx+i, 1-j)
2186 y_ad(npx+i, 1-j) = 0.0
2189 IF (branch .EQ. 0)
THEN 2190 x_ad(j, npy+i) = x_ad(j, npy+i) + y_ad(1-i, npy-1+j)
2191 y_ad(1-i, npy-1+j) = 0.0
2194 IF (branch .EQ. 0)
THEN 2195 x_ad(j, 1-i) = x_ad(j, 1-i) + mysign*y_ad(1-i, 1-j)
2196 y_ad(1-i, 1-j) = 0.0
2203 IF (branch .NE. 0)
THEN 2204 y_ad(npx+j, npy-i) = y_ad(npx+j, npy-i) + mysign*x_ad(npx-1+i&
2206 x_ad(npx-1+i, npy+j) = 0.0
2209 IF (branch .EQ. 0)
THEN 2210 y_ad(npx+j, i) = y_ad(npx+j, i) + x_ad(npx-1+i, 1-j)
2211 x_ad(npx-1+i, 1-j) = 0.0
2214 IF (branch .EQ. 0)
THEN 2215 y_ad(1-j, npy-i) = y_ad(1-j, npy-i) + x_ad(1-i, npy+j)
2216 x_ad(1-i, npy+j) = 0.0
2219 IF (branch .EQ. 0)
THEN 2220 y_ad(1-j, i) = y_ad(1-j, i) + mysign*x_ad(1-i, 1-j)
2221 x_ad(1-i, 1-j) = 0.0
2230 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x
2231 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: x_ad
2232 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y
2233 REAL(kind=8),
DIMENSION(isd:, jsd:),
INTENT(INOUT) :: y_ad
2234 INTEGER,
INTENT(IN) :: npx, npy
2235 REAL(kind=8),
INTENT(IN) :: mysign
2245 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 2251 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 2257 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 2263 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 2277 IF (is .EQ. 1 .AND. js .EQ. 1)
THEN 2283 IF (is .EQ. 1 .AND. je + 1 .EQ. npy)
THEN 2289 IF (ie + 1 .EQ. npx .AND. js .EQ. 1)
THEN 2295 IF (ie + 1 .EQ. npx .AND. je + 1 .EQ. npy)
THEN 2305 IF (branch .NE. 0)
THEN 2306 x_ad(npx-j, npy+i) = x_ad(npx-j, npy+i) + mysign*y_ad(npx+i, &
2308 y_ad(npx+i, npy-1+j) = 0.0
2311 IF (branch .EQ. 0)
THEN 2312 x_ad(npx-j, 1-i) = x_ad(npx-j, 1-i) + y_ad(npx+i, 1-j)
2313 y_ad(npx+i, 1-j) = 0.0
2316 IF (branch .EQ. 0)
THEN 2317 x_ad(j, npy+i) = x_ad(j, npy+i) + y_ad(1-i, npy-1+j)
2318 y_ad(1-i, npy-1+j) = 0.0
2321 IF (branch .EQ. 0)
THEN 2322 x_ad(j, 1-i) = x_ad(j, 1-i) + mysign*y_ad(1-i, 1-j)
2323 y_ad(1-i, 1-j) = 0.0
2330 IF (branch .NE. 0)
THEN 2331 y_ad(npx+j, npy-i) = y_ad(npx+j, npy-i) + mysign*x_ad(npx-1+i&
2333 x_ad(npx-1+i, npy+j) = 0.0
2336 IF (branch .EQ. 0)
THEN 2337 y_ad(npx+j, i) = y_ad(npx+j, i) + x_ad(npx-1+i, 1-j)
2338 x_ad(npx-1+i, 1-j) = 0.0
2341 IF (branch .EQ. 0)
THEN 2342 y_ad(1-j, npy-i) = y_ad(1-j, npy-i) + x_ad(1-i, npy+j)
2343 x_ad(1-i, npy+j) = 0.0
2346 IF (branch .EQ. 0)
THEN 2347 y_ad(1-j, i) = y_ad(1-j, i) + mysign*x_ad(1-i, 1-j)
2348 x_ad(1-i, 1-j) = 0.0
2363 real(kind=r_grid) function mpp_global_sum_2d_adm(domain, field, field_ad, flags, position, tile_count)
2366 type(
domain2d),
intent(in) :: domain
2367 real(r_grid),
intent(in) :: field(:, :)
2368 real(r_grid),
intent(in) :: field_ad(:, :)
2369 integer,
intent(in),
optional :: flags
2370 integer,
intent(in),
optional :: position
2371 integer,
intent(in),
optional :: tile_count
2382 whalo, ehalo, shalo, nhalo, name, tile_count)
2384 real,
dimension(:,:),
intent(inout) :: array, arrayp
2385 type(domain2d),
intent(inout) :: domain
2386 integer,
intent(in),
optional :: flags
2387 logical,
intent(in),
optional :: complete
2388 integer,
intent(in),
optional :: position
2389 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2390 character(len=*),
intent(in),
optional :: name
2391 integer,
intent(in),
optional :: tile_count
2395 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2402 whalo, ehalo, shalo, nhalo, name, tile_count)
2404 real,
dimension(:,:,:),
intent(inout) :: array, arrayp
2405 type(domain2d),
intent(inout) :: domain
2406 integer,
intent(in),
optional :: flags
2407 logical,
intent(in),
optional :: complete
2408 integer,
intent(in),
optional :: position
2409 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2410 character(len=*),
intent(in),
optional :: name
2411 integer,
intent(in),
optional :: tile_count
2415 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2422 whalo, ehalo, shalo, nhalo, name, tile_count)
2424 real,
dimension(:,:,:,:),
intent(inout) :: array, arrayp
2425 type(domain2d),
intent(inout) :: domain
2426 integer,
intent(in),
optional :: flags
2427 logical,
intent(in),
optional :: complete
2428 integer,
intent(in),
optional :: position
2429 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2430 character(len=*),
intent(in),
optional :: name
2431 integer,
intent(in),
optional :: tile_count
2434 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2441 whalo, ehalo, shalo, nhalo, name, tile_count)
2443 real,
dimension(:,:,:,:,:),
intent(inout) :: array, arrayp
2444 type(domain2d),
intent(inout) :: domain
2445 integer,
intent(in),
optional :: flags
2446 logical,
intent(in),
optional :: complete
2447 integer,
intent(in),
optional :: position
2448 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2449 character(len=*),
intent(in),
optional :: name
2450 integer,
intent(in),
optional :: tile_count
2454 call mpp_update_domains_ad(arrayp, domain, flags=flags, position=position, whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2461 whalo, ehalo, shalo, nhalo, name, tile_count )
2463 real,
dimension(:,:),
intent(inout) :: u_cmpt, v_cmpt
2464 real,
dimension(:,:),
intent(inout) :: u_cmptp, v_cmptp
2465 type(domain2d),
intent(inout) :: domain
2466 integer,
intent(in),
optional :: flags, gridtype
2467 logical,
intent(in),
optional :: complete
2468 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2469 character(len=*),
intent(in),
optional :: name
2470 integer,
intent(in),
optional :: tile_count
2475 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2482 whalo, ehalo, shalo, nhalo, name, tile_count )
2484 real,
dimension(:,:,:),
intent(inout) :: u_cmpt, v_cmpt
2485 real,
dimension(:,:,:),
intent(inout) :: u_cmptp, v_cmptp
2486 type(domain2d),
intent(inout) :: domain
2487 integer,
intent(in),
optional :: flags, gridtype
2488 logical,
intent(in),
optional :: complete
2489 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2490 character(len=*),
intent(in),
optional :: name
2491 integer,
intent(in),
optional :: tile_count
2496 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2503 whalo, ehalo, shalo, nhalo, name, tile_count )
2505 real,
dimension(:,:,:,:),
intent(inout) :: u_cmpt, v_cmpt
2506 real,
dimension(:,:,:,:),
intent(inout) :: u_cmptp, v_cmptp
2507 type(domain2d),
intent(inout) :: domain
2508 integer,
intent(in),
optional :: flags, gridtype
2509 logical,
intent(in),
optional :: complete
2510 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2511 character(len=*),
intent(in),
optional :: name
2512 integer,
intent(in),
optional :: tile_count
2517 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2524 whalo, ehalo, shalo, nhalo, name, tile_count )
2526 real,
dimension(:,:,:,:,:),
intent(inout) :: u_cmpt, v_cmpt
2527 real,
dimension(:,:,:,:,:),
intent(inout) :: u_cmptp, v_cmptp
2528 type(domain2d),
intent(inout) :: domain
2529 integer,
intent(in),
optional :: flags, gridtype
2530 logical,
intent(in),
optional :: complete
2531 integer,
intent(in),
optional :: whalo, ehalo, shalo, nhalo
2532 character(len=*),
intent(in),
optional :: name
2533 integer,
intent(in),
optional :: tile_count
2538 whalo=whalo, ehalo=ehalo, shalo=shalo, nhalo=nhalo, complete=complete)
2549 ebuffer, sbuffer, wbuffer, nbuffer, &
2550 ebuffer_ad, sbuffer_ad, wbuffer_ad, nbuffer_ad, &
2551 flags, position, complete, tile_count )
2553 real,
dimension(:,:),
intent(in) :: array, arrayp
2554 type(domain2d),
intent(in) :: domain
2555 real,
intent(inout),
optional :: ebuffer(:), sbuffer(:), wbuffer(:), nbuffer(:)
2556 real,
intent(inout),
optional :: ebuffer_ad(:), sbuffer_ad(:), wbuffer_ad(:), nbuffer_ad(:)
2557 integer,
intent(in),
optional :: flags, position, tile_count
2558 logical,
intent(in),
optional :: complete
2562 call mpp_get_boundary_ad( arrayp, domain,ebuffer=ebuffer_ad,sbuffer=sbuffer_ad,wbuffer=wbuffer_ad,nbuffer=nbuffer_ad,&
2563 flags = flags, position = position, complete = complete, tile_count = tile_count )
2570 ebuffer, sbuffer, wbuffer, nbuffer, &
2571 ebuffer_ad, sbuffer_ad, wbuffer_ad, nbuffer_ad, &
2572 flags, position, complete, tile_count )
2574 real,
dimension(:,:,:),
intent(in) :: array, arrayp
2575 type(domain2d),
intent(in) :: domain
2576 real,
intent(inout),
optional :: ebuffer(:,:), sbuffer(:,:), wbuffer(:,:), nbuffer(:,:)
2577 real,
intent(inout),
optional :: ebuffer_ad(:,:), sbuffer_ad(:,:), wbuffer_ad(:,:), nbuffer_ad(:,:)
2578 integer,
intent(in),
optional :: flags, position, tile_count
2579 logical,
intent(in),
optional :: complete
2583 call mpp_get_boundary_ad( arrayp, domain,ebuffer=ebuffer_ad,sbuffer=sbuffer_ad,wbuffer=wbuffer_ad,nbuffer=nbuffer_ad,&
2584 flags = flags, position = position, complete = complete, tile_count = tile_count )
2591 ebufferx, sbufferx, wbufferx, nbufferx, &
2592 ebuffery, sbuffery, wbuffery, nbuffery, &
2593 ebufferx_ad, sbufferx_ad, wbufferx_ad, nbufferx_ad, &
2594 ebuffery_ad, sbuffery_ad, wbuffery_ad, nbuffery_ad, &
2595 flags, gridtype, complete, tile_count )
2597 real,
dimension(:,:),
intent(in) :: u_cmpt, v_cmpt
2598 real,
dimension(:,:),
intent(in) :: u_cmptp, v_cmptp
2599 type(domain2d),
intent(in) :: domain
2600 real,
intent(inout),
optional :: ebufferx(:), sbufferx(:), wbufferx(:), nbufferx(:)
2601 real,
intent(inout),
optional :: ebuffery(:), sbuffery(:), wbuffery(:), nbuffery(:)
2602 real,
intent(inout),
optional :: ebufferx_ad(:), sbufferx_ad(:), wbufferx_ad(:), nbufferx_ad(:)
2603 real,
intent(inout),
optional :: ebuffery_ad(:), sbuffery_ad(:), wbuffery_ad(:), nbuffery_ad(:)
2604 integer,
intent(in),
optional :: flags, gridtype, tile_count
2605 logical,
intent(in),
optional :: complete
2610 ebufferx = ebufferx_ad, sbufferx = sbufferx_ad, wbufferx = wbufferx_ad, nbufferx = nbufferx_ad, &
2611 ebuffery = ebuffery_ad, sbuffery = sbuffery_ad, wbuffery = wbuffery_ad, nbuffery = nbuffery_ad, &
2612 flags = flags, gridtype = gridtype, &
2613 complete = complete, tile_count = tile_count )
2620 ebufferx, sbufferx, wbufferx, nbufferx, &
2621 ebuffery, sbuffery, wbuffery, nbuffery, &
2622 ebufferx_ad, sbufferx_ad, wbufferx_ad, nbufferx_ad, &
2623 ebuffery_ad, sbuffery_ad, wbuffery_ad, nbuffery_ad, &
2624 flags, gridtype, complete, tile_count )
2626 real,
dimension(:,:,:),
intent(in) :: u_cmpt, v_cmpt
2627 real,
dimension(:,:,:),
intent(in) :: u_cmptp, v_cmptp
2628 type(domain2d),
intent(in) :: domain
2629 real,
intent(inout),
optional :: ebufferx(:,:), sbufferx(:,:), wbufferx(:,:), nbufferx(:,:)
2630 real,
intent(inout),
optional :: ebuffery(:,:), sbuffery(:,:), wbuffery(:,:), nbuffery(:,:)
2631 real,
intent(inout),
optional :: ebufferx_ad(:,:), sbufferx_ad(:,:), wbufferx_ad(:,:), nbufferx_ad(:,:)
2632 real,
intent(inout),
optional :: ebuffery_ad(:,:), sbuffery_ad(:,:), wbuffery_ad(:,:), nbuffery_ad(:,:)
2633 integer,
intent(in),
optional :: flags, gridtype, tile_count
2634 logical,
intent(in),
optional :: complete
2639 ebufferx = ebufferx_ad, sbufferx = sbufferx_ad, wbufferx = wbufferx_ad, nbufferx = nbufferx_ad, &
2640 ebuffery = ebuffery_ad, sbuffery = sbuffery_ad, wbuffery = wbuffery_ad, nbuffery = nbuffery_ad, &
2641 flags = flags, gridtype = gridtype, &
2642 complete = complete, tile_count = tile_count )
subroutine fill_corners_2d_r4_adm(q, q_ad, npx, npy, fill, agrid, bgrid)
subroutine mpp_update_domain2d_5d_adm(array, arrayp, domain, flags, complete, position, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine mpp_update_domain2d_3dv_adm(u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, complete, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine mpp_update_domain2d_2d_adm(array, arrayp, domain, flags, complete, position, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine, public pushcontrol(ctype, field)
real(kind=r_grid) function mpp_global_sum_2d_adm(domain, field, field_ad, flags, position, tile_count)
subroutine mpp_update_domain2d_4d_adm(array, arrayp, domain, flags, complete, position, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine mpp_update_domain2d_5dv_adm(u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, complete, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine mpp_update_domain2d_3d_adm(array, arrayp, domain, flags, complete, position, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine fill_corners_2d_r8_adm(q, q_ad, npx, npy, fill, agrid, bgrid)
subroutine start_vector_group_update_3d_adm(group, groupp, u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
subroutine pushcontrol1b(cc)
subroutine mpp_get_boundary_3dv_adm(u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, ebufferx, sbufferx, wbufferx, nbufferx, ebuffery, sbuffery, wbuffery, nbuffery, ebufferx_ad, sbufferx_ad, wbufferx_ad, nbufferx_ad, ebuffery_ad, sbuffery_ad, wbuffery_ad, nbuffery_ad, flags, gridtype, complete, tile_count)
subroutine fill_corners_dgrid_r4_adm(x, x_ad, y, y_ad, npx, npy, mysign)
integer, parameter, public ng
subroutine timing_on(blk_name)
subroutine fill_corners_agrid_r8_adm(x, x_ad, y, y_ad, npx, npy, mysign)
subroutine mpp_update_domain2d_4dv_adm(u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, complete, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine start_vector_group_update_3d(group, groupp, u_cmpt, v_cmpt, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
integer, parameter, public r_grid
subroutine fill_corners_xy_2d_r4_adm(x, x_ad, y, y_ad, npx, npy, dgrid, agrid, cgrid, vector)
subroutine mpp_get_boundary_3d_adm(array, arrayp, domain, ebuffer, sbuffer, wbuffer, nbuffer, ebuffer_ad, sbuffer_ad, wbuffer_ad, nbuffer_ad, flags, position, complete, tile_count)
subroutine mpp_get_boundary_2d_adm(array, arrayp, domain, ebuffer, sbuffer, wbuffer, nbuffer, ebuffer_ad, sbuffer_ad, wbuffer_ad, nbuffer_ad, flags, position, complete, tile_count)
subroutine fill_corners_cgrid_r8_adm(x, x_ad, y, y_ad, npx, npy, mysign)
subroutine fill_corners_cgrid_r4_adm(x, x_ad, y, y_ad, npx, npy, mysign)
subroutine start_var_group_update_3d(group, groupp, array, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
subroutine start_vector_group_update_2d_adm(group, groupp, u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
subroutine, public complete_group_halo_update(group, groupp, domain)
subroutine popcontrol1b(cc)
subroutine fill_corners_xy_2d_r8_adm(x, x_ad, y, y_ad, npx, npy, dgrid, agrid, cgrid, vector)
subroutine mpp_get_boundary_2dv_adm(u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, ebufferx, sbufferx, wbufferx, nbufferx, ebuffery, sbuffery, wbuffery, nbuffery, ebufferx_ad, sbufferx_ad, wbufferx_ad, nbufferx_ad, ebuffery_ad, sbuffery_ad, wbuffery_ad, nbuffery_ad, flags, gridtype, complete, tile_count)
subroutine fill_corners_agrid_r4_adm(x, x_ad, y, y_ad, npx, npy, mysign)
subroutine start_var_group_update_2d(group, groupp, array, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
subroutine start_var_group_update_4d_adm(group, groupp, array, arrayp, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
subroutine mpp_update_domain2d_2dv_adm(u_cmpt, u_cmptp, v_cmpt, v_cmptp, domain, flags, gridtype, complete, whalo, ehalo, shalo, nhalo, name, tile_count)
subroutine start_vector_group_update_2d(group, groupp, u_cmpt, v_cmpt, domain, flags, gridtype, whalo, ehalo, shalo, nhalo, complete)
subroutine start_var_group_update_4d(group, groupp, array, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
subroutine, public popcontrol(ctype, field)
subroutine fill_corners_dgrid_r8_adm(x, x_ad, y, y_ad, npx, npy, mysign)
subroutine start_var_group_update_3d_adm(group, groupp, array, arrayp, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
subroutine start_var_group_update_2d_adm(group, groupp, array, arrayp, domain, flags, position, whalo, ehalo, shalo, nhalo, complete)
subroutine timing_off(blk_name)