4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
24# ifdef FORWARD_READ
26# endif
33# ifdef FORWARD_READ
35# endif
39
41
42 implicit none
43
44
45
46 integer, intent(in) :: ng
47
48
49
50 logical, save :: recordless = .false.
51
52 logical, dimension(3) :: update = &
53 & (/ .FALSE., .FALSE., .FALSE. /)
54
55 integer :: ILB, IUB, JLB, JUB
56 integer :: LBi, UBi, LBj, UBj
57 integer :: i, ic, my_tile
58
59# ifdef FORWARD_MIXING
60
61 real(r8) :: scale
62# endif
63
64 character (len=*), parameter :: MyFile = &
65 & __FILE__
66
67
68
69 my_tile=-1
70 ilb=
bounds(ng)%LBi(my_tile)
71 iub=
bounds(ng)%UBi(my_tile)
72 jlb=
bounds(ng)%LBj(my_tile)
73 jub=
bounds(ng)%UBj(my_tile)
74
75
76
77 lbi=lbound(
grid(ng)%h,dim=1)
78 ubi=ubound(
grid(ng)%h,dim=1)
79 lbj=lbound(
grid(ng)%h,dim=2)
80 ubj=ubound(
grid(ng)%h,dim=2)
81
82# ifdef PROFILE
83
84
85
86
87
89# endif
90
91
92
93
94
95# ifndef ANA_PSOURCE
96
97
98
99
100
101
102
105# if defined PIO_LIB && defined DISTRIBUTE
107# endif
108 & 1,
ssf(ng), recordless, update(1), &
109 & 1,
nsrc(ng), 1, 2, 1,
nsrc(ng), 1, &
112 END IF
113
114# ifdef SOLVE3D
115
116
117
121# if defined PIO_LIB && defined DISTRIBUTE
123# endif
124 & 1,
ssf(ng), recordless, update(1), &
125 & 1,
nsrc(ng),
n(ng), 2, 1,
nsrc(ng),
n(ng), &
126 &
sources(ng) % TsrcG(:,:,:,i))
128 END IF
129 END DO
130# endif
131# endif
132
133# if !defined ANA_WINDS && \
134 ((defined bulk_fluxes &&
135 defined ecosim)
136
137
138
139
140
142# if defined PIO_LIB && defined DISTRIBUTE
144# endif
146 & lbi, ubi, lbj, ubj, 2, 1, &
147# ifdef MASKING
148 &
grid(ng) % rmask, &
149# endif
152
154# if defined PIO_LIB && defined DISTRIBUTE
156# endif
158 & lbi, ubi, lbj, ubj, 2, 1, &
159# ifdef MASKING
160 &
grid(ng) % rmask, &
161# endif
164# endif
165
166# ifndef FRC_COUPLING
167# if !defined ANA_SMFLUX && \
168
169
170
171
172
173
175# if defined PIO_LIB && defined DISTRIBUTE
177# endif
179 & lbi, ubi, lbj, ubj, 2, 1, &
180# ifdef MASKING
181 &
grid(ng) % umask, &
182# endif
185
187# if defined PIO_LIB && defined DISTRIBUTE
189# endif
191 & lbi, ubi, lbj, ubj, 2, 1, &
192# ifdef MASKING
193 &
grid(ng) % vmask, &
194# endif
197# endif
198# endif
199
200# if defined FORWARD_FLUXES || defined FRC_COUPLING
201
202
203
204
205
207# if defined PIO_LIB && defined DISTRIBUTE
209# endif
210 & 1,
blk(ng), update(1), &
211 & lbi, ubi, lbj, ubj, 2, 1, &
212# ifdef MASKING
213 &
grid(ng) % umask, &
214# endif
217
219# if defined PIO_LIB && defined DISTRIBUTE
221# endif
222 & 1,
blk(ng), update(1), &
223 & lbi, ubi, lbj, ubj, 2, 1, &
224# ifdef MASKING
225 &
grid(ng) % vmask, &
226# endif
229# endif
230
231# if !defined ANA_PAIR && \
232 (defined atm_press || defined bulk_fluxes || \
233 defined ecosim)
234# if !(defined FRC_COUPLING || defined FORWARD_FLUXES)
235
236
237
238
239
241# if defined PIO_LIB && defined DISTRIBUTE
243# endif
245 & lbi, ubi, lbj, ubj, 2, 1, &
246# ifdef MASKING
247 &
grid(ng) % rmask, &
248# endif
251
252# else
253
254
255
256
257
259# if defined PIO_LIB && defined DISTRIBUTE
261# endif
262 & 1,
blk(ng), update(1), &
263 & lbi, ubi, lbj, ubj, 2, 1, &
264# ifdef MASKING
265 &
grid(ng) % rmask, &
266# endif
269# endif
270# endif
271
272# if !defined ANA_WWAVE && defined WAVE_DATA
273
274
275
276
277
278# ifdef WAVES_DIR
280# if defined PIO_LIB && defined DISTRIBUTE
282# endif
284 & lbi, ubi, lbj, ubj, 2, 1, &
285# ifdef MASKING
286 &
grid(ng) % rmask, &
287# endif
290# endif
291
292# ifdef WAVES_HEIGHT
293
295# if defined PIO_LIB && defined DISTRIBUTE
297# endif
299 & lbi, ubi, lbj, ubj, 2, 1, &
300# ifdef MASKING
301 &
grid(ng) % rmask, &
302# endif
305# endif
306
307# ifdef WAVES_LENGTH
308
310# if defined PIO_LIB && defined DISTRIBUTE
312# endif
314 & lbi, ubi, lbj, ubj, 2, 1, &
315# ifdef MASKING
316 &
grid(ng) % rmask, &
317# endif
320# endif
321
322# ifdef WAVES_TOP_PERIOD
323
325# if defined PIO_LIB && defined DISTRIBUTE
327# endif
329 & lbi, ubi, lbj, ubj, 2, 1, &
330# ifdef MASKING
331 &
grid(ng) % rmask, &
332# endif
333 &
forces(ng) % Pwave_topG)
335# endif
336
337# ifdef WAVES_BOT_PERIOD
338
340# if defined PIO_LIB && defined DISTRIBUTE
342# endif
344 & lbi, ubi, lbj, ubj, 2, 1, &
345# ifdef MASKING
346 &
grid(ng) % rmask, &
347# endif
348 &
forces(ng) % Pwave_botG)
350# endif
351
352# if defined WAVES_UB
353
355# if defined PIO_LIB && defined DISTRIBUTE
357# endif
359 & lbi, ubi, lbj, ubj, 2, 1, &
360# ifdef MASKING
361 &
grid(ng) % rmask, &
362# endif
365# endif
366
367# if defined TKE_WAVEDISS
368
370# if defined PIO_LIB && defined DISTRIBUTE
372# endif
374 & lbi, ubi, lbj, ubj, 2, 1, &
375# ifdef MASKING
376 &
grid(ng) % rmask, &
377# endif
378 &
forces(ng) % Wave_dissipG)
380# endif
381
382# if defined SVENDSEN_ROLLER
383
385# if defined PIO_LIB && defined DISTRIBUTE
387# endif
389 & lbi, ubi, lbj, ubj, 2, 1, &
390# ifdef MASKING
391 &
grid(ng) % rmask, &
392# endif
393 &
forces(ng) % Wave_breakG)
395# endif
396# endif
397
398# ifdef SOLVE3D
399
400# if !defined ANA_CLOUD && defined CLOUDS
401
402
403
404
405
407# if defined PIO_LIB && defined DISTRIBUTE
409# endif
411 & lbi, ubi, lbj, ubj, 2, 1, &
412# ifdef MASKING
413 &
grid(ng) % rmask, &
414# endif
417# endif
418
419# if defined SHORTWAVE && !defined ANA_SRFLUX
420# ifdef FORWARD_FLUXES
421
422
423
424
425
427# if defined PIO_LIB && defined DISTRIBUTE
429# endif
430 & 1,
blk(ng), update(1), &
431 & lbi, ubi, lbj, ubj, 2, 1, &
432# ifdef MASKING
433 &
grid(ng) % rmask, &
434# endif
437
438# else
439
440# if !(defined BULK_FLUXES || defined FRC_COUPLING)
441
442
443
444
445
447# if defined PIO_LIB && defined DISTRIBUTE
449# endif
451 & lbi, ubi, lbj, ubj, 2, 1, &
452# ifdef MASKING
453 &
grid(ng) % rmask, &
454# endif
457# endif
458
459# endif
460# endif
461
462# if (defined BULK_FLUXES && !defined FORWARD_FLUXES) && \
463
464
465
466
467
468
470# if defined PIO_LIB && defined DISTRIBUTE
472# endif
474 & lbi, ubi, lbj, ubj, 2, 1, &
475# ifdef MASKING
476 &
grid(ng) % rmask, &
477# endif
480# endif
481
482# if (defined BULK_FLUXES && !defined FORWARD_FLUXES) && \
483 defined longwave_out
484
485
486
487
488
490# if defined PIO_LIB && defined DISTRIBUTE
492# endif
494 & lbi, ubi, lbj, ubj, 2, 1, &
495# ifdef MASKING
496 &
grid(ng) % rmask, &
497# endif
500# endif
501
502# if !defined ANA_TAIR && \
503 ((defined bulk_fluxes &&
504 defined ecosim || \
505 (defined shortwave && defined ana_srflux && defined albedo))
506
507
508
509
510
512# if defined PIO_LIB && defined DISTRIBUTE
514# endif
516 & lbi, ubi, lbj, ubj, 2, 1, &
517# ifdef MASKING
518 &
grid(ng) % rmask, &
519# endif
522# endif
523
524# if !defined ANA_HUMIDITY && \
525 ((defined bulk_fluxes &&
526 defined ecosim)
527
528
529
530
531
533# if defined PIO_LIB && defined DISTRIBUTE
535# endif
537 & lbi, ubi, lbj, ubj, 2, 1, &
538# ifdef MASKING
539 &
grid(ng) % rmask, &
540# endif
543# endif
544
545# if !defined ANA_RAIN && \
546 (defined bulk_fluxes &&
547
548
549
550
551
553# if defined PIO_LIB && defined DISTRIBUTE
555# endif
557 & lbi, ubi, lbj, ubj, 2, 1, &
558# ifdef MASKING
559 &
grid(ng) % rmask, &
560# endif
563# endif
564
565# ifndef ANA_STFLUX
566# if !(defined BULK_FLUXES || defined FORWARD_FLUXES)
567
568
569
570
571
574# if defined PIO_LIB && defined DISTRIBUTE
576# endif
578 & lbi, ubi, lbj, ubj, 2, 1, &
579# ifdef MASKING
580 &
grid(ng) % rmask, &
581# endif
584
585# elif defined FORWARD_FLUXES
586
587
588
589
590
592# if defined PIO_LIB && defined DISTRIBUTE
594# endif
595 & 1,
blk(ng), update(1), &
596 & lbi, ubi, lbj, ubj, 2, 1, &
597# ifdef MASKING
598 &
grid(ng) % rmask, &
599# endif
602# endif
603# endif
604
605# if !defined ANA_SST && defined QCORRECTION
606
607
608
609
610
611
613# if defined PIO_LIB && defined DISTRIBUTE
615# endif
617 & lbi, ubi, lbj, ubj, 2, 1, &
618# ifdef MASKING
619 &
grid(ng) % rmask, &
620# endif
623# endif
624
625# if !defined ANA_DQDSST && defined QCORRECTION
626
627
628
629
630
631
632
634# if defined PIO_LIB && defined DISTRIBUTE
636# endif
638 & lbi, ubi, lbj, ubj, 2, 1, &
639# ifdef MASKING
640 &
grid(ng) % rmask, &
641# endif
644# endif
645
646# ifndef ANA_BTFLUX
647
648
649
650
651
654# if defined PIO_LIB && defined DISTRIBUTE
656# endif
658 & lbi, ubi, lbj, ubj, 2, 1, &
659# ifdef MASKING
660 &
grid(ng) % rmask, &
661# endif
664# endif
665
666# if defined SALINITY && !defined ANA_SSFLUX
667# if !(defined EMINUSP || defined FORWARD_FLUXES || \
668 defined frc_coupling || defined srelaxation)
669
670
671
672
673
675# if defined PIO_LIB && defined DISTRIBUTE
677# endif
679 & lbi, ubi, lbj, ubj, 2, 1, &
680# ifdef MASKING
681 &
grid(ng) % rmask, &
682# endif
685
686# elif (defined EMINUSP || defined FORWARD_FLUXES || \
687 defined frc_coupling)
688
689
690
691
692
694# if defined PIO_LIB && defined DISTRIBUTE
696# endif
697 & 1,
blk(ng), update(1), &
698 & lbi, ubi, lbj, ubj, 2, 1, &
699# ifdef MASKING
700 &
grid(ng) % rmask, &
701# endif
704# endif
705
706# if !defined ANA_SSS && (defined SCORRECTION || defined SRELAXATION)
707
708
709
710
711
713# if defined PIO_LIB && defined DISTRIBUTE
715# endif
717 & lbi, ubi, lbj, ubj, 2, 1, &
718# ifdef MASKING
719 &
grid(ng) % rmask, &
720# endif
723# endif
724
725# ifndef ANA_BSFLUX
726
727
728
729
730
733# if defined PIO_LIB && defined DISTRIBUTE
735# endif
737 & lbi, ubi, lbj, ubj, 2, 1, &
738# ifdef MASKING
739 &
grid(ng) % rmask, &
740# endif
743# endif
744# endif
745
746# if defined BIOLOGY || defined SEDIMENT || defined T_PASSIVE
747# ifndef ANA_SPFLUX
748
749
750
751
752
755# if defined PIO_LIB && defined DISTRIBUTE
757# endif
759 & lbi, ubi, lbj, ubj, 2, 1, &
760# ifdef MASKING
761 &
grid(ng) % rmask, &
762# endif
763 &
forces(ng) % stfluxG(:,:,:,i))
765 END DO
766# endif
767
768# ifndef ANA_BPFLUX
769
770
771
772
773
776# if defined PIO_LIB && defined DISTRIBUTE
778# endif
780 & lbi, ubi, lbj, ubj, 2, 1, &
781# ifdef MASKING
782 &
grid(ng) % rmask, &
783# endif
784 &
forces(ng) % btfluxG(:,:,:,i))
786 END DO
787# endif
788# endif
789# endif
790
791
792
793
794
795# ifndef ANA_FSOBC
796
801# if defined PIO_LIB && defined DISTRIBUTE
803# endif
805 & recordless, update(1), &
806 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
809 END IF
810
814# if defined PIO_LIB && defined DISTRIBUTE
816# endif
818 & recordless, update(1), &
819 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
822 END IF
823
827# if defined PIO_LIB && defined DISTRIBUTE
829# endif
831 & recordless, update(1), &
832 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
835 END IF
836
840# if defined PIO_LIB && defined DISTRIBUTE
842# endif
844 & recordless, update(1), &
845 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
848 END IF
849 END IF
850# endif
851
852# ifndef ANA_M2OBC
853
858# if defined PIO_LIB && defined DISTRIBUTE
860# endif
862 & recordless, update(1), &
863 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
866 END IF
867
871# if defined PIO_LIB && defined DISTRIBUTE
873# endif
875 & recordless, update(1), &
876 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
879 END IF
880
884# if defined PIO_LIB && defined DISTRIBUTE
886# endif
888 & recordless, update(1), &
889 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
892 END IF
893
897# if defined PIO_LIB && defined DISTRIBUTE
899# endif
901 & recordless, update(1), &
902 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
905 END IF
906
910# if defined PIO_LIB && defined DISTRIBUTE
912# endif
914 & recordless, update(1), &
915 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
918 END IF
919
923# if defined PIO_LIB && defined DISTRIBUTE
925# endif
927 & recordless, update(1), &
928 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
931 END IF
932
936# if defined PIO_LIB && defined DISTRIBUTE
938# endif
940 & recordless, update(1), &
941 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
944 END IF
945
949# if defined PIO_LIB && defined DISTRIBUTE
951# endif
953 & recordless, update(1), &
954 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
957 END IF
958 END IF
959# endif
960
961# ifdef SOLVE3D
962# ifndef ANA_M3OBC
963
968# if defined PIO_LIB && defined DISTRIBUTE
970# endif
972 & recordless, update(1), &
973 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
976 END IF
977
981# if defined PIO_LIB && defined DISTRIBUTE
983# endif
985 & recordless, update(1), &
986 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
989 END IF
990
994# if defined PIO_LIB && defined DISTRIBUTE
996# endif
998 & recordless, update(1), &
999 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1002 END IF
1003
1007# if defined PIO_LIB && defined DISTRIBUTE
1009# endif
1011 & recordless, update(1), &
1012 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
1015 END IF
1016
1020# if defined PIO_LIB && defined DISTRIBUTE
1022# endif
1024 & recordless, update(1), &
1025 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1028 END IF
1029
1033# if defined PIO_LIB && defined DISTRIBUTE
1035# endif
1037 & recordless, update(1), &
1038 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1041 END IF
1042
1046# if defined PIO_LIB && defined DISTRIBUTE
1048# endif
1050 & recordless, update(1), &
1051 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1054 END IF
1055
1059# if defined PIO_LIB && defined DISTRIBUTE
1061# endif
1063 & recordless, update(1), &
1064 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1067 END IF
1068 END IF
1069# endif
1070
1071# ifndef ANA_TOBC
1072
1078# if defined PIO_LIB && defined DISTRIBUTE
1080# endif
1082 & recordless, update(1), &
1083 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1086 END IF
1087 END DO
1088
1093# if defined PIO_LIB && defined DISTRIBUTE
1095# endif
1097 & recordless, update(1), &
1098 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1101 END IF
1102 END DO
1103
1108# if defined PIO_LIB && defined DISTRIBUTE
1110# endif
1112 & recordless, update(1), &
1113 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1114 &
boundary(ng) % tG_south(:,:,:,i))
1116 END IF
1117 END DO
1118
1123# if defined PIO_LIB && defined DISTRIBUTE
1125# endif
1127 & recordless, update(1), &
1128 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1129 &
boundary(ng) % tG_north(:,:,:,i))
1131 END IF
1132 END DO
1133 END IF
1134# endif
1135# endif
1136
1137
1138
1139
1140
1141# ifndef ANA_SSH
1142
1143
1144
1147# if defined PIO_LIB && defined DISTRIBUTE
1149# endif
1151 & lbi, ubi, lbj, ubj, 2, 1, &
1152# ifdef MASKING
1153 &
grid(ng) % rmask, &
1154# endif
1157 END IF
1158# endif
1159# ifndef ANA_M2CLIMA
1160
1161
1162
1165# if defined PIO_LIB && defined DISTRIBUTE
1167# endif
1169 & lbi, ubi, lbj, ubj, 2, 1, &
1170# ifdef MASKING
1171 &
grid(ng) % umask, &
1172# endif
1173 &
clima(ng) % ubarclmG)
1175
1177# if defined PIO_LIB && defined DISTRIBUTE
1179# endif
1181 & lbi, ubi, lbj, ubj, 2, 1, &
1182# ifdef MASKING
1183 &
grid(ng) % vmask, &
1184# endif
1185 &
clima(ng) % vbarclmG)
1187 END IF
1188# endif
1189# ifdef SOLVE3D
1190# ifndef ANA_M3CLIMA
1191
1192
1193
1196# if defined PIO_LIB && defined DISTRIBUTE
1198# endif
1200 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1201# ifdef MASKING
1202 &
grid(ng) % umask, &
1203# endif
1204 &
clima(ng) % uclmG)
1206
1208# if defined PIO_LIB && defined DISTRIBUTE
1210# endif
1212 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1213# ifdef MASKING
1214 &
grid(ng) % vmask, &
1215# endif
1216 &
clima(ng) % vclmG)
1218 END IF
1219# endif
1220# ifndef ANA_TCLIMA
1221
1222
1223
1224 ic=0
1227 ic=ic+1
1230# if defined PIO_LIB && defined DISTRIBUTE
1232# endif
1234 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1235# ifdef MASKING
1236 &
grid(ng) % rmask, &
1237# endif
1238 &
clima(ng) % tclmG(:,:,:,:,ic))
1240 END IF
1241 END DO
1242# endif
1243# endif
1244
1245# ifdef FORWARD_READ
1246
1247
1248
1249
1250
1251
1252
1254# if defined PIO_LIB && defined DISTRIBUTE
1255 &
fwd(ng)%pioFile, &
1256# endif
1257 & 1,
fwd(ng), update(1), &
1258 & lbi, ubi, lbj, ubj, 2, 1, &
1259# ifdef MASKING
1260 &
grid(ng) % rmask, &
1261# endif
1262 &
ocean(ng) % zetaG)
1264
1265
1266
1268# if defined PIO_LIB && defined DISTRIBUTE
1269 &
fwd(ng)%pioFile, &
1270# endif
1271 & 1,
fwd(ng), update(1), &
1272 & lbi, ubi, lbj, ubj, 2, 1, &
1273# ifdef MASKING
1274 &
grid(ng) % umask, &
1275# endif
1276 &
ocean(ng) % ubarG)
1278
1280# if defined PIO_LIB && defined DISTRIBUTE
1281 &
fwd(ng)%pioFile, &
1282# endif
1283 & 1,
fwd(ng), update(1), &
1284 & lbi, ubi, lbj, ubj, 2, 1, &
1285# ifdef MASKING
1286 &
grid(ng) % vmask, &
1287# endif
1288 &
ocean(ng) % vbarG)
1290
1291# ifdef FORWARD_RHS
1292
1293
1294
1296# if defined PIO_LIB && defined DISTRIBUTE
1297 &
fwd(ng)%pioFile, &
1298# endif
1299 & 1,
fwd(ng), update(1), &
1300 & lbi, ubi, lbj, ubj, 2, 1, &
1301# ifdef MASKING
1302 &
grid(ng) % rmask, &
1303# endif
1304 &
ocean(ng) % rzetaG)
1306
1308# if defined PIO_LIB && defined DISTRIBUTE
1309 &
fwd(ng)%pioFile, &
1310# endif
1311 & 1,
fwd(ng), update(1), &
1312 & lbi, ubi, lbj, ubj, 2, 1, &
1313# ifdef MASKING
1314 &
grid(ng) % umask, &
1315# endif
1316 &
ocean(ng) % rubarG)
1318
1320# if defined PIO_LIB && defined DISTRIBUTE
1321 &
fwd(ng)%pioFile, &
1322# endif
1323 & 1,
fwd(ng), update(1), &
1324 & lbi, ubi, lbj, ubj, 2, 1, &
1325# ifdef MASKING
1326 &
grid(ng) % vmask, &
1327# endif
1328 &
ocean(ng) % rvbarG)
1330# endif
1331
1332# ifdef SOLVE3D
1333
1334
1335
1337# if defined PIO_LIB && defined DISTRIBUTE
1338 &
fwd(ng)%pioFile, &
1339# endif
1340 & 1,
fwd(ng), update(1), &
1341 & lbi, ubi, lbj, ubj, 2, 1, &
1342# ifdef MASKING
1343 &
grid(ng) % umask, &
1344# endif
1347
1349# if defined PIO_LIB && defined DISTRIBUTE
1350 &
fwd(ng)%pioFile, &
1351# endif
1352 & 1,
fwd(ng), update(1), &
1353 & lbi, ubi, lbj, ubj, 2, 1, &
1354# ifdef MASKING
1355 &
grid(ng) % umask, &
1356# endif
1359
1361# if defined PIO_LIB && defined DISTRIBUTE
1362 &
fwd(ng)%pioFile, &
1363# endif
1364 & 1,
fwd(ng), update(1), &
1365 & lbi, ubi, lbj, ubj, 2, 1, &
1366# ifdef MASKING
1367 &
grid(ng) % vmask, &
1368# endif
1371
1373# if defined PIO_LIB && defined DISTRIBUTE
1374 &
fwd(ng)%pioFile, &
1375# endif
1376 & 1,
fwd(ng), update(1), &
1377 & lbi, ubi, lbj, ubj, 2, 1, &
1378# ifdef MASKING
1379 &
grid(ng) % vmask, &
1380# endif
1383
1384
1385
1387# if defined PIO_LIB && defined DISTRIBUTE
1388 &
fwd(ng)%pioFile, &
1389# endif
1390 & 1,
fwd(ng), update(1), &
1391 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1392# ifdef MASKING
1393 &
grid(ng) % umask, &
1394# endif
1397
1399# if defined PIO_LIB && defined DISTRIBUTE
1400 &
fwd(ng)%pioFile, &
1401# endif
1402 & 1,
fwd(ng), update(1), &
1403 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1404# ifdef MASKING
1405 &
grid(ng) % vmask, &
1406# endif
1409
1410# ifdef FORWARD_RHS
1411
1412
1413
1415# if defined PIO_LIB && defined DISTRIBUTE
1416 &
fwd(ng)%pioFile, &
1417# endif
1418 & 1,
fwd(ng), update(1), &
1419 & lbi, ubi, lbj, ubj, 2, 1, &
1420# ifdef MASKING
1421 &
grid(ng) % umask, &
1422# endif
1425
1427# if defined PIO_LIB && defined DISTRIBUTE
1428 &
fwd(ng)%pioFile, &
1429# endif
1430 & 1,
fwd(ng), update(1), &
1431 & lbi, ubi, lbj, ubj, 2, 1, &
1432# ifdef MASKING
1433 &
grid(ng) % vmask, &
1434# endif
1437
1439# if defined PIO_LIB && defined DISTRIBUTE
1440 &
fwd(ng)%pioFile, &
1441# endif
1442 & 1,
fwd(ng), update(1), &
1443 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1444# ifdef MASKING
1445 &
grid(ng) % umask, &
1446# endif
1449
1451# if defined PIO_LIB && defined DISTRIBUTE
1452 &
fwd(ng)%pioFile, &
1453# endif
1454 & 1,
fwd(ng), update(1), &
1455 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1456# ifdef MASKING
1457 &
grid(ng) % vmask, &
1458# endif
1461# endif
1462
1463
1464
1467# if defined PIO_LIB && defined DISTRIBUTE
1468 &
fwd(ng)%pioFile, &
1469# endif
1470 & 1,
fwd(ng), update(1), &
1471 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1472# ifdef MASKING
1473 &
grid(ng) % rmask, &
1474# endif
1475 &
ocean(ng) % tG(:,:,:,:,i))
1477 END DO
1478
1479# ifdef FORWARD_MIXING
1480
1481
1482
1487# if defined PIO_LIB && defined DISTRIBUTE
1488 &
fwd(ng)%pioFile, &
1489# endif
1490 & 1,
fwd(ng), update(1), &
1491 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1492# ifdef MASKING
1493 &
grid(ng) % rmask, &
1494# endif
1495 &
mixing(ng) % AktG(:,:,:,:,i))
1498 END DO
1499
1503# if defined PIO_LIB && defined DISTRIBUTE
1504 &
fwd(ng)%pioFile, &
1505# endif
1506 & 1,
fwd(ng), update(1), &
1507 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1508# ifdef MASKING
1509 &
grid(ng) % rmask, &
1510# endif
1514# endif
1515
1516# if defined MY25_MIXING_NOT_YET || defined GLS_MIXING_NOT_YET
1517
1518
1519
1521# if defined PIO_LIB && defined DISTRIBUTE
1522 &
fwd(ng)%pioFile, &
1523# endif
1524 & 1,
fwd(ng), update(1), &
1525 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1526# ifdef MASKING
1527 &
grid(ng) % rmask, &
1528# endif
1531
1532
1533
1535# if defined PIO_LIB && defined DISTRIBUTE
1536 &
fwd(ng)%pioFile, &
1537# endif
1538 & 1,
fwd(ng), update(1), &
1539 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1540# ifdef MASKING
1541 &
grid(ng) % rmask, &
1542# endif
1545
1546
1547
1549# if defined PIO_LIB && defined DISTRIBUTE
1550 &
fwd(ng)%pioFile, &
1551# endif
1552 & 1,
fwd(ng), update(1), &
1553 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1554# ifdef MASKING
1555 &
grid(ng) % rmask, &
1556# endif
1559
1560
1561
1563# if defined PIO_LIB && defined DISTRIBUTE
1564 &
fwd(ng)%pioFile, &
1565# endif
1566 & 1,
fwd(ng), update(1), &
1567 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1568# ifdef MASKING
1569 &
grid(ng) % rmask, &
1570# endif
1573
1574# ifdef GLS_MIXING_NOT_YET
1575
1576
1577
1579# if defined PIO_LIB && defined DISTRIBUTE
1580 &
fwd(ng)%pioFile, &
1581# endif
1582 & 1,
fwd(ng), update(1), &
1583 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1584# ifdef MASKING
1585 &
grid(ng) % rmask, &
1586# endif
1589# endif
1590# endif
1591
1592# ifdef LMD_MIXING_NOT_YET
1593
1594
1595
1597# if defined PIO_LIB && defined DISTRIBUTE
1598 &
fwd(ng)%pioFile, &
1599# endif
1600 & 1,
fwd(ng), update(1), &
1601 & lbi, ubi, lbj, ubj, 2, 1, &
1602# ifdef MASKING
1603 &
grid(ng) % rmask, &
1604# endif
1607# endif
1608
1609# ifdef LMD_BKPP_NOT_YET
1610
1611
1612
1614# if defined PIO_LIB && defined DISTRIBUTE
1615 &
fwd(ng)%pioFile, &
1616# endif
1617 & 1,
fwd(ng), update(1), &
1618 & lbi, ubi, lbj, ubj, 2, 1, &
1619# ifdef MASKING
1620 &
grid(ng) % rmask, &
1621# endif
1624# endif
1625
1626# ifdef LMD_NONLOCAL_NOT_YET
1627
1628
1629
1632# if defined PIO_LIB && defined DISTRIBUTE
1633 &
fwd(ng)%pioFile, &
1634# endif
1635 & 1,
fwd(ng), update(1), &
1636 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1637# ifdef MASKING
1638 &
grid(ng) % rmask, &
1639# endif
1640 &
mixing(ng) % ghatsG(:,:,:,i))
1642 END DO
1643# endif
1644# endif
1645
1646# ifdef WEAK_CONSTRAINT
1647
1648
1649
1650
1651
1654# if defined PIO_LIB && defined DISTRIBUTE
1655 &
tlf(ng)%pioFile, &
1656# endif
1657 & 1,
tlf(ng), update(1), &
1658 & lbi, ubi, lbj, ubj, 2, 1, &
1659# ifdef MASKING
1660 &
grid(ng) % rmask, &
1661# endif
1662 &
ocean(ng) % f_zetaG)
1664
1665# ifndef SOLVE3D
1666
1667
1668
1670# if defined PIO_LIB && defined DISTRIBUTE
1671 &
tlf(ng)%pioFile, &
1672# endif
1673 & 1,
tlf(ng), update(1), &
1674 & lbi, ubi, lbj, ubj, 2, 1, &
1675# ifdef MASKING
1676 &
grid(ng) % umask, &
1677# endif
1678 &
ocean(ng) % f_ubarG)
1680
1682# if defined PIO_LIB && defined DISTRIBUTE
1683 &
tlf(ng)%pioFile, &
1684# endif
1685 & 1,
tlf(ng), update(1), &
1686 & lbi, ubi, lbj, ubj, 2, 1, &
1687# ifdef MASKING
1688 &
grid(ng) % vmask, &
1689# endif
1690 &
ocean(ng) % f_vbarG)
1692# endif
1693
1694# ifdef SOLVE3D
1695
1696
1697
1699# if defined PIO_LIB && defined DISTRIBUTE
1700 &
tlf(ng)%pioFile, &
1701# endif
1702 & 1,
tlf(ng), update(1), &
1703 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1704# ifdef MASKING
1705 &
grid(ng) % umask, &
1706# endif
1709
1711# if defined PIO_LIB && defined DISTRIBUTE
1712 &
tlf(ng)%pioFile, &
1713# endif
1714 & 1,
tlf(ng), update(1), &
1715 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1716# ifdef MASKING
1717 &
grid(ng) % vmask, &
1718# endif
1721
1722
1723
1726# if defined PIO_LIB && defined DISTRIBUTE
1727 &
tlf(ng)%pioFile, &
1728# endif
1729 & 1,
tlf(ng), update(1), &
1730 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1731# ifdef MASKING
1732 &
grid(ng) % rmask, &
1733# endif
1734 &
ocean(ng) % f_tG(:,:,:,:,i))
1736 END DO
1737# endif
1738 END IF
1739# endif
1740# endif
1741
1742# ifdef PROFILE
1743
1744
1745
1746
1747
1749# endif
1750
1751 RETURN
subroutine get_2dfld(ng, model, ifield, ncid, piofile, nfiles, s, update, lbi, ubi, lbj, ubj, iout, irec, fmask, fout)
subroutine get_3dfld(ng, model, ifield, ncid, piofile, nfiles, s, update, lbi, ubi, lbj, ubj, lbk, ubk, iout, irec, fmask, fout)
subroutine get_ngfld(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
type(t_grid), dimension(:), allocatable grid
type(t_io), dimension(:), allocatable ssf
type(t_io), dimension(:), allocatable tlf
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(:), allocatable idttlf
integer, dimension(2) idghat
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
integer, dimension(:), allocatable n
type(t_bounds), dimension(:), allocatable bounds
type(t_lbc), dimension(:,:,:), allocatable tl_lbc
integer, dimension(:), allocatable lm
integer, dimension(:), allocatable nt
integer, dimension(:), allocatable mm
logical, dimension(:), allocatable luvsrc
logical, dimension(:,:), allocatable ltracersrc
logical, dimension(:), allocatable lprocessobc
logical, dimension(:), allocatable lm3clm
real(r8), dimension(:), allocatable tl_akv_fac
logical, dimension(:), allocatable lsshclm
logical, dimension(:), allocatable frequentimpulse
logical, dimension(:), allocatable lwsrc
integer, parameter isouth
logical, dimension(:), allocatable lm2clm
logical, dimension(:,:), allocatable ltracerclm
integer, parameter inorth
real(r8), dimension(:,:), allocatable tl_akt_fac
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)