4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21# if defined MODEL_COUPLING && defined MCT_LIB
23# endif
25# ifdef NESTING
27# endif
30
31# ifdef ANA_VMIX
33# endif
35# ifdef TLM_CHECK
37# endif
38# ifdef TIDE_GENERATING_FORCES
40# endif
41# if defined ATM_COUPLING_NOT_YET && defined MCT_LIB
43# endif
44# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
46# endif
47# if defined FORWARD_READ || defined JEDI
51# endif
53# ifdef BIOLOGY
55# endif
56# ifdef BBL_MODEL_NOT_YET
57
58# endif
59# if defined BULK_FLUXES_NOT_YET && !defined PRIOR_BULK_FLUXES
60
61# endif
62# ifdef BVF_MIXING_NOT_YET
63
64# endif
66# if defined WEAK_CONSTRAINT || defined FORCING_SV
68# endif
69# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
71# endif
72# ifdef GLS_MIXING_NOT_YET
73
74
75# endif
76# ifdef LMD_MIXING_NOT_YET
77
78# endif
79# ifdef MY25_MIXING_NOT_YET
80
81
82# endif
83# ifdef NESTING
86# ifndef ONE_WAY
88# endif
89# endif
90# ifdef ADJUST_BOUNDARY
94# endif
96# if !(defined FORCING_SV || defined JEDI)
98# endif
99# ifdef NEARSHORE_MELLOR_NOT_YET
100
101# endif
102# ifndef TS_FIXED
104# endif
106# ifdef SEDIMENT_NOT_YET
107
108# endif
109# ifdef TL_AVERAGES
111# endif
114# if defined SSH_TIDES_NOT_YET || defined UV_TIDES_NOT_YET
115
116# endif
120# ifndef TS_FIXED
122# endif
124# ifdef FLOATS_NOT_YET
125
126# endif
127
128
129 implicit none
130
131
132
133 real(dp), intent(in) :: RunInterval
134
135
136
137 logical :: DoNestLayer, Time_Step
138
139 integer :: Nsteps, Rsteps
140 integer :: ig, il, istep, ng, nl, tile
141 integer :: my_iif, next_indx1
142# ifdef FLOATS_NOT_YET
143 integer :: Lend, Lstr, chunk_size
144# endif
145
146 real(r8) :: MaxDT, my_StepTime
147
148 character (len=*), parameter :: MyFile = &
149 & __FILE__
150
151
152
153
154
155
156
157
158 time_step=.true.
159 donestlayer=.true.
160
161 kernel_loop : DO WHILE (time_step)
162
163
164
165
166
167
168 nl=0
169#ifdef NESTING
171#endif
172
173 nest_layer : DO WHILE (donestlayer)
174
175
176
177
178
179
180
181
185
186
187
188 step_loop : DO istep=1,nsteps
189
190
191
197# ifdef JEDI
200# endif
203 END DO
204
205
206
207
208
211
214 END IF
215
216
218 & __line__, myfile)) RETURN
219 END DO
220
221
222
223
224
225
231 END IF
232# if defined FORWARD_READ || defined JEDI
234# endif
235 END DO
236
237 END DO
239
240# if defined FORWARD_READ || defined JEDI
241
242
243
244
245
250 END DO
251
252 END DO
253# endif
254
255# if (defined WEAK_CONSTRAINT || defined FORCING_SV) && \
256
257
258
259
260
261
262
263
264
265
268# ifdef WEAK_CONSTRAINT
269# ifdef WEAK_NOINTERP
270 IF ((
iic(ng).gt.1).and.(
iic(ng).ne.
ntend(ng)+1).and. &
271 & (mod(
iic(ng)-1,
nadj(ng)).eq.0))
THEN
273 WRITE (
stdout,*)
' FORCING TLM at iic = ',
iic(ng)
274 END IF
275# endif
280 END DO
281
282 END IF
283# ifdef WEAK_NOINTERP
284 END IF
285# endif
286# else
290 END DO
291
292# endif
293 END DO
294# endif
295
296# if !(defined FORCING_SV || defined JEDI)
297
298
299
300
301
302
303
304
309 END IF
310 END DO
311# endif
312
313
314
315
316
317
318
323# ifndef TS_FIXED
325# endif
326# ifdef TIDE_GENERATING_FORCES
327 CALL equilibrium_tide (ng, tile,
itlm)
328# endif
330# if defined FORWARD_READ || defined JEDI
332# endif
333# ifdef TLM_CHECK
335# endif
336 END DO
337
338 END DO
340
341# if defined ATM_COUPLING_NOT_YET && defined MCT_LIB
342
343
344
345
346
347
353 CALL ocn2atm_coupling (ng, tile)
354 END DO
355
356 END IF
357 END DO
358# endif
359
360# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
361
362
363
364
365
366
372 CALL ocn2wav_coupling (ng, tile)
373 END DO
374
375 END IF
376 END DO
377# endif
378
379# ifdef NEARSHORE_MELLOR_NOT_YET
380
381
382
383
384
388 CALL tl_radiation_stress (ng, tile)
389 END DO
390
391 END DO
392# endif
393
394
395
396
397
398
402# if defined BULK_FLUXES_NOT_YET && !defined PRIOR_BULK_FLUXES
403 CALL tl_bulk_flux (ng, tile)
404# endif
405# ifdef BBL_MODEL_NOT_YET
406 CALL tl_bblm (ng, tile)
407# endif
409# if defined SSH_TIDES_NOT_YET || defined UV_TIDES_NOT_YET
410 CALL tl_set_tides (ng, tile)
411# endif
412 END DO
413
414 END DO
415
416# ifdef NESTING
417
418
419
420
425 END IF
426 END DO
427# endif
428
429# ifdef ADJUST_BOUNDARY
430
431
432
433
434
435
443 END DO
444
445 END IF
446 END DO
447# endif
448
449# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
450
451
452
453
454
455
461 END DO
462
463 END IF
464 END DO
465# endif
466
467
468
469
470
471
472
476# if defined ANA_VMIX_NOT_YET
477 CALL tl_ana_vmix (ng, tile)
478# elif defined LMD_MIXING_NOT_YET
479 CALL tl_lmd_vmix (ng, tile)
480# elif defined BVF_MIXING_NOT_YET
481 CALL tl_bvf_mix (ng, tile)
482# endif
484
485 END DO
486
487 END DO
488
489
490
491
492
493
494
499# ifdef DIAGNOSTICS
500
501# endif
502# ifdef TL_AVERAGES
504# endif
505 END DO
506
507 END DO
508
509# ifdef NESTING
510
511
512
513
518 END IF
519 END DO
520# endif
521
522
523
524
525
526
527
530
532
533
536 RETURN
537 END IF
538 END DO
539
540# ifdef NESTING
541
542
543
544
545# ifdef NESTING_DEBUG
546
547
548
549
550
551# endif
552
553
558# ifdef NESTING_DEBUG
560# endif
561 END IF
562 END DO
563# endif
564
565
566
567
568
573# ifdef MY25_MIXING_NOT_YET
574 CALL tl_my25_prestep (ng, tile)
575# elif defined GLS_MIXING_NOT_YET
576 CALL tl_gls_prestep (ng, tile)
577# endif
578 END DO
579
580 END DO
581
582# ifdef NESTING
583
584
585
586
587
592 END IF
593 END DO
594# endif
595
596
597
598
599
600
601 loop_2d :
DO my_iif=1,maxval(
nfast)+1
602
603
604
605
608 next_indx1=3-
indx1(ng)
610 & my_iif.le.(
nfast(ng)+1))
THEN
613 IF (first_2d_step) THEN
615 ELSE
617 END IF
620 END IF
621
622
623
624
625
626
627
628 IF (my_iif.le.(
nfast(ng)+1))
THEN
631 END DO
632
633 END IF
634 END DO
635
636# ifdef NESTING
637
638
639
640
641
642
643# ifdef NESTING_DEBUG
644
645
646# endif
647
652 END IF
655 END IF
656 END DO
657# endif
658
659
660
669 END IF
670
671
672
673
674
678 END DO
679
680 END IF
681 END DO
682
683# ifdef NESTING
684
685
686
687
688
689
690# ifdef NESTING_DEBUG
691
692
693# endif
694
699 END IF
702 END IF
703 END DO
704# endif
705 END DO loop_2d
706
707# ifdef NESTING
708# if defined MASKING && defined WET_DRY
709
710
711
712
713
714
718 END DO
719# endif
720
721
722
723
724
729 END IF
730 END DO
731# endif
732
733
734
735
736
737
742 END DO
743
744 END DO
745
746# ifdef NESTING
747
748
749
750
754 END DO
755# endif
756
757
758
759
760
761
762
763
768 END DO
769
770 END DO
771
772# ifdef NESTING
773
774
775
776
777
782 END IF
783 END DO
784# endif
785
786
787
788
789
790
795# ifdef MY25_MIXING_NOT_YET
796 CALL tl_my25_corstep (ng, tile)
797# elif defined GLS_MIXING_NOT_YET
798 CALL tl_gls_corstep (ng, tile)
799# endif
800# ifdef BIOLOGY
802# endif
803# ifdef SEDIMENT_NOT_YET
804 CALL tl_sediment (ng, tile)
805# endif
806 END DO
807
808 END DO
809
810# ifndef TS_FIXED
811
812
813
814
815
820 END DO
821
822 END DO
823
824# ifdef NESTING
825
826
827
828
833 END IF
834 END DO
835# endif
836# endif
837
838# ifdef NESTING
839# ifndef ONE_WAY
840
841
842
843
844
845
846
847
848
849
850
851
855 IF (do_twoway(
itlm, nl, il, ng, istep))
THEN
857 END IF
858 END DO
859 END DO
860# endif
861
862
863
864
865
866
867
868
869
874 END IF
875 END DO
876# endif
877
878# ifdef FLOATS_NOT_YET
879
880
881
882
883
884
885
886
887
891# ifdef _OPENMP
894 lend=min(
nfloats(ng),lstr+chunk_size-1)
895# else
896 lstr=1
898# endif
899 CALL tl_step_floats (ng, lstr, lend)
900
901
902
903
909 END IF
910 END DO
911# endif
912
913
914
915
916
923 END DO
924
925 END DO step_loop
926
927 END DO nest_layer
928
929 END DO kernel_loop
930
931 RETURN
subroutine ana_vmix(ng, tile, model)
subroutine, public time_string(mytime, date_string)
subroutine, public tl_dotproduct(ng, tile, linp)
integer, dimension(:,:), allocatable couplesteps
real(r8), dimension(:), allocatable twowayinterval
logical, dimension(:), allocatable donortofiner
integer, dimension(:), allocatable first_tile
integer, dimension(:), allocatable last_tile
integer, dimension(:), allocatable nfloats
integer, dimension(:,:), allocatable gridnumber
integer, dimension(:), allocatable gridsinlayer
logical, dimension(:), allocatable lfloats
integer, dimension(:), allocatable iic
real(dp), dimension(:), allocatable dt
logical, dimension(:), allocatable predictor_2d_step
integer, dimension(:), allocatable jic
real(dp), dimension(:), allocatable tdays
logical, dimension(:), allocatable frequentimpulse
integer, dimension(:), allocatable nfast
real(dp), parameter sec2day
integer, dimension(:), allocatable ntend
character(len=22), dimension(:), allocatable time_code
real(dp), dimension(:), allocatable time4jedi
integer, dimension(:), allocatable indx1
logical, dimension(:,:), allocatable compositegrid
real(dp), dimension(:), allocatable time
logical, dimension(:), allocatable refinedgrid
integer, dimension(:), allocatable refinescale
integer, dimension(:), allocatable ntstart
integer, dimension(:), allocatable step_counter
logical, dimension(:), allocatable processinputdata
integer, dimension(:), allocatable nadj
integer, dimension(:), allocatable iif
integer, dimension(:), allocatable nfm2
integer, dimension(:), allocatable kstp
integer, dimension(:), allocatable knew
integer, dimension(:), allocatable nfm1
integer, dimension(:), allocatable nrhs
integer, dimension(:), allocatable lfinp
integer, dimension(:), allocatable lbinp
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 nesting(ng, model, isection)
subroutine, public omega(ng, tile, model)
subroutine, public set_depth(ng, tile, model)
subroutine, public set_massflux(ng, tile, model)
logical function, public founderror(flag, noerr, line, routine)
subroutine, public tl_biology(ng, tile)
subroutine, public tl_diag(ng, tile)
subroutine, public tl_forcing(ng, tile, kfrc, nfrc)
subroutine, public tl_frc_adjust(ng, tile, linp)
subroutine, public tl_nesting(ng, model, isection)
subroutine, public tl_obc2d_adjust(ng, tile, linp)
subroutine, public tl_obc_adjust(ng, tile, linp)
subroutine, public tl_omega(ng, tile, model)
subroutine, public tl_post_initial(ng, model)
subroutine, public tl_rho_eos(ng, tile, model)
subroutine, public tl_rhs3d(ng, tile)
subroutine, public tl_set_avg(ng, tile)
subroutine, public tl_set_depth_bry(ng, tile, model)
subroutine, public tl_set_depth(ng, tile, model)
subroutine, public tl_set_massflux(ng, tile, model)
subroutine, public tl_set_vbc(ng, tile)
subroutine, public tl_set_zeta(ng, tile)
subroutine, public tl_step2d(ng, tile)
subroutine, public tl_step3d_t(ng, tile)
subroutine, public tl_step3d_uv(ng, tile)
subroutine ntimesteps(model, runinterval, nl, nsteps, rsteps)
subroutine tl_get_data(ng)
subroutine tl_set_data(ng, tile)