3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
22#if defined HYPOXIA_SRM || defined RED_TIDE
24#endif
31#if defined HYPOXIA_SRM || \
32 defined nlm_outer || \
33 defined rbl4dvar || \
34 defined rbl4dvar_ana_sensitivity || \
35 defined rbl4dvar_fct_sensitivity || \
36 defined red_tide || \
37 defined sp4dvar || \
38 defined tlm_check || \
39 defined tl_rbl4dvar
41#endif
45
47
48 implicit none
49
50
51
52 integer, intent(in) :: ng
53
54
55
56 logical :: Lprocess
57
58 logical, save :: recordless = .false.
59
60 logical, dimension(3) :: update = (/ .false., .false., .false. /)
61
62 integer :: ILB, IUB, JLB, JUB
63 integer :: LBi, UBi, LBj, UBj
64 integer :: i, ic, my_tile
65
66 character (len=*), parameter :: MyFile = &
67 & __FILE__
68
69
70
71 my_tile=-1
72 ilb=
bounds(ng)%LBi(my_tile)
73 iub=
bounds(ng)%UBi(my_tile)
74 jlb=
bounds(ng)%LBj(my_tile)
75 jub=
bounds(ng)%UBj(my_tile)
76
77
78
79 lbi=lbound(
grid(ng)%h,dim=1)
80 ubi=ubound(
grid(ng)%h,dim=1)
81 lbj=lbound(
grid(ng)%h,dim=2)
82 ubj=ubound(
grid(ng)%h,dim=2)
83
84#ifdef PROFILE
85
86
87
88
89
91#endif
92
93#ifndef ANA_PSOURCE
94
95
96
97
98
99
100
103# if defined PIO_LIB && defined DISTRIBUTE
105# endif
106 & 1,
ssf(ng), recordless, update(1), &
107 & 1,
nsrc(ng), 1, 2, 1,
nsrc(ng), 1, &
110 END IF
111
112# ifdef SOLVE3D
113
114
115
119# if defined PIO_LIB && defined DISTRIBUTE
121# endif
122 & 1,
ssf(ng), recordless, update(1), &
123 & 1,
nsrc(ng),
n(ng), 2, 1,
nsrc(ng),
n(ng), &
124 &
sources(ng) % TsrcG(:,:,:,i))
126 END IF
127 END DO
128# endif
129#endif
130
131
132
133
134
135
136
137#if defined FOUR_DVAR && \
138 defined bulk_fluxes && defined prior_bulk_fluxes
139
140
141
142
143
145 lprocess=.true.
146 ELSE
147 lprocess=.false.
148 END IF
149#else
150 lprocess=.true.
151#endif
152
153#if !(defined ANA_WINDS || defined FRC_COUPLING) && \
154 (defined bulk_fluxes || defined ecosim)
155
156
157
158 IF (lprocess) THEN
160# if defined PIO_LIB && defined DISTRIBUTE
162# endif
164 & lbi, ubi, lbj, ubj, 2, 1, &
165# ifdef MASKING
166 &
grid(ng) % rmask, &
167# endif
170
172# if defined PIO_LIB && defined DISTRIBUTE
174# endif
176 & lbi, ubi, lbj, ubj, 2, 1, &
177# ifdef MASKING
178 &
grid(ng) % rmask, &
179# endif
182 END IF
183#endif
184
185#if !(defined ANA_SMFLUX || defined FRC_COUPLING || defined BULK_FLUXES)
186
187
188
189 IF (lprocess) THEN
191# if defined PIO_LIB && defined DISTRIBUTE
193# endif
195 & lbi, ubi, lbj, ubj, 2, 1, &
196# ifdef MASKING
197 &
grid(ng) % umask, &
198# endif
201
203# if defined PIO_LIB && defined DISTRIBUTE
205# endif
207 & lbi, ubi, lbj, ubj, 2, 1, &
208# ifdef MASKING
209 &
grid(ng) % vmask, &
210# endif
213 END IF
214#endif
215
216#if !(defined ANA_PAIR || defined FRC_COUPLING) && \
217 (defined bulk_fluxes || defined ecosim || defined atm_press)
218
219
220
221 IF (lprocess) THEN
223# if defined PIO_LIB && defined DISTRIBUTE
225# endif
227 & lbi, ubi, lbj, ubj, 2, 1, &
228# ifdef MASKING
229 &
grid(ng) % rmask, &
230# endif
233 END IF
234#endif
235
236#if !defined ANA_WWAVE && defined WAVE_DATA
237
238
239
240# ifdef WAVES_DIR
242# if defined PIO_LIB && defined DISTRIBUTE
244# endif
246 & lbi, ubi, lbj, ubj, 2, 1, &
247# ifdef MASKING
248 &
grid(ng) % rmask, &
249# endif
252# endif
253
254# ifdef WAVES_DIRP
255
257# if defined PIO_LIB && defined DISTRIBUTE
259# endif
261 & lbi, ubi, lbj, ubj, 2, 1, &
262# ifdef MASKING
263 &
grid(ng) % rmask, &
264# endif
267# endif
268
269# ifdef WAVES_HEIGHT
270
272# if defined PIO_LIB && defined DISTRIBUTE
274# endif
276 & lbi, ubi, lbj, ubj, 2, 1, &
277# ifdef MASKING
278 &
grid(ng) % rmask, &
279# endif
282# endif
283
284# ifdef WAVES_LENGTH
285
287# if defined PIO_LIB && defined DISTRIBUTE
289# endif
291 & lbi, ubi, lbj, ubj, 2, 1, &
292# ifdef MASKING
293 &
grid(ng) % rmask, &
294# endif
297# endif
298
299# ifdef WAVES_LENGTHP
300
302# if defined PIO_LIB && defined DISTRIBUTE
304# endif
306 & lbi, ubi, lbj, ubj, 2, 1, &
307# ifdef MASKING
308 &
grid(ng) % rmask, &
309# endif
312# endif
313
314# ifdef WAVES_TOP_PERIOD
315
317# if defined PIO_LIB && defined DISTRIBUTE
319# endif
321 & lbi, ubi, lbj, ubj, 2, 1, &
322# ifdef MASKING
323 &
grid(ng) % rmask, &
324# endif
325 &
forces(ng) % Pwave_topG)
327# endif
328
329# ifdef WAVES_BOT_PERIOD
330
332# if defined PIO_LIB && defined DISTRIBUTE
334# endif
336 & lbi, ubi, lbj, ubj, 2, 1, &
337# ifdef MASKING
338 &
grid(ng) % rmask, &
339# endif
340 &
forces(ng) % Pwave_botG(:,:,1))
342# endif
343
344# ifdef WAVES_UB
345
347# if defined PIO_LIB && defined DISTRIBUTE
349# endif
351 & lbi, ubi, lbj, ubj, 2, 1, &
352# ifdef MASKING
353 &
grid(ng) % rmask, &
354# endif
355 &
forces(ng) % Uwave_rmsG)
357# endif
358
359# ifdef WAVES_DISS
360
362# if defined PIO_LIB && defined DISTRIBUTE
364# endif
366 & lbi, ubi, lbj, ubj, 2, 1, &
367# ifdef MASKING
368 &
grid(ng) % rmask, &
369# endif
370 &
forces(ng) % Dissip_breakG)
372
374# if defined PIO_LIB && defined DISTRIBUTE
376# endif
378 & lbi, ubi, lbj, ubj, 2, 1, &
379# ifdef MASKING
380 &
grid(ng) % rmask, &
381# endif
382 &
forces(ng) % Dissip_wcapG)
384# endif
385
386# ifdef ROLLER_SVENDSEN
387
389# if defined PIO_LIB && defined DISTRIBUTE
391# endif
393 & lbi, ubi, lbj, ubj, 2, 1, &
394# ifdef MASKING
395 &
grid(ng) % rmask, &
396# endif
397 &
forces(ng) % Wave_breakG)
399# endif
400#endif
401
402#ifdef SOLVE3D
403
404# if !(defined ANA_CLOUD || defined FRC_COUPLING) && defined CLOUDS
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 ANA_SRFLUX || defined FRC_COUPLING) && defined SHORTWAVE
422
423
424
425 IF (lprocess) THEN
427# if defined PIO_LIB && defined DISTRIBUTE
429# endif
431 & lbi, ubi, lbj, ubj, 2, 1, &
432# ifdef MASKING
433 &
grid(ng) % rmask, &
434# endif
437 END IF
438# endif
439
440# if defined RED_TIDE && defined DAILY_SHORTWAVE
441
442
443
445# if defined PIO_LIB && defined DISTRIBUTE
447# endif
449 & lbi, ubi, lbj, ubj, 2, 1, &
450# ifdef MASKING
451 &
grid(ng) % rmask, &
452# endif
453 &
forces(ng) % srflxG_avg)
455# endif
456
457# if defined BULK_FLUXES && \
458
459
460
461
462 IF (lprocess) THEN
464# if defined PIO_LIB && defined DISTRIBUTE
466# endif
468 & lbi, ubi, lbj, ubj, 2, 1, &
469# ifdef MASKING
470 &
grid(ng) % rmask, &
471# endif
474 END IF
475# endif
476
477# if defined BULK_FLUXES && defined LONGWAVE_OUT && \
478
479
480
481
482 IF (lprocess) THEN
484# if defined PIO_LIB && defined DISTRIBUTE
486# endif
488 & lbi, ubi, lbj, ubj, 2, 1, &
489# ifdef MASKING
490 &
grid(ng) % rmask, &
491# endif
494 END IF
495# endif
496
497# if !(defined ANA_TAIR || defined FRC_COUPLING) && \
498 ( defined bulk_fluxes || defined ecosim || \
499 (defined shortwave && defined ana_srflux && defined albedo) )
500
501
502
503 IF (lprocess) THEN
505# if defined PIO_LIB && defined DISTRIBUTE
507# endif
509 & lbi, ubi, lbj, ubj, 2, 1, &
510# ifdef MASKING
511 &
grid(ng) % rmask, &
512# endif
515 END IF
516# endif
517
518# if !(defined ANA_HUMIDITY || defined FRC_COUPLING) && \
519 (defined bulk_fluxes || defined ecosim)
520
521
522
523 IF (lprocess) THEN
525# if defined PIO_LIB && defined DISTRIBUTE
527# endif
529 & lbi, ubi, lbj, ubj, 2, 1, &
530# ifdef MASKING
531 &
grid(ng) % rmask, &
532# endif
535 END IF
536# endif
537
538# if !(defined ANA_RAIN || defined FRC_COUPLING) && defined BULK_FLUXES
539
540
541
542 IF (lprocess) THEN
544# if defined PIO_LIB && defined DISTRIBUTE
546# endif
548 & lbi, ubi, lbj, ubj, 2, 1, &
549# ifdef MASKING
550 &
grid(ng) % rmask, &
551# endif
554 END IF
555# endif
556
557# if !(defined ANA_STFLUX || defined FRC_COUPLING || \
558 defined bulk_fluxes)
559
560
561
562 IF (lprocess) THEN
565# if defined PIO_LIB && defined DISTRIBUTE
567# endif
569 & lbi, ubi, lbj, ubj, 2, 1, &
570# ifdef MASKING
571 &
grid(ng) % rmask, &
572# endif
575 END IF
576# endif
577
578# if !defined ANA_SST && defined QCORRECTION
579
580
581
582
584# if defined PIO_LIB && defined DISTRIBUTE
586# endif
588 & lbi, ubi, lbj, ubj, 2, 1, &
589# ifdef MASKING
590 &
grid(ng) % rmask, &
591# endif
594# endif
595
596# if !defined ANA_DQDSST && defined QCORRECTION
597
598
599
600
602# if defined PIO_LIB && defined DISTRIBUTE
604# endif
606 & lbi, ubi, lbj, ubj, 2, 1, &
607# ifdef MASKING
608 &
grid(ng) % rmask, &
609# endif
612# endif
613
614# ifndef ANA_BTFLUX
615
616
617
620# if defined PIO_LIB && defined DISTRIBUTE
622# endif
624 & lbi, ubi, lbj, ubj, 2, 1, &
625# ifdef MASKING
626 &
grid(ng) % rmask, &
627# endif
630# endif
631
632# if !defined ANA_SSFLUX && defined SALINITY
633# if !(defined BULK_FLUXES || defined EMINUSP || \
634 defined frc_coupling)
635
636
637
638 IF (lprocess) THEN
640# if defined PIO_LIB && defined DISTRIBUTE
642# endif
644 & lbi, ubi, lbj, ubj, 2, 1, &
645# ifdef MASKING
646 &
grid(ng) % rmask, &
647# endif
650 END IF
651
652# elif defined BULK_FLUXES && !defined EMINUSP
653
654
655
656 IF (lprocess) THEN
658# if defined PIO_LIB && defined DISTRIBUTE
660# endif
662 & lbi, ubi, lbj, ubj, 2, 1, &
663# ifdef MASKING
664 &
grid(ng) % rmask, &
665# endif
668 END IF
669# endif
670
671# if !defined ANA_SSS && (defined SCORRECTION || defined SRELAXATION)
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# endif
687
688# ifndef ANA_BSFLUX
689
690
691
694# if defined PIO_LIB && defined DISTRIBUTE
696# endif
698 & lbi, ubi, lbj, ubj, 2, 1, &
699# ifdef MASKING
700 &
grid(ng) % rmask, &
701# endif
704# endif
705# endif
706
707# if defined BIOLOGY || defined SEDIMENT || defined T_PASSIVE
708# ifndef ANA_SPFLUX
709
710
711
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
722 &
forces(ng) % stfluxG(:,:,:,i))
724 END DO
725# endif
726
727# ifndef ANA_BPFLUX
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
741 &
forces(ng) % btfluxG(:,:,:,i))
743 END DO
744# endif
745# endif
746#endif
747
748#if !defined ANA_RESPIRATION && defined HYPOXIA_SRM
749
750
751
753# if defined PIO_LIB && defined DISTRIBUTE
755# endif
757 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
758# ifdef MASKING
759 &
grid(ng) % rmask, &
760# endif
761 &
ocean(ng) % respirationG)
763#endif
764
765#ifdef RED_TIDE
766
767
768
770# if defined PIO_LIB && defined DISTRIBUTE
772# endif
774 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
775# ifdef MASKING
776 &
grid(ng) % rmask, &
777# endif
778 &
ocean(ng) % DIN_obsG)
780#endif
781
782#if defined FOUR_DVAR && \
783 defined bulk_fluxes && defined prior_bulk_fluxes
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798 IF (.not.lprocess) THEN
799
800
801
803# if defined PIO_LIB && defined DISTRIBUTE
805# endif
806 & 1,
blk(ng), update(1), &
807 & lbi, ubi, lbj, ubj, 2, 1, &
808# ifdef MASKING
809 &
grid(ng) % umask, &
810# endif
813
815# if defined PIO_LIB && defined DISTRIBUTE
817# endif
818 & 1,
blk(ng), update(1), &
819 & lbi, ubi, lbj, ubj, 2, 1, &
820# ifdef MASKING
821 &
grid(ng) % vmask, &
822# endif
825
826# ifdef ATM_PRESS
827
828
829
831# if defined PIO_LIB && defined DISTRIBUTE
833# endif
834 & 1,
blk(ng), update(1), &
835 & lbi, ubi, lbj, ubj, 2, 1, &
836# ifdef MASKING
837 &
grid(ng) % rmask, &
838# endif
841# endif
842
843# ifdef SOLVE3D
844# ifdef SHORTWAVE
845
846
847
848
849
851# if defined PIO_LIB && defined DISTRIBUTE
853# endif
854 & 1,
blk(ng), update(1), &
855 & lbi, ubi, lbj, ubj, 2, 1, &
856# ifdef MASKING
857 &
grid(ng) % rmask, &
858# endif
861# endif
862
863
864
866# if defined PIO_LIB && defined DISTRIBUTE
868# endif
869 & 1,
blk(ng), update(1), &
870 & lbi, ubi, lbj, ubj, 2, 1, &
871# ifdef MASKING
872 &
grid(ng) % rmask, &
873# endif
876
877# ifdef SALINITY
878
879
880
881
883# if defined PIO_LIB && defined DISTRIBUTE
885# endif
886 & 1,
blk(ng), update(1), &
887 & lbi, ubi, lbj, ubj, 2, 1, &
888# ifdef MASKING
889 &
grid(ng) % rmask, &
890# endif
893# endif
894# endif
895 END IF
896#endif
897
898
899
900
901
902#ifndef ANA_FSOBC
903
904
905
910# if defined PIO_LIB && defined DISTRIBUTE
912# endif
914 & recordless, update(1), &
915 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
918 END IF
919
923# if defined PIO_LIB && defined DISTRIBUTE
925# endif
927 & recordless, update(1), &
928 & jlb, jub, 1, 2, 0,
mm(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, 0,
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#ifndef ANA_M2OBC
962
963
964
969# if defined PIO_LIB && defined DISTRIBUTE
971# endif
973 & recordless, update(1), &
974 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
977 END IF
978
982# if defined PIO_LIB && defined DISTRIBUTE
984# endif
986 & recordless, update(1), &
987 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
990 END IF
991
995# if defined PIO_LIB && defined DISTRIBUTE
997# endif
999 & recordless, update(1), &
1000 & jlb, jub, 1, 2, 0,
mm(ng)+1, 1, &
1003 END IF
1004
1008# if defined PIO_LIB && defined DISTRIBUTE
1010# endif
1012 & recordless, update(1), &
1013 & jlb, jub, 1, 2, 1,
mm(ng)+1, 1, &
1016 END IF
1017
1021# if defined PIO_LIB && defined DISTRIBUTE
1023# endif
1025 & recordless, update(1), &
1026 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
1029 END IF
1030
1034# if defined PIO_LIB && defined DISTRIBUTE
1036# endif
1038 & recordless, update(1), &
1039 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
1042 END IF
1043
1047# if defined PIO_LIB && defined DISTRIBUTE
1049# endif
1051 & recordless, update(1), &
1052 & ilb, iub, 1, 2, 1,
lm(ng)+1, 1, &
1055 END IF
1056
1060# if defined PIO_LIB && defined DISTRIBUTE
1062# endif
1064 & recordless, update(1), &
1065 & ilb, iub, 1, 2, 0,
lm(ng)+1, 1, &
1068 END IF
1069 END IF
1070#endif
1071
1072#ifdef SOLVE3D
1073# ifndef ANA_M3OBC
1074
1075
1076
1081# if defined PIO_LIB && defined DISTRIBUTE
1083# endif
1085 & recordless, update(1), &
1086 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1089 END IF
1090
1094# if defined PIO_LIB && defined DISTRIBUTE
1096# endif
1098 & recordless, update(1), &
1099 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
1102 END IF
1103
1107# if defined PIO_LIB && defined DISTRIBUTE
1109# endif
1111 & recordless, update(1), &
1112 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1115 END IF
1116
1120# if defined PIO_LIB && defined DISTRIBUTE
1122# endif
1124 & recordless, update(1), &
1125 & jlb, jub,
n(ng), 2, 1,
mm(ng)+1,
n(ng), &
1128 END IF
1129
1133# if defined PIO_LIB && defined DISTRIBUTE
1135# endif
1137 & recordless, update(1), &
1138 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1141 END IF
1142
1146# if defined PIO_LIB && defined DISTRIBUTE
1148# endif
1150 & recordless, update(1), &
1151 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1154 END IF
1155
1159# if defined PIO_LIB && defined DISTRIBUTE
1161# endif
1163 & recordless, update(1), &
1164 & ilb, iub,
n(ng), 2, 1,
lm(ng)+1,
n(ng), &
1167 END IF
1168
1172# if defined PIO_LIB && defined DISTRIBUTE
1174# endif
1176 & recordless, update(1), &
1177 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1180 END IF
1181 END IF
1182# endif
1183
1184# ifndef ANA_TOBC
1185
1186
1187
1193# if defined PIO_LIB && defined DISTRIBUTE
1195# endif
1197 & recordless, update(1), &
1198 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1201 END IF
1202 END DO
1203
1208# if defined PIO_LIB && defined DISTRIBUTE
1210# endif
1212 & recordless, update(1), &
1213 & jlb, jub,
n(ng), 2, 0,
mm(ng)+1,
n(ng), &
1216 END IF
1217 END DO
1218
1223# if defined PIO_LIB && defined DISTRIBUTE
1225# endif
1227 & recordless, update(1), &
1228 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1229 &
boundary(ng) % tG_south(:,:,:,i))
1231 END IF
1232 END DO
1233
1238# if defined PIO_LIB && defined DISTRIBUTE
1240# endif
1242 & recordless, update(1), &
1243 & ilb, iub,
n(ng), 2, 0,
lm(ng)+1,
n(ng), &
1244 &
boundary(ng) % tG_north(:,:,:,i))
1246 END IF
1247 END DO
1248 END IF
1249# endif
1250#endif
1251
1252
1253
1254
1255
1256#ifndef ANA_SSH
1257
1258
1259
1262# if defined PIO_LIB && defined DISTRIBUTE
1264# endif
1266 & lbi, ubi, lbj, ubj, 2, 1, &
1267# ifdef MASKING
1268 &
grid(ng) % rmask, &
1269# endif
1272 END IF
1273#endif
1274#ifndef ANA_M2CLIMA
1275
1276
1277
1280# if defined PIO_LIB && defined DISTRIBUTE
1282# endif
1284 & lbi, ubi, lbj, ubj, 2, 1, &
1285# ifdef MASKING
1286 &
grid(ng) % umask, &
1287# endif
1288 &
clima(ng) % ubarclmG)
1290
1292# if defined PIO_LIB && defined DISTRIBUTE
1294# endif
1296 & lbi, ubi, lbj, ubj, 2, 1, &
1297# ifdef MASKING
1298 &
grid(ng) % vmask, &
1299# endif
1300 &
clima(ng) % vbarclmG)
1302 END IF
1303#endif
1304#ifdef SOLVE3D
1305# ifndef ANA_M3CLIMA
1306
1307
1308
1311# if defined PIO_LIB && defined DISTRIBUTE
1313# endif
1315 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1316# ifdef MASKING
1317 &
grid(ng) % umask, &
1318# endif
1319 &
clima(ng) % uclmG)
1321
1323# if defined PIO_LIB && defined DISTRIBUTE
1325# endif
1327 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1328# ifdef MASKING
1329 &
grid(ng) % vmask, &
1330# endif
1331 &
clima(ng) % vclmG)
1333 END IF
1334# endif
1335# ifndef ANA_TCLIMA
1336
1337
1338
1339 ic=0
1342 ic=ic+1
1345# if defined PIO_LIB && defined DISTRIBUTE
1347# endif
1349 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1350# ifdef MASKING
1351 &
grid(ng) % rmask, &
1352# endif
1353 &
clima(ng) % tclmG(:,:,:,:,ic))
1355 END IF
1356 END DO
1357# endif
1358#endif
1359
1360#ifdef TLM_CHECK
1361
1362
1363
1364
1365
1366
1367
1368
1369 IF (
outer.ge.1)
THEN
1370
1371
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) % rmask, &
1381# endif
1382 &
ocean(ng) % zetaG)
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, 2, 1, &
1393# ifdef MASKING
1394 &
grid(ng) % umask, &
1395# endif
1396 &
ocean(ng) % ubarG)
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, 2, 1, &
1405# ifdef MASKING
1406 &
grid(ng) % vmask, &
1407# endif
1408 &
ocean(ng) % vbarG)
1410# ifdef SOLVE3D
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, 1,
n(ng), 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, 1,
n(ng), 2, 1, &
1432# ifdef MASKING
1433 &
grid(ng) % vmask, &
1434# endif
1437
1438
1439
1442# if defined PIO_LIB && defined DISTRIBUTE
1443 &
fwd(ng)%pioFile, &
1444# endif
1445 & 1,
fwd(ng), update(1), &
1446 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1447# ifdef MASKING
1448 &
grid(ng) % rmask, &
1449# endif
1450 &
ocean(ng) % tG(:,:,:,:,i))
1452 END DO
1453# endif
1454 END IF
1455#endif
1456
1457#if defined NLM_OUTER || \
1458 defined rbl4dvar || \
1459 defined rbl4dvar_ana_sensitivity || \
1460 defined rbl4dvar_fct_sensitivity || \
1461 defined sp4dvar || \
1462 defined tl_rbl4dvar
1463
1464
1465
1466
1467
1468
1470
1471
1472
1474# if defined PIO_LIB && defined DISTRIBUTE
1475 &
tlf(ng)%pioFile, &
1476# endif
1477 & 1,
tlf(ng), update(1), &
1478 & lbi, ubi, lbj, ubj, 2, 1, &
1479# ifdef MASKING
1480 &
grid(ng) % rmask, &
1481# endif
1482 &
ocean(ng) % zetaG)
1484
1485# ifndef SOLVE3D
1486
1487
1488
1490# if defined PIO_LIB && defined DISTRIBUTE
1491 &
tlf(ng)%pioFile, &
1492# endif
1493 & 1,
tlf(ng), update(1), &
1494 & lbi, ubi, lbj, ubj, 2, 1, &
1495# ifdef MASKING
1496 &
grid(ng) % umask, &
1497# endif
1498 &
ocean(ng) % ubarG)
1500
1502# if defined PIO_LIB && defined DISTRIBUTE
1503 &
tlf(ng)%pioFile, &
1504# endif
1505 & 1,
tlf(ng), update(1), &
1506 & lbi, ubi, lbj, ubj, 2, 1, &
1507# ifdef MASKING
1508 &
grid(ng) % vmask, &
1509# endif
1510 &
ocean(ng) % vbarG)
1512# else
1513
1514
1515
1517# if defined PIO_LIB && defined DISTRIBUTE
1518 &
tlf(ng)%pioFile, &
1519# endif
1520 & 1,
tlf(ng), update(1), &
1521 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1522# ifdef MASKING
1523 &
grid(ng) % umask, &
1524# endif
1527
1529# if defined PIO_LIB && defined DISTRIBUTE
1530 &
tlf(ng)%pioFile, &
1531# endif
1532 & 1,
tlf(ng), update(1), &
1533 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1534# ifdef MASKING
1535 &
grid(ng) % vmask, &
1536# endif
1539
1540
1541
1544# if defined PIO_LIB && defined DISTRIBUTE
1545 &
tlf(ng)%pioFile, &
1546# endif
1547 & 1,
tlf(ng), update(1), &
1548 & lbi, ubi, lbj, ubj, 1,
n(ng), 2, 1, &
1549# ifdef MASKING
1550 &
grid(ng) % rmask, &
1551# endif
1552 &
ocean(ng) % tG(:,:,:,:,i))
1554 END DO
1555# endif
1556 END IF
1557#endif
1558
1559#ifdef PROFILE
1560
1561
1562
1563
1564
1566#endif
1567
1568 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_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
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
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 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
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
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)