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
633# if defined PIO_LIB && defined DISTRIBUTE
635# endif
637 & lbi, ubi, lbj, ubj, 2, 1, &
638# ifdef MASKING
639 &
grid(ng) % rmask, &
640# endif
643# endif
644
645# ifndef ANA_BTFLUX
646
647
648
649
650
653# if defined PIO_LIB && defined DISTRIBUTE
655# endif
657 & lbi, ubi, lbj, ubj, 2, 1, &
658# ifdef MASKING
659 &
grid(ng) % rmask, &
660# endif
663# endif
664
665# if defined SALINITY && !defined ANA_SSFLUX
666# if !(defined EMINUSP || defined FORWARD_FLUXES || \
667 defined frc_coupling || defined srelaxation)
668
669
670
671
672
674# if defined PIO_LIB && defined DISTRIBUTE
676# endif
678 & lbi, ubi, lbj, ubj, 2, 1, &
679# ifdef MASKING
680 &
grid(ng) % rmask, &
681# endif
684
685# elif (defined EMINUSP || defined FORWARD_FLUXES || \
686 defined frc_coupling)
687
688
689
690
691
693# if defined PIO_LIB && defined DISTRIBUTE
695# endif
696 & 1,
blk(ng), update(1), &
697 & lbi, ubi, lbj, ubj, 2, 1, &
698# ifdef MASKING
699 &
grid(ng) % rmask, &
700# endif
703# endif
704
705# if !defined ANA_SSS && (defined SCORRECTION || defined SRELAXATION)
706
707
708
709
710
712# if defined PIO_LIB && defined DISTRIBUTE
714# endif
716 & lbi, ubi, lbj, ubj, 2, 1, &
717# ifdef MASKING
718 &
grid(ng) % rmask, &
719# endif
722# endif
723
724# ifndef ANA_BSFLUX
725
726
727
728
729
732# if defined PIO_LIB && defined DISTRIBUTE
734# endif
736 & lbi, ubi, lbj, ubj, 2, 1, &
737# ifdef MASKING
738 &
grid(ng) % rmask, &
739# endif
742# endif
743# endif
744
745# if defined BIOLOGY || defined SEDIMENT || defined T_PASSIVE
746# ifndef ANA_SPFLUX
747
748
749
750
751
754# if defined PIO_LIB && defined DISTRIBUTE
756# endif
758 & lbi, ubi, lbj, ubj, 2, 1, &
759# ifdef MASKING
760 &
grid(ng) % rmask, &
761# endif
762 &
forces(ng) % stfluxG(:,:,:,i))
764 END DO
765# endif
766
767# ifndef ANA_BPFLUX
768
769
770
771
772
775# if defined PIO_LIB && defined DISTRIBUTE
777# endif
779 & lbi, ubi, lbj, ubj, 2, 1, &
780# ifdef MASKING
781 &
grid(ng) % rmask, &
782# endif
783 &
forces(ng) % btfluxG(:,:,:,i))
785 END DO
786# endif
787# endif
788# endif
789
790
791
792
793
794# ifndef ANA_FSOBC
795
800# if defined PIO_LIB && defined DISTRIBUTE
802# endif
804 & recordless, update(1), &
805 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
808 END IF
809
813# if defined PIO_LIB && defined DISTRIBUTE
815# endif
817 & recordless, update(1), &
818 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
821 END IF
822
826# if defined PIO_LIB && defined DISTRIBUTE
828# endif
830 & recordless, update(1), &
831 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
834 END IF
835
839# if defined PIO_LIB && defined DISTRIBUTE
841# endif
843 & recordless, update(1), &
844 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
847 END IF
848 END IF
849# endif
850
851# ifndef ANA_M2OBC
852
857# if defined PIO_LIB && defined DISTRIBUTE
859# endif
861 & recordless, update(1), &
862 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
865 END IF
866
870# if defined PIO_LIB && defined DISTRIBUTE
872# endif
874 & recordless, update(1), &
875 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
878 END IF
879
883# if defined PIO_LIB && defined DISTRIBUTE
885# endif
887 & recordless, update(1), &
888 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
891 END IF
892
896# if defined PIO_LIB && defined DISTRIBUTE
898# endif
900 & recordless, update(1), &
901 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
904 END IF
905
909# if defined PIO_LIB && defined DISTRIBUTE
911# endif
913 & recordless, update(1), &
914 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
917 END IF
918
922# if defined PIO_LIB && defined DISTRIBUTE
924# endif
926 & recordless, update(1), &
927 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
930 END IF
931
935# if defined PIO_LIB && defined DISTRIBUTE
937# endif
939 & recordless, update(1), &
940 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
943 END IF
944
948# if defined PIO_LIB && defined DISTRIBUTE
950# endif
952 & recordless, update(1), &
953 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
956 END IF
957 END IF
958# endif
959
960# ifdef SOLVE3D
961# ifndef ANA_M3OBC
962
967# if defined PIO_LIB && defined DISTRIBUTE
969# endif
971 & recordless, update(1), &
972 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
975 END IF
976
980# if defined PIO_LIB && defined DISTRIBUTE
982# endif
984 & recordless, update(1), &
985 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
988 END IF
989
993# if defined PIO_LIB && defined DISTRIBUTE
995# endif
997 & recordless, update(1), &
998 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1001 END IF
1002
1006# if defined PIO_LIB && defined DISTRIBUTE
1008# endif
1010 & recordless, update(1), &
1011 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
1014 END IF
1015
1019# if defined PIO_LIB && defined DISTRIBUTE
1021# endif
1023 & recordless, update(1), &
1024 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1027 END IF
1028
1032# if defined PIO_LIB && defined DISTRIBUTE
1034# endif
1036 & recordless, update(1), &
1037 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1040 END IF
1041
1045# if defined PIO_LIB && defined DISTRIBUTE
1047# endif
1049 & recordless, update(1), &
1050 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1053 END IF
1054
1058# if defined PIO_LIB && defined DISTRIBUTE
1060# endif
1062 & recordless, update(1), &
1063 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1066 END IF
1067 END IF
1068# endif
1069
1070# ifndef ANA_TOBC
1071
1077# if defined PIO_LIB && defined DISTRIBUTE
1079# endif
1081 & recordless, update(1), &
1082 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1085 END IF
1086 END DO
1087
1092# if defined PIO_LIB && defined DISTRIBUTE
1094# endif
1096 & recordless, update(1), &
1097 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1100 END IF
1101 END DO
1102
1107# if defined PIO_LIB && defined DISTRIBUTE
1109# endif
1111 & recordless, update(1), &
1112 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1113 &
boundary(ng) % tG_south(:,:,:,i))
1115 END IF
1116 END DO
1117
1122# if defined PIO_LIB && defined DISTRIBUTE
1124# endif
1126 & recordless, update(1), &
1127 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1128 &
boundary(ng) % tG_north(:,:,:,i))
1130 END IF
1131 END DO
1132 END IF
1133# endif
1134# endif
1135
1136
1137
1138
1139
1140# ifndef ANA_SSH
1141
1142
1143
1146# if defined PIO_LIB && defined DISTRIBUTE
1148# endif
1150 & lbi, ubi, lbj, ubj, 2, 1, &
1151# ifdef MASKING
1152 &
grid(ng) % rmask, &
1153# endif
1156 END IF
1157# endif
1158# ifndef ANA_M2CLIMA
1159
1160
1161
1164# if defined PIO_LIB && defined DISTRIBUTE
1166# endif
1168 & lbi, ubi, lbj, ubj, 2, 1, &
1169# ifdef MASKING
1170 &
grid(ng) % umask, &
1171# endif
1172 &
clima(ng) % ubarclmG)
1174
1176# if defined PIO_LIB && defined DISTRIBUTE
1178# endif
1180 & lbi, ubi, lbj, ubj, 2, 1, &
1181# ifdef MASKING
1182 &
grid(ng) % vmask, &
1183# endif
1184 &
clima(ng) % vbarclmG)
1186 END IF
1187# endif
1188# ifdef SOLVE3D
1189# ifndef ANA_M3CLIMA
1190
1191
1192
1195# if defined PIO_LIB && defined DISTRIBUTE
1197# endif
1199 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1200# ifdef MASKING
1201 &
grid(ng) % umask, &
1202# endif
1203 &
clima(ng) % uclmG)
1205
1207# if defined PIO_LIB && defined DISTRIBUTE
1209# endif
1211 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1212# ifdef MASKING
1213 &
grid(ng) % vmask, &
1214# endif
1215 &
clima(ng) % vclmG)
1217 END IF
1218# endif
1219# ifndef ANA_TCLIMA
1220
1221
1222
1223 ic=0
1226 ic=ic+1
1229# if defined PIO_LIB && defined DISTRIBUTE
1231# endif
1233 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1234# ifdef MASKING
1235 &
grid(ng) % rmask, &
1236# endif
1237 &
clima(ng) % tclmG(:,:,:,:,ic))
1239 END IF
1240 END DO
1241# endif
1242# endif
1243
1244# ifdef FORWARD_READ
1245
1246
1247
1248
1249
1250
1251
1253# if defined PIO_LIB && defined DISTRIBUTE
1254 &
fwd(ng)%pioFile, &
1255# endif
1256 & 1,
fwd(ng), update(1), &
1257 & lbi, ubi, lbj, ubj, 2, 1, &
1258# ifdef MASKING
1259 &
grid(ng) % rmask, &
1260# endif
1261 &
ocean(ng) % zetaG)
1263
1264
1265
1267# if defined PIO_LIB && defined DISTRIBUTE
1268 &
fwd(ng)%pioFile, &
1269# endif
1270 & 1,
fwd(ng), update(1), &
1271 & lbi, ubi, lbj, ubj, 2, 1, &
1272# ifdef MASKING
1273 &
grid(ng) % umask, &
1274# endif
1275 &
ocean(ng) % ubarG)
1277
1279# if defined PIO_LIB && defined DISTRIBUTE
1280 &
fwd(ng)%pioFile, &
1281# endif
1282 & 1,
fwd(ng), update(1), &
1283 & lbi, ubi, lbj, ubj, 2, 1, &
1284# ifdef MASKING
1285 &
grid(ng) % vmask, &
1286# endif
1287 &
ocean(ng) % vbarG)
1289
1290# ifdef FORWARD_RHS
1291
1292
1293
1295# if defined PIO_LIB && defined DISTRIBUTE
1296 &
fwd(ng)%pioFile, &
1297# endif
1298 & 1,
fwd(ng), update(1), &
1299 & lbi, ubi, lbj, ubj, 2, 1, &
1300# ifdef MASKING
1301 &
grid(ng) % rmask, &
1302# endif
1303 &
ocean(ng) % rzetaG)
1305
1307# if defined PIO_LIB && defined DISTRIBUTE
1308 &
fwd(ng)%pioFile, &
1309# endif
1310 & 1,
fwd(ng), update(1), &
1311 & lbi, ubi, lbj, ubj, 2, 1, &
1312# ifdef MASKING
1313 &
grid(ng) % umask, &
1314# endif
1315 &
ocean(ng) % rubarG)
1317
1319# if defined PIO_LIB && defined DISTRIBUTE
1320 &
fwd(ng)%pioFile, &
1321# endif
1322 & 1,
fwd(ng), update(1), &
1323 & lbi, ubi, lbj, ubj, 2, 1, &
1324# ifdef MASKING
1325 &
grid(ng) % vmask, &
1326# endif
1327 &
ocean(ng) % rvbarG)
1329# endif
1330
1331# ifdef SOLVE3D
1332
1333
1334
1336# if defined PIO_LIB && defined DISTRIBUTE
1337 &
fwd(ng)%pioFile, &
1338# endif
1339 & 1,
fwd(ng), update(1), &
1340 & lbi, ubi, lbj, ubj, 2, 1, &
1341# ifdef MASKING
1342 &
grid(ng) % umask, &
1343# endif
1346
1348# if defined PIO_LIB && defined DISTRIBUTE
1349 &
fwd(ng)%pioFile, &
1350# endif
1351 & 1,
fwd(ng), update(1), &
1352 & lbi, ubi, lbj, ubj, 2, 1, &
1353# ifdef MASKING
1354 &
grid(ng) % umask, &
1355# endif
1358
1360# if defined PIO_LIB && defined DISTRIBUTE
1361 &
fwd(ng)%pioFile, &
1362# endif
1363 & 1,
fwd(ng), update(1), &
1364 & lbi, ubi, lbj, ubj, 2, 1, &
1365# ifdef MASKING
1366 &
grid(ng) % vmask, &
1367# endif
1370
1372# if defined PIO_LIB && defined DISTRIBUTE
1373 &
fwd(ng)%pioFile, &
1374# endif
1375 & 1,
fwd(ng), update(1), &
1376 & lbi, ubi, lbj, ubj, 2, 1, &
1377# ifdef MASKING
1378 &
grid(ng) % vmask, &
1379# endif
1382
1383
1384
1386# if defined PIO_LIB && defined DISTRIBUTE
1387 &
fwd(ng)%pioFile, &
1388# endif
1389 & 1,
fwd(ng), update(1), &
1390 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1391# ifdef MASKING
1392 &
grid(ng) % umask, &
1393# endif
1396
1398# if defined PIO_LIB && defined DISTRIBUTE
1399 &
fwd(ng)%pioFile, &
1400# endif
1401 & 1,
fwd(ng), update(1), &
1402 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1403# ifdef MASKING
1404 &
grid(ng) % vmask, &
1405# endif
1408
1409# ifdef FORWARD_RHS
1410
1411
1412
1414# if defined PIO_LIB && defined DISTRIBUTE
1415 &
fwd(ng)%pioFile, &
1416# endif
1417 & 1,
fwd(ng), update(1), &
1418 & lbi, ubi, lbj, ubj, 2, 1, &
1419# ifdef MASKING
1420 &
grid(ng) % umask, &
1421# endif
1424
1426# if defined PIO_LIB && defined DISTRIBUTE
1427 &
fwd(ng)%pioFile, &
1428# endif
1429 & 1,
fwd(ng), update(1), &
1430 & lbi, ubi, lbj, ubj, 2, 1, &
1431# ifdef MASKING
1432 &
grid(ng) % vmask, &
1433# endif
1436
1438# if defined PIO_LIB && defined DISTRIBUTE
1439 &
fwd(ng)%pioFile, &
1440# endif
1441 & 1,
fwd(ng), update(1), &
1442 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1443# ifdef MASKING
1444 &
grid(ng) % umask, &
1445# endif
1448
1450# if defined PIO_LIB && defined DISTRIBUTE
1451 &
fwd(ng)%pioFile, &
1452# endif
1453 & 1,
fwd(ng), update(1), &
1454 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1455# ifdef MASKING
1456 &
grid(ng) % vmask, &
1457# endif
1460# endif
1461
1462
1463
1466# if defined PIO_LIB && defined DISTRIBUTE
1467 &
fwd(ng)%pioFile, &
1468# endif
1469 & 1,
fwd(ng), update(1), &
1470 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1471# ifdef MASKING
1472 &
grid(ng) % rmask, &
1473# endif
1474 &
ocean(ng) % tG(:,:,:,:,i))
1476 END DO
1477
1478# ifdef FORWARD_MIXING
1479
1480
1481
1486# if defined PIO_LIB && defined DISTRIBUTE
1487 &
fwd(ng)%pioFile, &
1488# endif
1489 & 1,
fwd(ng), update(1), &
1490 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1491# ifdef MASKING
1492 &
grid(ng) % rmask, &
1493# endif
1494 &
mixing(ng) % AktG(:,:,:,:,i))
1497 END DO
1498
1502# if defined PIO_LIB && defined DISTRIBUTE
1503 &
fwd(ng)%pioFile, &
1504# endif
1505 & 1,
fwd(ng), update(1), &
1506 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1507# ifdef MASKING
1508 &
grid(ng) % rmask, &
1509# endif
1513# endif
1514
1515# if defined MY25_MIXING_NOT_YET || defined GLS_MIXING_NOT_YET
1516
1517
1518
1520# if defined PIO_LIB && defined DISTRIBUTE
1521 &
fwd(ng)%pioFile, &
1522# endif
1523 & 1,
fwd(ng), update(1), &
1524 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1525# ifdef MASKING
1526 &
grid(ng) % rmask, &
1527# endif
1530
1531
1532
1534# if defined PIO_LIB && defined DISTRIBUTE
1535 &
fwd(ng)%pioFile, &
1536# endif
1537 & 1,
fwd(ng), update(1), &
1538 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1539# ifdef MASKING
1540 &
grid(ng) % rmask, &
1541# endif
1544
1545
1546
1548# if defined PIO_LIB && defined DISTRIBUTE
1549 &
fwd(ng)%pioFile, &
1550# endif
1551 & 1,
fwd(ng), update(1), &
1552 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1553# ifdef MASKING
1554 &
grid(ng) % rmask, &
1555# endif
1558
1559
1560
1562# if defined PIO_LIB && defined DISTRIBUTE
1563 &
fwd(ng)%pioFile, &
1564# endif
1565 & 1,
fwd(ng), update(1), &
1566 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1567# ifdef MASKING
1568 &
grid(ng) % rmask, &
1569# endif
1572
1573# ifdef GLS_MIXING_NOT_YET
1574
1575
1576
1578# if defined PIO_LIB && defined DISTRIBUTE
1579 &
fwd(ng)%pioFile, &
1580# endif
1581 & 1,
fwd(ng), update(1), &
1582 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1583# ifdef MASKING
1584 &
grid(ng) % rmask, &
1585# endif
1588# endif
1589# endif
1590
1591# ifdef LMD_MIXING_NOT_YET
1592
1593
1594
1596# if defined PIO_LIB && defined DISTRIBUTE
1597 &
fwd(ng)%pioFile, &
1598# endif
1599 & 1,
fwd(ng), update(1), &
1600 & lbi, ubi, lbj, ubj, 2, 1, &
1601# ifdef MASKING
1602 &
grid(ng) % rmask, &
1603# endif
1606# endif
1607
1608# ifdef LMD_BKPP_NOT_YET
1609
1610
1611
1613# if defined PIO_LIB && defined DISTRIBUTE
1614 &
fwd(ng)%pioFile, &
1615# endif
1616 & 1,
fwd(ng), update(1), &
1617 & lbi, ubi, lbj, ubj, 2, 1, &
1618# ifdef MASKING
1619 &
grid(ng) % rmask, &
1620# endif
1623# endif
1624
1625# ifdef LMD_NONLOCAL_NOT_YET
1626
1627
1628
1631# if defined PIO_LIB && defined DISTRIBUTE
1632 &
fwd(ng)%pioFile, &
1633# endif
1634 & 1,
fwd(ng), update(1), &
1635 & lbi, ubi, lbj, ubj, 0,
n(ng), 2, 1, &
1636# ifdef MASKING
1637 &
grid(ng) % rmask, &
1638# endif
1639 &
mixing(ng) % ghatsG(:,:,:,i))
1641 END DO
1642# endif
1643# endif
1644
1645# if defined R4DVAR || defined R4DVAR_ANA_SENSITIVITY || \
1646 defined tl_r4dvar
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)