4
5
6
7
8
9
10
11
12
13
14
15
18# ifdef BBL_MODEL_NOT_YET
20# endif
21# ifdef FOUR_DVAR
22# ifdef SOLVE3D
24# endif
25# ifdef SP4DVAR
27# endif
29# endif
36
37# ifdef ADJUST_BOUNDARY
39# endif
40# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
42# endif
43
47# ifdef DISTRIBUTE
49# endif
51# ifdef WET_DRY
53# endif
54# ifdef TLM_CHECK
56# endif
57# if defined SOLVE3D && defined NONLINEAR
59# endif
61# ifdef I4DVAR_ANA_SENSITIVITY
63# endif
64# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
66# endif
67# ifdef OBSERVATIONS
69# endif
70# ifdef SOLVE3D
72# endif
73# ifdef MASKING
75# endif
78# if defined RBL4DVAR || defined R4DVAR || \
79 defined sensitivity_4dvar || defined tl_rbl4dvar || \
80 defined tl_r4dvar
82# endif
83# ifdef FOUR_DVAR
85# endif
86# ifdef SOLVE3D
91# endif
92# ifdef FOUR_DVAR
94# endif
95# ifdef WET_DRY
97# endif
98# if defined PROPAGATOR || \
99 (defined masking && (defined read_water || defined write_water))
100 USE wpoints_mod,
ONLY :
wpoints
101# endif
102
103 implicit none
104
105
106
107 integer, intent(in) :: ng
108
109
110
111 logical :: update = .false.
112
113 integer :: Fcount, IniRec, Tindex, wrtRec
114 integer :: thread, tile
115
116 real(dp) :: my_dstart
117
118 character (len=*), parameter :: MyFile = &
119 & __FILE__
120
121
122
123
124
126# if defined PERTURBATION
128 10 FORMAT (/,' <<<< Ensemble/Perturbation Run: ',i5.5,' >>>>',/)
129# elif defined I4DVAR || defined RBL4DVAR || \
130 defined r4dvar || defined sensitivity_4dvar || \
131 defined tl_rbl4dvar || defined tl_r4dvar
133 10 FORMAT (/,' <<<< 4D Variational Data Assimilation, ', &
134 & 'Outer = ',i3.3, ', Inner = ',i3.3,' >>>>',/)
135# endif
136 WRITE (
stdout,20)
'TL_INITIAL: Configuring and ', &
137 & 'initializing tangent linear model ...'
138 20 FORMAT (/,1x,a,a,/)
139 END IF
140
141
142
143
144
152
157# ifdef FLOATS_NOT_YET
163# endif
164
169 END IF
170
171# if defined GENERIC_DSTART
172
173
174
175
176
177
178
179
180
181
182 IF (
initime(ng).lt.0.0_dp)
THEN
184 ELSE
185 my_dstart=
initime(ng)/86400.0_dp
186 END IF
188# else
190# endif
196
198 tindex=1
199
200
201
206
207# ifdef PROFILE
208
209
210
211
212
213 DO thread=thread_range
215 END DO
216# endif
217
218# if defined OPT_OBSERVATIONS
219
220
221
222
223
224
225
226 inirec=1
227
228# elif defined FOUR_DVAR && \
229
230 defined hessian_fsv) || defined tlm_check
231
232
233
234
235
236
237# ifndef I4DVAR_ANA_SENSITIVITY
238# ifdef I4DVAR
239
240
241
242
243
244
249
250# ifdef DISTRIBUTE
252# else
254# endif
256
257# ifdef DISTRIBUTE
259# else
261# endif
263 END IF
264# endif
265# ifndef WEAK_CONSTRAINT
266
267
268
271 END IF
272# endif
273
274
275
276 inirec=
itl(ng)%Rindex
277
278# ifdef ADJUST_BOUNDARY
279
280
281
283# endif
284# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
285
286
287
289# endif
290# if !defined WEAK_CONSTRAINT
291
292
293
294
295
297 fcount=
tlm(ng)%Fcount
298 tlm(ng)%Nrec(fcount)=0
300# endif
301# endif
302# endif
303
304
305
306
307
308
312 END IF
313
314
315
316
317# ifndef ANA_SPONGE
318
319
320# endif
321
322
325 END DO
326
327# ifdef ANA_SPONGE
328
329
330
331
332
333
337 END DO
338 END IF
339# endif
340
341
342
343
344
345
346# if defined FOUR_DVAR && \
347
348
349 defined hessian_so || \
350 defined hessian_fsv)
351# if defined OPT_OBSERVATIONS || defined TLM_CHECK || \
352 defined weak_constraint
353
354
355
358# ifdef SOLVE3D
360# endif
361# ifdef SP4DVAR
364# endif
365 END DO
366
367# else
368# ifndef WEAK_CONSTRAINT
369
370
371
372
373
374
375
376
379# ifdef ADJUST_BOUNDARY
381# endif
382# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
384# endif
386 END DO
387
388
389
390
391
393 wrtrec=1
394# ifdef DISTRIBUTE
396# else
398# endif
400 END IF
401 END IF
402# endif
403# endif
404# endif
405
406# if defined RBL4DVAR || defined R4DVAR || \
407 defined sensitivity_4dvar || defined tl_rbl4dvar || \
408 defined tl_r4dvar
409
410
411
412
413
416 END DO
417# endif
418
419
420
421
422
423# ifdef ANA_INITIAL
424
425
426
427 IF (
nrrec(ng).eq.0)
THEN
430 END DO
431 END IF
432# endif
433
434# if defined ANA_PASSIVE && defined SOLVE3D
435
436
437
438 IF (
nrrec(ng).eq.0)
THEN
441 END DO
442 END IF
443# endif
444
445# if defined ANA_BIOLOGY && defined SOLVE3D
446
447
448
449 IF (
nrrec(ng).eq.0)
THEN
452 END DO
453 END IF
454# endif
455
456# if defined ANA_SEDIMENT_NOT_YET && defined SOLVE3D
457
458
459
460 IF (
nrrec(ng).eq.0)
THEN
463 END DO
464 END IF
465# endif
466
467# ifdef I4DVAR_ANA_SENSITIVITY
468
469
470
471
474 END DO
475
476# else
477
478
479
480# ifdef INI_FILE
484# else
485 IF (
nrrec(ng).ne.0)
THEN
489 END IF
490# endif
491# endif
492
493# ifdef WET_DRY
494
495
496
497
498
499
500
501 IF (
nrrec(ng).ne.0)
THEN
502# ifdef DISTRIBUTE
505# else
507# endif
509 ELSE
511 CALL wetdry (ng, tile, tindex(ng), .true.)
512 END DO
513 END IF
514# endif
515
516# ifdef OBSERVATIONS
517
518
519
520
521
522
523
524
525
528# endif
529
530# if defined ANA_PERTURB && defined SANITY_CHECK
531
532
533
534
535
536
539 END DO
540# endif
541
542# ifdef TLM_CHECK
543
544
545
546
547
548
549
552 END DO
553# endif
554
555# ifdef SOLVE3D
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584# endif
585
586#ifdef ANA_PSOURCE
587
588
589
590
591
592
593
594
598 END DO
599 END IF
600#endif
601
602
603
604
605
606
607
608
609
610
613# ifdef DISTRIBUTE
615# endif
617
618
619
620
621
622
623
626# ifdef DISTRIBUTE
628# endif
630
631# if defined SOLVE3D && defined TLM_DRIVER
632
633
634
635
636
638# ifdef NONLINEAR
640# endif
642 END DO
643# endif
644
645# ifdef MASKING
646
647
648
649
650
653 END DO
654# endif
655
656# if defined PROPAGATOR || \
657 (defined masking && (defined read_water || defined write_water ))
658
659
660
661
662
663
666 END DO
667# endif
668
669# ifdef WEAK_CONSTRAINT
670
671
672
673
674
675
676
677
678
679
681 inirec=1
684 END IF
685# endif
686
687# if defined ANA_DRAG && defined UV_DRAG_GRID
688
689
690
691
692
696 END DO
697 END IF
698# endif
699
700
701
702
703
708 END DO
709 END IF
710
711# if defined FLOATS_NOT_YET || defined STATIONS
712
713
714
715
716
717
719# endif
720
721# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
722
723
724
725
726
728 CALL ocn2wav_coupling (ng, tile)
729 END DO
730# endif
731
732
733
734
735
738
739# ifdef PROFILE
740
741
742
743
744
745 DO thread=thread_range
747 END DO
748# endif
749
750 RETURN
subroutine check_multifile(ng, model)
subroutine grid_coords(ng, model)
subroutine ana_sediment(ng, tile, model)
subroutine ana_initial(ng, tile, model)
subroutine ana_sponge(ng, tile, model)
subroutine ana_drag(ng, tile, model)
subroutine ana_psource(ng, tile, model)
subroutine ana_perturb(ng, tile, model)
subroutine ana_biology(ng, tile, model)
subroutine ana_passive(ng, tile, model)
subroutine, public close_inp(ng, model)
subroutine, public time_string(mytime, date_string)
subroutine, public get_state(ng, model, msg, s, inirec, tindex)
subroutine, public get_wetdry(ng, tile, model, inirec)
subroutine, public tl_ini_perturb(ng, tile, linp, lout)
subroutine, public set_zeta_timeavg(ng, tile, model)
subroutine, public ini_hmixcoef(ng, tile, model)
subroutine, public ini_lanczos(ng, tile, ladj, lini)
subroutine, public initialize_boundary(ng, tile, model)
subroutine, public initialize_coupling(ng, tile, model)
subroutine, public initialize_forces(ng, tile, model)
type(t_io), dimension(:), allocatable tlf
type(t_io), dimension(:), allocatable tlm
type(t_io), dimension(:), allocatable itl
subroutine, public initialize_ocean(ng, tile, model)
integer, dimension(:), allocatable first_tile
integer, dimension(:), allocatable last_tile
logical, dimension(:), allocatable luvsrc
real(dp), parameter day2sec
integer, dimension(:), allocatable obccount
integer, dimension(:), allocatable nrrec
logical, dimension(:,:), allocatable ltracersrc
integer, dimension(:), allocatable ntimes
logical, dimension(:), allocatable ldefitl
integer, dimension(:), allocatable iic
real(dp), dimension(:), allocatable dt
logical, dimension(:), allocatable lsponge
logical, dimension(:), allocatable setgridconfig
integer, dimension(:), allocatable next_kstp
logical, dimension(:), allocatable synchro_flag
logical, dimension(:), allocatable predictor_2d_step
real(dp), dimension(:), allocatable tdays
logical, dimension(:), allocatable lwsrc
integer, dimension(:), allocatable ntend
integer, dimension(:), allocatable first_time
character(len=22), dimension(:), allocatable time_code
integer, dimension(:), allocatable indx1
integer, dimension(:), allocatable sfcount
logical, dimension(:,:), allocatable tl_volcons
integer, dimension(:), allocatable ntfirst
logical, dimension(:), allocatable lwrttlm
real(dp), dimension(:), allocatable time
logical, dimension(:), allocatable ldeftlm
integer, dimension(:), allocatable ntstart
integer, dimension(:), allocatable step_counter
integer, dimension(:), allocatable nadj
integer, dimension(:), allocatable iif
real(dp), dimension(:), allocatable initime
integer, dimension(:), allocatable nfm2
integer, dimension(:), allocatable kstp
integer, dimension(:), allocatable knew
integer, dimension(:), allocatable nfm1
integer, dimension(:), allocatable nrhs
integer, dimension(:), allocatable nf
integer, dimension(:), allocatable nfm3
integer, dimension(:), allocatable nnew
integer, dimension(:), allocatable nfp1
integer, dimension(:), allocatable lnew
integer, dimension(:), allocatable krhs
integer, dimension(:), allocatable nstp
subroutine, public obs_initial(ng, model, backward)
subroutine, public set_depth(ng, tile, model)
subroutine, public set_masks(ng, tile, model)
subroutine, public stiffness(ng, tile, model)
logical function, public founderror(flag, noerr, line, routine)
subroutine, public tl_def_ini(ng)
subroutine, public tl_omega(ng, tile, model)
subroutine, public tl_rho_eos(ng, tile, model)
subroutine, public tl_bath(ng, tile)
subroutine, public tl_set_depth(ng, tile, model)
subroutine, public tl_set_massflux(ng, tile, model)
subroutine, public tl_wrt_ini(ng, tile, tindex, outrec)
subroutine wetdry(ng, tile, tindex, linitialize)
subroutine set_grid(ng, model)
recursive subroutine wclock_off(ng, model, region, line, routine)
recursive subroutine wclock_on(ng, model, region, line, routine)
subroutine tl_get_data(ng)
subroutine tl_get_idata(ng)
subroutine wpoints(ng, tile, model)