4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
24# if defined FORWARD_READ && defined SOLVE3D
26# endif
29# ifdef SENSITIVITY_4DVAR
31# endif
36# ifdef FORWARD_READ
38# endif
42
44
45 implicit none
46
47
48
49 integer, intent(in) :: ng
50
51
52
53 logical, save :: recordless = .false.
54
55 logical, dimension(3) :: update = &
56 & (/ .FALSE., .FALSE., .FALSE. /)
57
58 integer :: ILB, IUB, JLB, JUB
59 integer :: LBi, UBi, LBj, UBj
60 integer :: i, ic, my_tile
61
62# ifdef FORWARD_MIXING
63
64 real(r8) :: scale
65# endif
66
67 character (len=*), parameter :: MyFile = &
68 & __FILE__
69
70
71
72 my_tile=-1
73 ilb=
bounds(ng)%LBi(my_tile)
74 iub=
bounds(ng)%UBi(my_tile)
75 jlb=
bounds(ng)%LBj(my_tile)
76 jub=
bounds(ng)%UBj(my_tile)
77
78
79
80 lbi=lbound(
grid(ng)%h,dim=1)
81 ubi=ubound(
grid(ng)%h,dim=1)
82 lbj=lbound(
grid(ng)%h,dim=2)
83 ubj=ubound(
grid(ng)%h,dim=2)
84
85# ifdef PROFILE
86
87
88
89
90
92# endif
93
94
95
96
97
98# ifndef ANA_PSOURCE
99
100
101
102
103
104
105
108# if defined PIO_LIB && defined DISTRIBUTE
110# endif
111 & 1,
ssf(ng), recordless, update(1), &
112 & 1,
nsrc(ng), 1, 2, 1,
nsrc(ng), 1, &
115 END IF
116
117# ifdef SOLVE3D
118
119
120
124# if defined PIO_LIB && defined DISTRIBUTE
126# endif
127 & 1,
ssf(ng), recordless, update(1), &
128 & 1,
nsrc(ng),
n(ng), 2, 1,
nsrc(ng),
n(ng), &
129 &
sources(ng) % TsrcG(:,:,:,i))
131 END IF
132 END DO
133# endif
134# endif
135
136# if !defined ANA_WINDS && \
137 ((defined bulk_fluxes &&
138 defined ecosim)
139
140
141
142
143
145# if defined PIO_LIB && defined DISTRIBUTE
147# endif
149 & lbi, ubi, lbj, ubj, 2, 1, &
150# ifdef MASKING
151 &
grid(ng) % rmask, &
152# endif
155
157# if defined PIO_LIB && defined DISTRIBUTE
159# endif
161 & lbi, ubi, lbj, ubj, 2, 1, &
162# ifdef MASKING
163 &
grid(ng) % rmask, &
164# endif
167# endif
168
169# ifndef ANA_SMFLUX
170# if !(defined BULK_FLUXES || defined FORWARD_FLUXES || \
171 defined frc_coupling)
172
173
174
175
176
178# if defined PIO_LIB && defined DISTRIBUTE
180# endif
182 & lbi, ubi, lbj, ubj, 2, 1, &
183# ifdef MASKING
184 &
grid(ng) % umask, &
185# endif
188
190# if defined PIO_LIB && defined DISTRIBUTE
192# endif
194 & lbi, ubi, lbj, ubj, 2, 1, &
195# ifdef MASKING
196 &
grid(ng) % vmask, &
197# endif
200
201# elif defined FORWARD_FLUXES || defined FRC_COUPLING
202
203
204
205
206
208# if defined PIO_LIB && defined DISTRIBUTE
210# endif
211 & 1,
blk(ng), update(1), &
212 & lbi, ubi, lbj, ubj, 2, 1, &
213# ifdef MASKING
214 &
grid(ng) % umask, &
215# endif
218
220# if defined PIO_LIB && defined DISTRIBUTE
222# endif
223 & 1,
blk(ng), update(1), &
224 & lbi, ubi, lbj, ubj, 2, 1, &
225# ifdef MASKING
226 &
grid(ng) % vmask, &
227# endif
230# endif
231# endif
232
233# if !defined ANA_PAIR && \
234 (defined atm_press || defined bulk_fluxes || \
235 defined ecosim)
236# if !(defined FRC_COUPLING || defined FORWARD_FLUXES)
237
238
239
240
241
243# if defined PIO_LIB && defined DISTRIBUTE
245# endif
247 & lbi, ubi, lbj, ubj, 2, 1, &
248# ifdef MASKING
249 &
grid(ng) % rmask, &
250# endif
253
254# else
255
256
257
258
259
261# if defined PIO_LIB && defined DISTRIBUTE
263# endif
264 & 1,
blk(ng), update(1), &
265 & lbi, ubi, lbj, ubj, 2, 1, &
266# ifdef MASKING
267 &
grid(ng) % rmask, &
268# endif
271# endif
272# endif
273
274# if !defined ANA_WWAVE && defined WAVE_DATA
275
276
277
278
279
280# ifdef WAVES_DIR
282# if defined PIO_LIB && defined DISTRIBUTE
284# endif
286 & lbi, ubi, lbj, ubj, 2, 1, &
287# ifdef MASKING
288 &
grid(ng) % rmask, &
289# endif
292# endif
293
294# ifdef WAVES_HEIGHT
295
297# if defined PIO_LIB && defined DISTRIBUTE
299# endif
301 & lbi, ubi, lbj, ubj, 2, 1, &
302# ifdef MASKING
303 &
grid(ng) % rmask, &
304# endif
307# endif
308
309# ifdef WAVES_LENGTH
310
312# if defined PIO_LIB && defined DISTRIBUTE
314# endif
316 & lbi, ubi, lbj, ubj, 2, 1, &
317# ifdef MASKING
318 &
grid(ng) % rmask, &
319# endif
322# endif
323
324# ifdef WAVES_TOP_PERIOD
325
327# if defined PIO_LIB && defined DISTRIBUTE
329# endif
331 & lbi, ubi, lbj, ubj, 2, 1, &
332# ifdef MASKING
333 &
grid(ng) % rmask, &
334# endif
335 &
forces(ng) % Pwave_topG)
337# endif
338
339# ifdef WAVES_BOT_PERIOD
340
342# if defined PIO_LIB && defined DISTRIBUTE
344# endif
346 & lbi, ubi, lbj, ubj, 2, 1, &
347# ifdef MASKING
348 &
grid(ng) % rmask, &
349# endif
350 &
forces(ng) % Pwave_botG)
352# endif
353
354# if defined WAVES_UB
355
357# if defined PIO_LIB && defined DISTRIBUTE
359# endif
361 & lbi, ubi, lbj, ubj, 2, 1, &
362# ifdef MASKING
363 &
grid(ng) % rmask, &
364# endif
367# endif
368
369# if defined TKE_WAVEDISS
370
372# if defined PIO_LIB && defined DISTRIBUTE
374# endif
376 & lbi, ubi, lbj, ubj, 2, 1, &
377# ifdef MASKING
378 &
grid(ng) % rmask, &
379# endif
380 &
forces(ng) % Wave_dissipG)
382# endif
383
384# if defined SVENDSEN_ROLLER
385
387# if defined PIO_LIB && defined DISTRIBUTE
389# endif
391 & lbi, ubi, lbj, ubj, 2, 1, &
392# ifdef MASKING
393 &
grid(ng) % rmask, &
394# endif
395 &
forces(ng) % Wave_breakG)
397# endif
398# endif
399
400# ifdef SOLVE3D
401
402# if !defined ANA_CLOUD && defined CLOUDS
403
404
405
406
407
409# if defined PIO_LIB && defined DISTRIBUTE
411# endif
413 & lbi, ubi, lbj, ubj, 2, 1, &
414# ifdef MASKING
415 &
grid(ng) % rmask, &
416# endif
419# endif
420
421# if defined SHORTWAVE && !defined ANA_SRFLUX
422# ifdef FORWARD_FLUXES
423
424
425
426
427
429# if defined PIO_LIB && defined DISTRIBUTE
431# endif
432 & 1,
blk(ng), update(1), &
433 & lbi, ubi, lbj, ubj, 2, 1, &
434# ifdef MASKING
435 &
grid(ng) % rmask, &
436# endif
439
440# else
441
442# if !(defined BULK_FLUXES || defined FRC_COUPLING)
443
444
445
446
447
449# if defined PIO_LIB && defined DISTRIBUTE
451# endif
453 & lbi, ubi, lbj, ubj, 2, 1, &
454# ifdef MASKING
455 &
grid(ng) % rmask, &
456# endif
459# endif
460
461# endif
462# endif
463
464# if (defined BULK_FLUXES && !defined FORWARD_FLUXES) && \
465
466
467
468
469
470
472# if defined PIO_LIB && defined DISTRIBUTE
474# endif
476 & lbi, ubi, lbj, ubj, 2, 1, &
477# ifdef MASKING
478 &
grid(ng) % rmask, &
479# endif
482# endif
483
484# if (defined BULK_FLUXES && !defined FORWARD_FLUXES) && \
485 defined longwave_out
486
487
488
489
490
492# if defined PIO_LIB && defined DISTRIBUTE
494# endif
496 & lbi, ubi, lbj, ubj, 2, 1, &
497# ifdef MASKING
498 &
grid(ng) % rmask, &
499# endif
502# endif
503
504# if !defined ANA_TAIR && \
505 ((defined bulk_fluxes &&
506 defined ecosim || \
507 (defined shortwave && defined ana_srflux && defined albedo))
508
509
510
511
512
514# if defined PIO_LIB && defined DISTRIBUTE
516# endif
518 & lbi, ubi, lbj, ubj, 2, 1, &
519# ifdef MASKING
520 &
grid(ng) % rmask, &
521# endif
524# endif
525
526# if !defined ANA_HUMIDITY && \
527 ((defined bulk_fluxes &&
528 defined ecosim)
529
530
531
532
533
535# if defined PIO_LIB && defined DISTRIBUTE
537# endif
539 & lbi, ubi, lbj, ubj, 2, 1, &
540# ifdef MASKING
541 &
grid(ng) % rmask, &
542# endif
545# endif
546
547# if !defined ANA_RAIN && \
548 (defined bulk_fluxes &&
549
550
551
552
553
555# if defined PIO_LIB && defined DISTRIBUTE
557# endif
559 & lbi, ubi, lbj, ubj, 2, 1, &
560# ifdef MASKING
561 &
grid(ng) % rmask, &
562# endif
565# endif
566
567# ifndef ANA_STFLUX
568# if !(defined BULK_FLUXES || defined FORWARD_FLUXES)
569
570
571
572
573
576# if defined PIO_LIB && defined DISTRIBUTE
578# endif
580 & lbi, ubi, lbj, ubj, 2, 1, &
581# ifdef MASKING
582 &
grid(ng) % rmask, &
583# endif
586
587# elif defined FORWARD_FLUXES
588
589
590
591
592
594# if defined PIO_LIB && defined DISTRIBUTE
596# endif
597 & 1,
blk(ng), update(1), &
598 & lbi, ubi, lbj, ubj, 2, 1, &
599# ifdef MASKING
600 &
grid(ng) % rmask, &
601# endif
604# endif
605# endif
606
607# if !defined ANA_SST && defined QCORRECTION
608
609
610
611
612
613
615# if defined PIO_LIB && defined DISTRIBUTE
617# endif
619 & lbi, ubi, lbj, ubj, 2, 1, &
620# ifdef MASKING
621 &
grid(ng) % rmask, &
622# endif
625# endif
626
627# if !defined ANA_DQDSST && defined QCORRECTION
628
629
630
631
632
633
635# if defined PIO_LIB && defined DISTRIBUTE
637# endif
639 & lbi, ubi, lbj, ubj, 2, 1, &
640# ifdef MASKING
641 &
grid(ng) % rmask, &
642# endif
645# endif
646
647# ifndef ANA_BTFLUX
648
649
650
651
652
655# if defined PIO_LIB && defined DISTRIBUTE
657# endif
659 & lbi, ubi, lbj, ubj, 2, 1, &
660# ifdef MASKING
661 &
grid(ng) % rmask, &
662# endif
665# endif
666
667# if defined SALINITY && !defined ANA_SSFLUX
668# if !(defined EMINUSP || defined FORWARD_FLUXES || \
669 defined frc_coupling || defined srelaxation)
670
671
672
673
674
676# if defined PIO_LIB && defined DISTRIBUTE
678# endif
680 & lbi, ubi, lbj, ubj, 2, 1, &
681# ifdef MASKING
682 &
grid(ng) % rmask, &
683# endif
686
687# elif (defined EMINUSP || defined FORWARD_FLUXES || \
688 defined frc_coupling)
689
690
691
692
693
695# if defined PIO_LIB && defined DISTRIBUTE
697# endif
698 & 1,
blk(ng), update(1), &
699 & lbi, ubi, lbj, ubj, 2, 1, &
700# ifdef MASKING
701 &
grid(ng) % rmask, &
702# endif
705# endif
706
707# if !defined ANA_SSS && (defined SCORRECTION || defined SRELAXATION)
708
709
710
711
712
714# if defined PIO_LIB && defined DISTRIBUTE
716# endif
718 & lbi, ubi, lbj, ubj, 2, 1, &
719# ifdef MASKING
720 &
grid(ng) % rmask, &
721# endif
724# endif
725
726# ifndef ANA_BSFLUX
727
728
729
730
731
734# if defined PIO_LIB && defined DISTRIBUTE
736# endif
738 & lbi, ubi, lbj, ubj, 2, 1, &
739# ifdef MASKING
740 &
grid(ng) % rmask, &
741# endif
744# endif
745# endif
746
747# if defined BIOLOGY || defined SEDIMENT || defined T_PASSIVE
748# ifndef ANA_SPFLUX
749
750
751
752
753
756# if defined PIO_LIB && defined DISTRIBUTE
758# endif
760 & lbi, ubi, lbj, ubj, 2, 1, &
761# ifdef MASKING
762 &
grid(ng) % rmask, &
763# endif
764 &
forces(ng) % stfluxG(:,:,:,i))
766 END DO
767# endif
768
769# ifndef ANA_BPFLUX
770
771
772
773
774
777# if defined PIO_LIB && defined DISTRIBUTE
779# endif
781 & lbi, ubi, lbj, ubj, 2, 1, &
782# ifdef MASKING
783 &
grid(ng) % rmask, &
784# endif
785 &
forces(ng) % btfluxG(:,:,:,i))
787 END DO
788# endif
789# endif
790# endif
791
792
793
794
795
796# ifndef ANA_FSOBC
797
802# if defined PIO_LIB && defined DISTRIBUTE
804# endif
806 & recordless, update(1), &
807 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
810 END IF
811
815# if defined PIO_LIB && defined DISTRIBUTE
817# endif
819 & recordless, update(1), &
820 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
823 END IF
824
828# if defined PIO_LIB && defined DISTRIBUTE
830# endif
832 & recordless, update(1), &
833 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
836 END IF
837
841# if defined PIO_LIB && defined DISTRIBUTE
843# endif
845 & recordless, update(1), &
846 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
849 END IF
850 END IF
851# endif
852
853# ifndef ANA_M2OBC
854
859# if defined PIO_LIB && defined DISTRIBUTE
861# endif
863 & recordless, update(1), &
864 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
867 END IF
868
872# if defined PIO_LIB && defined DISTRIBUTE
874# endif
876 & recordless, update(1), &
877 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
880 END IF
881
885# if defined PIO_LIB && defined DISTRIBUTE
887# endif
889 & recordless, update(1), &
890 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
893 END IF
894
898# if defined PIO_LIB && defined DISTRIBUTE
900# endif
902 & recordless, update(1), &
903 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
906 END IF
907
911# if defined PIO_LIB && defined DISTRIBUTE
913# endif
915 & recordless, update(1), &
916 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
919 END IF
920
924# if defined PIO_LIB && defined DISTRIBUTE
926# endif
928 & recordless, update(1), &
929 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
932 END IF
933
937# if defined PIO_LIB && defined DISTRIBUTE
939# endif
941 & recordless, update(1), &
942 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
945 END IF
946
950# if defined PIO_LIB && defined DISTRIBUTE
952# endif
954 & recordless, update(1), &
955 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
958 END IF
959 END IF
960# endif
961
962# ifdef SOLVE3D
963# ifndef ANA_M3OBC
964
969# if defined PIO_LIB && defined DISTRIBUTE
971# endif
973 & recordless, update(1), &
974 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
977 END IF
978
982# if defined PIO_LIB && defined DISTRIBUTE
984# endif
986 & recordless, update(1), &
987 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
990 END IF
991
995# if defined PIO_LIB && defined DISTRIBUTE
997# endif
999 & recordless, update(1), &
1000 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1003 END IF
1004
1008# if defined PIO_LIB && defined DISTRIBUTE
1010# endif
1012 & recordless, update(1), &
1013 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
1016 END IF
1017
1021# if defined PIO_LIB && defined DISTRIBUTE
1023# endif
1025 & recordless, update(1), &
1026 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1029 END IF
1030
1034# if defined PIO_LIB && defined DISTRIBUTE
1036# endif
1038 & recordless, update(1), &
1039 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1042 END IF
1043
1047# if defined PIO_LIB && defined DISTRIBUTE
1049# endif
1051 & recordless, update(1), &
1052 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1055 END IF
1056
1060# if defined PIO_LIB && defined DISTRIBUTE
1062# endif
1064 & recordless, update(1), &
1065 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1068 END IF
1069 END IF
1070# endif
1071
1072# ifndef ANA_TOBC
1073
1079# if defined PIO_LIB && defined DISTRIBUTE
1081# endif
1083 & recordless, update(1), &
1084 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1087 END IF
1088 END DO
1089
1094# if defined PIO_LIB && defined DISTRIBUTE
1096# endif
1098 & recordless, update(1), &
1099 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1102 END IF
1103 END DO
1104
1109# if defined PIO_LIB && defined DISTRIBUTE
1111# endif
1113 & recordless, update(1), &
1114 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1115 &
boundary(ng) % tG_south(:,:,:,i))
1117 END IF
1118 END DO
1119
1124# if defined PIO_LIB && defined DISTRIBUTE
1126# endif
1128 & recordless, update(1), &
1129 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1130 &
boundary(ng) % tG_north(:,:,:,i))
1132 END IF
1133 END DO
1134 END IF
1135# endif
1136# endif
1137
1138
1139
1140
1141
1142# ifndef ANA_SSH
1143
1144
1145
1148# if defined PIO_LIB && defined DISTRIBUTE
1150# endif
1152 & lbi, ubi, lbj, ubj, 2, 1, &
1153# ifdef MASKING
1154 &
grid(ng) % rmask, &
1155# endif
1158 END IF
1159# endif
1160# ifndef ANA_M2CLIMA
1161
1162
1163
1166# if defined PIO_LIB && defined DISTRIBUTE
1168# endif
1170 & lbi, ubi, lbj, ubj, 2, 1, &
1171# ifdef MASKING
1172 &
grid(ng) % umask, &
1173# endif
1174 &
clima(ng) % ubarclmG)
1176
1178# if defined PIO_LIB && defined DISTRIBUTE
1180# endif
1182 & lbi, ubi, lbj, ubj, 2, 1, &
1183# ifdef MASKING
1184 &
grid(ng) % vmask, &
1185# endif
1186 &
clima(ng) % vbarclmG)
1188 END IF
1189# endif
1190# ifdef SOLVE3D
1191# ifndef ANA_M3CLIMA
1192
1193
1194
1197# if defined PIO_LIB && defined DISTRIBUTE
1199# endif
1201 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1202# ifdef MASKING
1203 &
grid(ng) % umask, &
1204# endif
1205 &
clima(ng) % uclmG)
1207
1209# if defined PIO_LIB && defined DISTRIBUTE
1211# endif
1213 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1214# ifdef MASKING
1215 &
grid(ng) % vmask, &
1216# endif
1217 &
clima(ng) % vclmG)
1219 END IF
1220# endif
1221# ifndef ANA_TCLIMA
1222
1223
1224
1225 ic=0
1228 ic=ic+1
1231# if defined PIO_LIB && defined DISTRIBUTE
1233# endif
1235 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1236# ifdef MASKING
1237 &
grid(ng) % rmask, &
1238# endif
1239 &
clima(ng) % tclmG(:,:,:,:,ic))
1241 END IF
1242 END DO
1243# endif
1244# endif
1245
1246# ifdef FORWARD_READ
1247
1248
1249
1250
1251
1252
1253
1255# if defined PIO_LIB && defined DISTRIBUTE
1256 &
fwd(ng)%pioFile, &
1257# endif
1258 & 1,
fwd(ng), update(1), &
1259 & lbi, ubi, lbj, ubj, 2, 1, &
1260# ifdef MASKING
1261 &
grid(ng) % rmask, &
1262# endif
1263 &
ocean(ng) % zetaG)
1265
1266
1267
1269# if defined PIO_LIB && defined DISTRIBUTE
1270 &
fwd(ng)%pioFile, &
1271# endif
1272 & 1,
fwd(ng), update(1), &
1273 & lbi, ubi, lbj, ubj, 2, 1, &
1274# ifdef MASKING
1275 &
grid(ng) % umask, &
1276# endif
1277 &
ocean(ng) % ubarG)
1279
1281# if defined PIO_LIB && defined DISTRIBUTE
1282 &
fwd(ng)%pioFile, &
1283# endif
1284 & 1,
fwd(ng), update(1), &
1285 & lbi, ubi, lbj, ubj, 2, 1, &
1286# ifdef MASKING
1287 &
grid(ng) % vmask, &
1288# endif
1289 &
ocean(ng) % vbarG)
1291
1292# ifdef FORWARD_RHS
1293
1294
1295
1297# if defined PIO_LIB && defined DISTRIBUTE
1298 &
fwd(ng)%pioFile, &
1299# endif
1300 & 1,
fwd(ng), update(1), &
1301 & lbi, ubi, lbj, ubj, 2, 1, &
1302# ifdef MASKING
1303 &
grid(ng) % rmask, &
1304# endif
1305 &
ocean(ng) % rzetaG)
1307
1309# if defined PIO_LIB && defined DISTRIBUTE
1310 &
fwd(ng)%pioFile, &
1311# endif
1312 & 1,
fwd(ng), update(1), &
1313 & lbi, ubi, lbj, ubj, 2, 1, &
1314# ifdef MASKING
1315 &
grid(ng) % umask, &
1316# endif
1317 &
ocean(ng) % rubarG)
1319
1321# if defined PIO_LIB && defined DISTRIBUTE
1322 &
fwd(ng)%pioFile, &
1323# endif
1324 & 1,
fwd(ng), update(1), &
1325 & lbi, ubi, lbj, ubj, 2, 1, &
1326# ifdef MASKING
1327 &
grid(ng) % vmask, &
1328# endif
1329 &
ocean(ng) % rvbarG)
1331# endif
1332
1333# ifdef SOLVE3D
1334
1335
1336
1338# if defined PIO_LIB && defined DISTRIBUTE
1339 &
fwd(ng)%pioFile, &
1340# endif
1341 & 1,
fwd(ng), update(1), &
1342 & lbi, ubi, lbj, ubj, 2, 1, &
1343# ifdef MASKING
1344 &
grid(ng) % umask, &
1345# endif
1348
1350# if defined PIO_LIB && defined DISTRIBUTE
1351 &
fwd(ng)%pioFile, &
1352# endif
1353 & 1,
fwd(ng), update(1), &
1354 & lbi, ubi, lbj, ubj, 2, 1, &
1355# ifdef MASKING
1356 &
grid(ng) % umask, &
1357# endif
1360
1362# if defined PIO_LIB && defined DISTRIBUTE
1363 &
fwd(ng)%pioFile, &
1364# endif
1365 & 1,
fwd(ng), update(1), &
1366 & lbi, ubi, lbj, ubj, 2, 1, &
1367# ifdef MASKING
1368 &
grid(ng) % vmask, &
1369# endif
1372
1374# if defined PIO_LIB && defined DISTRIBUTE
1375 &
fwd(ng)%pioFile, &
1376# endif
1377 & 1,
fwd(ng), update(1), &
1378 & lbi, ubi, lbj, ubj, 2, 1, &
1379# ifdef MASKING
1380 &
grid(ng) % vmask, &
1381# endif
1384
1385
1386
1388# if defined PIO_LIB && defined DISTRIBUTE
1389 &
fwd(ng)%pioFile, &
1390# endif
1391 & 1,
fwd(ng), update(1), &
1392 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1393# ifdef MASKING
1394 &
grid(ng) % umask, &
1395# endif
1398
1400# if defined PIO_LIB && defined DISTRIBUTE
1401 &
fwd(ng)%pioFile, &
1402# endif
1403 & 1,
fwd(ng), update(1), &
1404 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1405# ifdef MASKING
1406 &
grid(ng) % vmask, &
1407# endif
1410
1411# ifdef FORWARD_RHS
1412
1413
1414
1416# if defined PIO_LIB && defined DISTRIBUTE
1417 &
fwd(ng)%pioFile, &
1418# endif
1419 & 1,
fwd(ng), update(1), &
1420 & lbi, ubi, lbj, ubj, 2, 1, &
1421# ifdef MASKING
1422 &
grid(ng) % umask, &
1423# endif
1426
1428# if defined PIO_LIB && defined DISTRIBUTE
1429 &
fwd(ng)%pioFile, &
1430# endif
1431 & 1,
fwd(ng), update(1), &
1432 & lbi, ubi, lbj, ubj, 2, 1, &
1433# ifdef MASKING
1434 &
grid(ng) % vmask, &
1435# endif
1438
1440# if defined PIO_LIB && defined DISTRIBUTE
1441 &
fwd(ng)%pioFile, &
1442# endif
1443 & 1,
fwd(ng), update(1), &
1444 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1445# ifdef MASKING
1446 &
grid(ng) % umask, &
1447# endif
1450
1452# if defined PIO_LIB && defined DISTRIBUTE
1453 &
fwd(ng)%pioFile, &
1454# endif
1455 & 1,
fwd(ng), update(1), &
1456 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1457# ifdef MASKING
1458 &
grid(ng) % vmask, &
1459# endif
1462# endif
1463
1464
1465
1468# if defined PIO_LIB && defined DISTRIBUTE
1469 &
fwd(ng)%pioFile, &
1470# endif
1471 & 1,
fwd(ng), update(1), &
1472 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1473# ifdef MASKING
1474 &
grid(ng) % rmask, &
1475# endif
1476 &
ocean(ng) % tG(:,:,:,:,i))
1478 END DO
1479
1480# ifdef FORWARD_MIXING
1481
1482
1483
1488# if defined PIO_LIB && defined DISTRIBUTE
1489 &
fwd(ng)%pioFile, &
1490# endif
1491 & 1,
fwd(ng), update(1), &
1492 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1493# ifdef MASKING
1494 &
grid(ng) % rmask, &
1495# endif
1496 &
mixing(ng) % AktG(:,:,:,:,i))
1499 END DO
1500
1504# if defined PIO_LIB && defined DISTRIBUTE
1505 &
fwd(ng)%pioFile, &
1506# endif
1507 & 1,
fwd(ng), update(1), &
1508 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1509# ifdef MASKING
1510 &
grid(ng) % rmask, &
1511# endif
1515# endif
1516
1517# if defined MY25_MIXING_NOT_YET || defined GLS_MIXING_NOT_YET
1518
1519
1520
1522# if defined PIO_LIB && defined DISTRIBUTE
1523 &
fwd(ng)%pioFile, &
1524# endif
1525 & 1,
fwd(ng), update(1), &
1526 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1527# ifdef MASKING
1528 &
grid(ng) % rmask, &
1529# endif
1532
1533
1534
1536# if defined PIO_LIB && defined DISTRIBUTE
1537 &
fwd(ng)%pioFile, &
1538# endif
1539 & 1,
fwd(ng), update(1), &
1540 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1541# ifdef MASKING
1542 &
grid(ng) % rmask, &
1543# endif
1546
1547
1548
1550# if defined PIO_LIB && defined DISTRIBUTE
1551 &
fwd(ng)%pioFile, &
1552# endif
1553 & 1,
fwd(ng), update(1), &
1554 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1555# ifdef MASKING
1556 &
grid(ng) % rmask, &
1557# endif
1560
1561
1562
1564# if defined PIO_LIB && defined DISTRIBUTE
1565 &
fwd(ng)%pioFile, &
1566# endif
1567 & 1,
fwd(ng), update(1), &
1568 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1569# ifdef MASKING
1570 &
grid(ng) % rmask, &
1571# endif
1574
1575# ifdef GLS_MIXING_NOT_YET
1576
1577
1578
1580# if defined PIO_LIB && defined DISTRIBUTE
1581 &
fwd(ng)%pioFile, &
1582# endif
1583 & 1,
fwd(ng), update(1), &
1584 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1585# ifdef MASKING
1586 &
grid(ng) % rmask, &
1587# endif
1590# endif
1591# endif
1592
1593# ifdef LMD_MIXING_NOT_YET
1594
1595
1596
1598# if defined PIO_LIB && defined DISTRIBUTE
1599 &
fwd(ng)%pioFile, &
1600# endif
1601 & 1,
fwd(ng), update(1), &
1602 & lbi, ubi, lbj, ubj, 2, 1, &
1603# ifdef MASKING
1604 &
grid(ng) % rmask, &
1605# endif
1608# endif
1609
1610# ifdef LMD_BKPP_NOT_YET
1611
1612
1613
1615# if defined PIO_LIB && defined DISTRIBUTE
1616 &
fwd(ng)%pioFile, &
1617# endif
1618 & 1,
fwd(ng), update(1), &
1619 & lbi, ubi, lbj, ubj, 2, 1, &
1620# ifdef MASKING
1621 &
grid(ng) % rmask, &
1622# endif
1625# endif
1626
1627# ifdef LMD_NONLOCAL_NOT_YET
1628
1629
1630
1633# if defined PIO_LIB && defined DISTRIBUTE
1634 &
fwd(ng)%pioFile, &
1635# endif
1636 & 1,
fwd(ng), update(1), &
1637 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1638# ifdef MASKING
1639 &
grid(ng) % rmask, &
1640# endif
1641 &
mixing(ng) % ghatsG(:,:,:,i))
1643 END DO
1644# endif
1645# endif
1646# endif
1647
1648# if defined AD_SENSITIVITY || defined I4DVAR_ANA_SENSITIVITY || \
1649 defined opt_observations || defined sensitivity_4dvar || \
1650 defined so_semi
1651# ifndef OBS_SPACE
1652
1653
1654
1655
1656
1657
1658
1659# ifdef SENSITIVITY_4DVAR
1661# endif
1664# if defined PIO_LIB && defined DISTRIBUTE
1665 &
ads(ng)%pioFile, &
1666# endif
1667 & 1,
ads(ng), update(1), &
1668 & lbi, ubi, lbj, ubj, 2, 1, &
1669# ifdef MASKING
1670 &
grid(ng) % rmask, &
1671# endif
1672 &
clima(ng) % zeta_adsG)
1674 END IF
1675
1676
1677
1680# if defined PIO_LIB && defined DISTRIBUTE
1681 &
ads(ng)%pioFile, &
1682# endif
1683 & 1,
ads(ng), update(1), &
1684 & lbi, ubi, lbj, ubj, 2, 1, &
1685# ifdef MASKING
1686 &
grid(ng) % umask, &
1687# endif
1688 &
clima(ng) % ubar_adsG)
1690 END IF
1691
1694# if defined PIO_LIB && defined DISTRIBUTE
1695 &
ads(ng)%pioFile, &
1696# endif
1697 & 1,
ads(ng), update(1), &
1698 & lbi, ubi, lbj, ubj, 2, 1, &
1699# ifdef MASKING
1700 &
grid(ng) % vmask, &
1701# endif
1702 &
clima(ng) % vbar_adsG)
1704 END IF
1705
1706# ifdef SOLVE3D
1707
1708
1709
1712# if defined PIO_LIB && defined DISTRIBUTE
1713 &
ads(ng)%pioFile, &
1714# endif
1715 & 1,
ads(ng), update(1), &
1716 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1717# ifdef MASKING
1718 &
grid(ng) % umask, &
1719# endif
1720 &
clima(ng) % u_adsG)
1722 END IF
1723
1726# if defined PIO_LIB && defined DISTRIBUTE
1727 &
ads(ng)%pioFile, &
1728# endif
1729 & 1,
ads(ng), update(1), &
1730 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1731# ifdef MASKING
1732 &
grid(ng) % vmask, &
1733# endif
1734 &
clima(ng) % v_adsG)
1736 END IF
1737
1740# if defined PIO_LIB && defined DISTRIBUTE
1741 &
ads(ng)%pioFile, &
1742# endif
1743 & 1,
ads(ng), update(1), &
1744 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1745# ifdef MASKING
1746 &
grid(ng) % rmask, &
1747# endif
1748 &
clima(ng) % wvel_adsG)
1750 END IF
1751
1752
1753
1757# if defined PIO_LIB && defined DISTRIBUTE
1758 &
ads(ng)%pioFile, &
1759# endif
1760 & 1,
ads(ng), update(1), &
1761 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1762# ifdef MASKING
1763 &
grid(ng) % rmask, &
1764# endif
1765 &
clima(ng) % t_adsG(:,:,:,:,i))
1767 END IF
1768 END DO
1769# endif
1770# ifdef SENSITIVITY_4DVAR
1771 END IF
1772# endif
1773# endif
1774# endif
1775
1776# ifdef PROFILE
1777
1778
1779
1780
1781
1783# endif
1784
1785 RETURN
subroutine get_2dfldr(ng, model, ifield, ncid, piofile, nfiles, s, update, lbi, ubi, lbj, ubj, iout, irec, fmask, fout)
subroutine get_3dfldr(ng, model, ifield, ncid, piofile, nfiles, s, update, lbi, ubi, lbj, ubj, lbk, ubk, iout, irec, fmask, fout)
subroutine get_ngfldr(ng, model, ifield, ncid, piofile, nfiles, s, recordless, update, lbi, ubi, ubj, ubk, istr, iend, jrec, fout)
type(t_boundary), dimension(:), allocatable boundary
type(t_clima), dimension(:), allocatable clima
type(t_coupling), dimension(:), allocatable coupling
type(t_forces), dimension(:), allocatable forces
logical, dimension(:), allocatable lsen4dvar
type(t_grid), dimension(:), allocatable grid
type(t_io), dimension(:), allocatable ads
type(t_io), dimension(:), allocatable ssf
integer, dimension(:), allocatable nclmfiles
type(t_io), dimension(:), allocatable blk
type(t_io), dimension(:,:), allocatable frc
type(t_io), dimension(:,:), allocatable bry
type(t_io), dimension(:), allocatable fwd
integer, dimension(:), allocatable nbcfiles
type(t_io), dimension(:,:), allocatable clm
integer, dimension(:), allocatable nffiles
type(t_mixing), dimension(:), allocatable mixing
integer, dimension(2) iddiff
integer, dimension(:,:), allocatable clmncid
type(file_desc_t), dimension(:,:), pointer frcpiofile
integer, dimension(4) idu3bc
integer, dimension(4) idzbry
integer, dimension(4) idu2bc
integer, dimension(:), allocatable idrtrc
integer, dimension(:), allocatable idtbot
integer, dimension(:), allocatable idtsur
integer, dimension(:), allocatable idtclm
integer, dimension(:,:), allocatable frcncid
integer, dimension(:), allocatable idtvar
integer, dimension(:), allocatable istvar
integer, dimension(:,:), allocatable bryncid
integer, dimension(4) idv3bc
real(dp), dimension(:,:), allocatable fscale
integer, dimension(2) idghat
integer, dimension(:), allocatable idtads
integer, dimension(4) idv2bc
type(file_desc_t), dimension(:,:), pointer clmpiofile
type(file_desc_t), dimension(:,:), pointer brypiofile
integer, dimension(:,:), allocatable idtbry
type(t_ocean), dimension(:), allocatable ocean
type(t_lbc), dimension(:,:,:), allocatable ad_lbc
integer, dimension(:), allocatable n
type(t_bounds), dimension(:), allocatable bounds
integer, dimension(:), allocatable lm
integer, dimension(:), allocatable nt
integer, dimension(:), allocatable mm
logical, dimension(:), allocatable luvsrc
real(r8), dimension(:), allocatable ad_akv_fac
logical, dimension(:,:), allocatable ltracersrc
logical, dimension(:), allocatable lprocessobc
logical, dimension(:), allocatable lm3clm
logical, dimension(:), allocatable lsshclm
real(r8), dimension(:,:), allocatable ad_akt_fac
logical, dimension(:), allocatable lwsrc
integer, parameter isouth
type(t_scalars), dimension(:), allocatable scalars
logical, dimension(:), allocatable lm2clm
logical, dimension(:,:), allocatable ltracerclm
integer, parameter inorth
type(t_sources), dimension(:), allocatable sources
integer, dimension(:), allocatable nsrc
logical function, public founderror(flag, noerr, line, routine)
recursive subroutine wclock_off(ng, model, region, line, routine)
recursive subroutine wclock_on(ng, model, region, line, routine)