ROMS
Loading...
Searching...
No Matches
tl_initial.F File Reference
#include "cppdefs.h"
Include dependency graph for tl_initial.F:

Go to the source code of this file.

Functions/Subroutines

subroutine tl_initial (ng)
 

Function/Subroutine Documentation

◆ tl_initial()

subroutine tl_initial ( integer, intent(in) ng)

Definition at line 3 of file tl_initial.F.

4!
5!git $Id$
6!================================================== Hernan G. Arango ===
7! Copyright (c) 2002-2025 The ROMS Group !
8! Licensed under a MIT/X style license !
9! See License_ROMS.md !
10!=======================================================================
11! !
12! This routine initializes all tangent linear model variables. !
13! !
14!=======================================================================
15!
16 USE mod_param
17 USE mod_parallel
18# ifdef BBL_MODEL_NOT_YET
19 USE mod_bbl
20# endif
21# ifdef FOUR_DVAR
22# ifdef SOLVE3D
23 USE mod_coupling
24# endif
25# ifdef SP4DVAR
26 USE mod_forces
27# endif
28 USE mod_fourdvar
29# endif
30 USE mod_grid
31 USE mod_iounits
32 USE mod_ncparam
33 USE mod_ocean
34 USE mod_scalars
35 USE mod_stepping
36!
37# ifdef ADJUST_BOUNDARY
39# endif
40# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
42# endif
43!
45 USE close_io_mod, ONLY : close_inp
46 USE dateclock_mod, ONLY : time_string
47# ifdef DISTRIBUTE
48 USE distribute_mod, ONLY : mp_bcasti
49# endif
50 USE get_state_mod, ONLY : get_state
51# ifdef WET_DRY
52 USE get_wetdry_mod, ONLY : get_wetdry
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
65 USE mct_coupler_mod, ONLY : ocn2wav_coupling
66# endif
67# ifdef OBSERVATIONS
69# endif
70# ifdef SOLVE3D
71 USE set_depth_mod, ONLY : set_depth
72# endif
73# ifdef MASKING
74 USE set_masks_mod, ONLY : set_masks
75# endif
76 USE stiffness_mod, ONLY : stiffness
77 USE strings_mod, ONLY : founderror
78# if defined RBL4DVAR || defined R4DVAR || \
79 defined sensitivity_4dvar || defined tl_rbl4dvar || \
80 defined tl_r4dvar
81 USE tl_set_depth_mod, ONLY : tl_bath
82# endif
83# ifdef FOUR_DVAR
84 USE tl_def_ini_mod, ONLY : tl_def_ini
85# endif
86# ifdef SOLVE3D
87 USE tl_omega_mod, ONLY : tl_omega
88 USE tl_rho_eos_mod, ONLY : tl_rho_eos
91# endif
92# ifdef FOUR_DVAR
93 USE tl_wrt_ini_mod, ONLY : tl_wrt_ini
94# endif
95# ifdef WET_DRY
96 USE wetdry_mod, ONLY : wetdry
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! Imported variable declarations.
106!
107 integer, intent(in) :: ng
108!
109! Local variable declarations.
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! Initialize model variables.
123!=======================================================================
124!
125 IF (master) THEN
126# if defined PERTURBATION
127 WRITE (stdout,10) nrun
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
132 WRITE (stdout,10) outer, inner
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! Initialize time stepping indices and counters.
143!-----------------------------------------------------------------------
144!
145 iif(ng)=1
146 indx1(ng)=1
147 next_kstp(ng)=1
148 kstp(ng)=1
149 krhs(ng)=1
150 knew(ng)=1
151 predictor_2d_step(ng)=.false.
152!
153 iic(ng)=0
154 nstp(ng)=1
155 nrhs(ng)=1
156 nnew(ng)=1
157# ifdef FLOATS_NOT_YET
158 nf(ng)=0
159 nfp1(ng)=1
160 nfm1(ng)=4
161 nfm2(ng)=3
162 nfm3(ng)=2
163# endif
164!
165 synchro_flag(ng)=.true.
166 first_time(ng)=0
167 IF (any(tl_volcons(:,ng))) THEN
168 tl_ubar_xs=0.0_r8
169 END IF
170
171# if defined GENERIC_DSTART
172!
173! Rarely, the tangent linear model is initialized from a NetCDF file,
174! so we do not know its actual initialization time. Usually, it is
175! computed from DSTART, implying that its value is correct in the ROMS
176! input script. Therefore, the user needs to check and update its value
177! to every time that ROMS is executed. Alternatively, if available, we
178! can use the initialization time from the nonlinear model, INItime.
179! This variable is assigned when computing or processing the basic
180! state trajectory needed to linearize the adjoint model.
181!
182 IF (initime(ng).lt.0.0_dp) THEN
183 my_dstart=dstart ! ROMS input script
184 ELSE
185 my_dstart=initime(ng)/86400.0_dp ! NLM IC time is known
186 END IF
187 tdays(ng)=my_dstart
188# else
189 tdays(ng)=dstart
190# endif
191 time(ng)=tdays(ng)*day2sec
192 ntstart(ng)=int((time(ng)-dstart*day2sec)/dt(ng))+1
193 ntend(ng)=ntstart(ng)+ntimes(ng)-1
194 ntfirst(ng)=ntstart(ng)
195 step_counter(ng)=0
196!
197 inirec=nrrec(ng)
198 tindex=1
199!
200! Initialize global diagnostics variables.
201!
202 avgke=0.0_dp
203 avgpe=0.0_dp
204 avgkp=0.0_dp
205 volume=0.0_dp
206
207# ifdef PROFILE
208!
209!-----------------------------------------------------------------------
210! Start time wall clocks.
211!-----------------------------------------------------------------------
212!
213 DO thread=thread_range
214 CALL wclock_on (ng, itlm, 2, __line__, myfile)
215 END DO
216# endif
217
218# if defined OPT_OBSERVATIONS
219!
220!-----------------------------------------------------------------------
221! Initialize.
222!-----------------------------------------------------------------------
223!
224! Set initial conditions time record to read.
225!
226 inirec=1
227
228# elif defined FOUR_DVAR && \
229 !(defined HESSIAN_SV || defined HESSIAN_SO || \
230 defined hessian_fsv) || defined tlm_check
231!
232!-----------------------------------------------------------------------
233! If variational data assimilation, reset several IO switches and
234! variables.
235!-----------------------------------------------------------------------
236
237# ifndef I4DVAR_ANA_SENSITIVITY
238# ifdef I4DVAR
239!
240! Set switch to create (TRUE) tangent linear initial conditions and
241! history NetCDF files or append (FALSE) to existing files. Then,
242! create tangent linear model initialization file and write zero
243! initial conditions for records 1 and 2.
244!
245 IF ((nrun.eq.erstr).and.(inner.eq.0)) THEN
246 ldefitl(ng)=.true.
247 CALL tl_def_ini (ng)
248 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
249
250# ifdef DISTRIBUTE
251 CALL tl_wrt_ini (ng, myrank, tindex, 1)
252# else
253 CALL tl_wrt_ini (ng, -1, tindex, 1)
254# endif
255 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
256
257# ifdef DISTRIBUTE
258 CALL tl_wrt_ini (ng, myrank, tindex, 2)
259# else
260 CALL tl_wrt_ini (ng, -1, tindex, 2)
261# endif
262 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
263 END IF
264# endif
265# ifndef WEAK_CONSTRAINT
266!
267! Set switch to create tangent linear history file.
268!
269 IF (nrun.eq.erstr) THEN
270 ldeftlm(ng)=.true.
271 END IF
272# endif
273!
274! Set record to read from initial tangent linear NetCDF file.
275!
276 inirec=itl(ng)%Rindex
277
278# ifdef ADJUST_BOUNDARY
279!
280! Initialize open boundary counter for storage arrays.
281!
282 obccount(ng)=0
283# endif
284# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
285!
286! Initialize surface forcing counter for storage arrays.
287!
288 sfcount(ng)=0
289# endif
290# if !defined WEAK_CONSTRAINT
291!
292! Reset tangent linear model history time record counters. These
293! counters are reset in every iteration pass. This file is created
294! on the first iteration pass.
295!
296 tlm(ng)%Rindex=0
297 fcount=tlm(ng)%Fcount
298 tlm(ng)%Nrec(fcount)=0
299 lwrttlm(ng)=.true.
300# endif
301# endif
302# endif
303!
304!-----------------------------------------------------------------------
305! Set application grid, metrics, and associated variables and
306! parameters.
307!-----------------------------------------------------------------------
308!
309 IF (setgridconfig(ng)) THEN
310 CALL set_grid (ng, itlm)
311 setgridconfig(ng)=.false.
312 END IF
313!
314!-----------------------------------------------------------------------
315! Initialize horizontal mixing coefficients. If applicable, scale
316! mixing coefficients according to the grid size (smallest area).
317# ifndef ANA_SPONGE
318! Also increase their values in sponge areas using the "visc_factor"
319! and/or "diff_factor" read from input Grid NetCDF file.
320# endif
321!-----------------------------------------------------------------------
322!
323 DO tile=first_tile(ng),last_tile(ng),+1
324 CALL ini_hmixcoef (ng, tile, itlm)
325 END DO
326
327# ifdef ANA_SPONGE
328!
329!-----------------------------------------------------------------------
330! Increase horizontal mixing coefficients in sponge areas using
331! analytical functions.
332!-----------------------------------------------------------------------
333!
334 IF (lsponge(ng)) THEN
335 DO tile=first_tile(ng),last_tile(ng),+1
336 CALL ana_sponge (ng, tile, itlm)
337 END DO
338 END IF
339# endif
340!
341!=======================================================================
342! Initialize model state variables and forcing. This part is
343! executed for each ensemble/perturbation/iteration pass.
344!=======================================================================
345
346# if defined FOUR_DVAR && \
347 !defined I4DVAR_ANA_SENSITIVITY && \
348 !(defined HESSIAN_SV || \
349 defined hessian_so || \
350 defined hessian_fsv)
351# if defined OPT_OBSERVATIONS || defined TLM_CHECK || \
352 defined weak_constraint
353!
354! Clear tangent linear state variables.
355!
356 DO tile=first_tile(ng),last_tile(ng),+1
357 CALL initialize_ocean (ng, tile, itlm)
358# ifdef SOLVE3D
359 CALL initialize_coupling (ng, tile, 0)
360# endif
361# ifdef SP4DVAR
362 CALL initialize_ocean (ng, tile, inlm)
363 CALL initialize_forces (ng, tile, inlm)
364# endif
365 END DO
366
367# else
368# ifndef WEAK_CONSTRAINT
369!
370!-----------------------------------------------------------------------
371! If first interation of the inner loop, clear all tangent linear
372! variables. In incrementatal 4DVAR, the tangent linear model is
373! started from rest on the first pass of the inner loop for each
374! outer loop iteration.
375!-----------------------------------------------------------------------
376!
377 IF (inner.eq.0) THEN
378 DO tile=first_tile(ng),last_tile(ng),+1
379# ifdef ADJUST_BOUNDARY
380 CALL initialize_boundary (ng, tile, itlm)
381# endif
382# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
383 CALL initialize_forces (ng, tile, itlm)
384# endif
385 CALL initialize_ocean (ng, tile, itlm)
386 END DO
387!
388! Rewrite tangent linear initial NetCDF (record 1) with zero initial
389! conditions since the model needs to be started from at the first
390! pass of the inner loop.
391!
392 IF (nrun.gt.1) THEN
393 wrtrec=1
394# ifdef DISTRIBUTE
395 CALL tl_wrt_ini (ng, myrank, tindex, wrtrec)
396# else
397 CALL tl_wrt_ini (ng, -1, tindex, wrtrec)
398# endif
399 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
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! Initialize tangent linear bathymetry to zero.
412!-----------------------------------------------------------------------
413!
414 DO tile=first_tile(ng),last_tile(ng),+1
415 CALL tl_bath (ng, tile)
416 END DO
417# endif
418!
419!-----------------------------------------------------------------------
420! Set tangent linear model state variables initial conditions.
421!-----------------------------------------------------------------------
422
423# ifdef ANA_INITIAL
424!
425! Analytical initial conditions for momentum and active tracers.
426!
427 IF (nrrec(ng).eq.0) THEN
428 DO tile=first_tile(ng),last_tile(ng),+1
429 CALL ana_initial (ng, tile, itlm)
430 END DO
431 END IF
432# endif
433
434# if defined ANA_PASSIVE && defined SOLVE3D
435!
436! Analytical initial conditions for inert passive tracers.
437!
438 IF (nrrec(ng).eq.0) THEN
439 DO tile=first_tile(ng),last_tile(ng),+1
440 CALL ana_passive (ng, tile, itlm)
441 END DO
442 END IF
443# endif
444
445# if defined ANA_BIOLOGY && defined SOLVE3D
446!
447! Analytical initial conditions for biology.
448!
449 IF (nrrec(ng).eq.0) THEN
450 DO tile=first_tile(ng),last_tile(ng),+1
451 CALL ana_biology (ng, tile, itlm)
452 END DO
453 END IF
454# endif
455
456# if defined ANA_SEDIMENT_NOT_YET && defined SOLVE3D
457!
458! Analytical initial conditions for sediment.
459!
460 IF (nrrec(ng).eq.0) THEN
461 DO tile=first_tile(ng),last_tile(ng),+1
462 CALL ana_sediment (ng, tile, itlm)
463 END DO
464 END IF
465# endif
466
467# ifdef I4DVAR_ANA_SENSITIVITY
468!
469! Initialize with the weighted sum of all Lanczos vectors computed
470! from the first outer loop of the I4D-VAR Lanczos algorithm.
471!
472 DO tile=first_tile(ng),last_tile(ng),+1
473 CALL ini_lanczos (ng, tile, lnew(ng), tindex)
474 END DO
475
476# else
477!
478! Read in initial conditions for initial or restart NetCDF file.
479!
480# ifdef INI_FILE
481 CALL get_state (ng, itlm, 1, itl(ng), inirec, tindex)
482 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
483 time(ng)=io_time ! needed for shared-memory
484# else
485 IF (nrrec(ng).ne.0) THEN
486 CALL get_state (ng, itlm, 1, itl(ng), inirec, tindex)
487 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
488 time(ng)=io_time ! needed for shared-memory
489 END IF
490# endif
491# endif
492
493# ifdef WET_DRY
494!
495!-----------------------------------------------------------------------
496! Process initial wet/dry masks.
497!-----------------------------------------------------------------------
498!
499! If restart, read in wet/dry masks.
500!
501 IF (nrrec(ng).ne.0) THEN
502# ifdef DISTRIBUTE
503 CALL get_wetdry (ng, myrank, itlm, inirec(ng))
504 CALL mp_bcasti (ng, itlm, exit_flag)
505# else
506 CALL get_wetdry (ng, -1, itlm, inirec(ng))
507# endif
508 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
509 ELSE
510 DO tile=first_tile(ng),last_tile(ng),+1
511 CALL wetdry (ng, tile, tindex(ng), .true.)
512 END DO
513 END IF
514# endif
515
516# ifdef OBSERVATIONS
517!
518!-----------------------------------------------------------------------
519! Open observations NetCDF file and initialize various variables
520! needed for processing the tangent linear state solution at
521! observation locations. Need to be done after processing initial
522! conditions since the correct initial time is needed to determine
523! the first "ObsTime" to process.
524!-----------------------------------------------------------------------
525!
526 CALL obs_initial (ng, itlm, .false.)
527 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
528# endif
529
530# if defined ANA_PERTURB && defined SANITY_CHECK
531!
532!-----------------------------------------------------------------------
533! Perturb tangent linear initial conditions with analitical
534! expressions.
535!-----------------------------------------------------------------------
536!
537 DO tile=first_tile(ng),last_tile(ng),+1
538 CALL ana_perturb (ng, tile, itlm)
539 END DO
540# endif
541
542# ifdef TLM_CHECK
543!
544!-----------------------------------------------------------------------
545! Perturb tangent linear state variable according to the outer loop
546! iteration with the steepest descent direction of the gradient
547! (adjoint state).
548!-----------------------------------------------------------------------
549!
550 DO tile=first_tile(ng),last_tile(ng),+1
551 CALL tl_ini_perturb (ng, tile, lnew(ng), tindex)
552 END DO
553# endif
554
555# ifdef SOLVE3D
556!!
557!!----------------------------------------------------------------------
558!! Compute initial time-evolving depths.
559!!----------------------------------------------------------------------
560!!
561!! DO tile=first_tile(ng),last_tile(ng),+1
562!! CALL tl_set_depth (ng, tile, iTLM)
563!! END DO
564!!
565!!----------------------------------------------------------------------
566!! Compute initial horizontal mass fluxes, Hz*u/n and Hz*v/m.
567!!----------------------------------------------------------------------
568!!
569!! DO tile=first_tile(ng),last_tile(ng),+1
570!! CALL tl_set_massflux (ng, tile, iTLM)
571!! END DO
572!!
573!!----------------------------------------------------------------------
574!! Compute initial S-coordinates vertical velocity. Compute initial
575!! density anomaly from potential temperature and salinity via equation
576!! of state for seawater. Also compute other equation of state related
577!! quatities.
578!!----------------------------------------------------------------------
579!!
580!! DO tile=first_tile(ng),last_tile(ng),+1
581!! CALL tl_omega (ng, tile, iTLM)
582!! CALL tl_rho_eos (ng, tile, iTLM)
583!! END DO
584# endif
585
586#ifdef ANA_PSOURCE
587!
588!-----------------------------------------------------------------------
589! Set point Sources/Sinks position, direction, special flag, and mass
590! transport nondimensional shape profile with analytcal expressions.
591! Point sources are at U- and V-points. We need to get their positions
592! to process internal Land/Sea masking arrays during initialization.
593!-----------------------------------------------------------------------
594!
595 IF (luvsrc(ng).or.lwsrc(ng).or.any(ltracersrc(:,ng))) THEN
596 DO tile=first_tile(ng),last_tile(ng),+1
597 CALL ana_psource (ng, tile, itlm)
598 END DO
599 END IF
600#endif
601!
602!-----------------------------------------------------------------------
603! If applicable, close all input boundary, climatology, and forcing
604! NetCDF files and set associated parameters to the closed state. This
605! step is essential in iterative algorithms that run the full TLM
606! repetitively. Then, Initialize several parameters in their file
607! structure, so the appropriate input single or multi-file is selected
608! during initialization/restart.
609!-----------------------------------------------------------------------
610!
611 CALL close_inp (ng, itlm)
612 CALL check_multifile (ng, itlm)
613# ifdef DISTRIBUTE
614 CALL mp_bcasti (ng, itlm, exit_flag)
615# endif
616 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
617!
618!-----------------------------------------------------------------------
619! Read in initial forcing, climatology and assimilation data from
620! input NetCDF files. It loads the first relevant data record for
621! the time-interpolation between snapshots.
622!-----------------------------------------------------------------------
623!
624 CALL tl_get_idata (ng)
625 CALL tl_get_data (ng)
626# ifdef DISTRIBUTE
627 CALL mp_bcasti (ng, itlm, exit_flag)
628# endif
629 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
630
631# if defined SOLVE3D && defined TLM_DRIVER
632!
633!-----------------------------------------------------------------------
634! Compute nonlinear initial time-evolving depths.
635!-----------------------------------------------------------------------
636!
637 DO tile=first_tile(ng),last_tile(ng),+1
638# ifdef NONLINEAR
639 CALL set_zeta_timeavg (ng, tile, itlm)
640# endif
641 CALL set_depth (ng, tile, itlm)
642 END DO
643# endif
644
645# ifdef MASKING
646!
647!-----------------------------------------------------------------------
648! Set internal I/O mask arrays.
649!-----------------------------------------------------------------------
650!
651 DO tile=first_tile(ng),last_tile(ng),+1
652 CALL set_masks (ng, tile, itlm)
653 END DO
654# endif
655
656# if defined PROPAGATOR || \
657 (defined masking && (defined read_water || defined write_water ))
658!
659!-----------------------------------------------------------------------
660! Set variables associated with the processing water points and/or
661! size of packed state arrays.
662!-----------------------------------------------------------------------
663!
664 DO tile=first_tile(ng),last_tile(ng),+1
665 CALL wpoints (ng, tile, itlm)
666 END DO
667# endif
668
669# ifdef WEAK_CONSTRAINT
670!
671!-----------------------------------------------------------------------
672! If available, read in first TLM impulse forcing and its application
673! time. In true weak constraint applications, the impulse records
674! after the initial are associated with the model error and are
675! processed with different statistics. If there is only one (initial)
676! impulse forcing available, the assimilation tis similar to strong
677! constraint but in observation space.
678!-----------------------------------------------------------------------
679!
680 IF (nadj(ng).lt.ntimes(ng)) THEN
681 inirec=1
682 CALL get_state (ng, 7, 7, tlf(ng), inirec, 1)
683 IF (founderror(exit_flag, noerror, __line__, myfile)) RETURN
684 END IF
685# endif
686
687# if defined ANA_DRAG && defined UV_DRAG_GRID
688!
689!-----------------------------------------------------------------------
690! Set analytical spatially varying bottom friction parameter.
691!-----------------------------------------------------------------------
692!
693 IF (nrun.eq.erstr) THEN
694 DO tile=first_tile(ng),last_tile(ng),+1
695 CALL ana_drag (ng, tile, itlm)
696 END DO
697 END IF
698# endif
699!
700!-----------------------------------------------------------------------
701! Compute grid stiffness.
702!-----------------------------------------------------------------------
703!
704 IF (lstiffness) THEN
705 lstiffness=.false.
706 DO tile=first_tile(ng),last_tile(ng),+1
707 CALL stiffness (ng, tile, itlm)
708 END DO
709 END IF
710
711# if defined FLOATS_NOT_YET || defined STATIONS
712!
713!-----------------------------------------------------------------------
714! If applicable, convert initial locations to fractional grid
715! coordinates.
716!-----------------------------------------------------------------------
717!
718 CALL grid_coords (ng, itlm)
719# endif
720
721# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
722!
723!-----------------------------------------------------------------------
724! Read in initial forcing from coupled wave model.
725!-----------------------------------------------------------------------
726!
727 DO tile=first_tile(ng),last_tile(ng),+1
728 CALL ocn2wav_coupling (ng, tile)
729 END DO
730# endif
731!
732!-----------------------------------------------------------------------
733! Initialize time-stepping counter.
734!-----------------------------------------------------------------------
735!
736 iic(ng)=ntstart(ng)
737 CALL time_string (time(ng), time_code(ng))
738
739# ifdef PROFILE
740!
741!-----------------------------------------------------------------------
742! Turn off initiialization time wall clock.
743!-----------------------------------------------------------------------
744!
745 DO thread=thread_range
746 CALL wclock_off (ng, itlm, 2, __line__, myfile)
747 END DO
748# endif
749!
750 RETURN
subroutine check_multifile(ng, model)
subroutine grid_coords(ng, model)
Definition grid_coords.F:4
subroutine ana_sediment(ng, tile, model)
Definition ana_sediment.h:3
subroutine ana_initial(ng, tile, model)
Definition ana_initial.h:3
subroutine ana_sponge(ng, tile, model)
Definition ana_hmixcoef.h:3
subroutine ana_drag(ng, tile, model)
Definition ana_drag.h:3
subroutine ana_psource(ng, tile, model)
Definition ana_psource.h:3
subroutine ana_perturb(ng, tile, model)
Definition ana_perturb.h:3
subroutine ana_biology(ng, tile, model)
Definition ana_biology.h:3
subroutine ana_passive(ng, tile, model)
Definition ana_passive.h:3
subroutine, public close_inp(ng, model)
Definition close_io.F:92
subroutine, public time_string(mytime, date_string)
Definition dateclock.F:1272
subroutine, public get_state(ng, model, msg, s, inirec, tindex)
Definition get_state.F:90
subroutine, public get_wetdry(ng, tile, model, inirec)
Definition get_wetdry.F:45
subroutine, public tl_ini_perturb(ng, tile, linp, lout)
subroutine, public set_zeta_timeavg(ng, tile, model)
Definition ini_fields.F:986
subroutine, public ini_hmixcoef(ng, tile, model)
subroutine, public ini_lanczos(ng, tile, ladj, lini)
Definition ini_lanczos.F:68
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
integer stdout
subroutine, public initialize_ocean(ng, tile, model)
Definition mod_ocean.F:1526
integer, dimension(:), allocatable first_tile
logical master
integer, dimension(:), allocatable last_tile
integer, parameter inlm
Definition mod_param.F:662
integer, parameter itlm
Definition mod_param.F:663
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
logical lstiffness
real(dp) avgke
real(dp) avgpe
integer, dimension(:), allocatable next_kstp
logical, dimension(:), allocatable synchro_flag
logical, dimension(:), allocatable predictor_2d_step
real(dp), dimension(:), allocatable tdays
real(dp) tl_ubar_xs
real(dp) dstart
logical, dimension(:), allocatable lwsrc
integer, dimension(:), allocatable ntend
real(dp) volume
integer, dimension(:), allocatable first_time
character(len=22), dimension(:), allocatable time_code
integer exit_flag
integer, dimension(:), allocatable indx1
integer, dimension(:), allocatable sfcount
integer erstr
real(dp) avgkp
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 nrun
integer, dimension(:), allocatable step_counter
integer, dimension(:), allocatable nadj
integer inner
integer, dimension(:), allocatable iif
real(dp) io_time
real(dp), dimension(:), allocatable initime
integer noerror
integer outer
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)
Definition obs_initial.F:41
subroutine, public set_depth(ng, tile, model)
Definition set_depth.F:34
subroutine, public set_masks(ng, tile, model)
Definition set_masks.F:44
subroutine, public stiffness(ng, tile, model)
Definition stiffness.F:32
logical function, public founderror(flag, noerr, line, routine)
Definition strings.F:52
subroutine, public tl_def_ini(ng)
Definition tl_def_ini.F:43
subroutine, public tl_omega(ng, tile, model)
Definition tl_omega.F:35
subroutine, public tl_rho_eos(ng, tile, model)
Definition tl_rho_eos.F:48
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)
Definition tl_wrt_ini.F:74
subroutine wetdry(ng, tile, tindex, linitialize)
Definition wetdry.F:22
subroutine set_grid(ng, model)
Definition set_grid.F:3
recursive subroutine wclock_off(ng, model, region, line, routine)
Definition timers.F:148
recursive subroutine wclock_on(ng, model, region, line, routine)
Definition timers.F:3
subroutine tl_get_data(ng)
Definition tl_get_data.F:4
subroutine tl_get_idata(ng)
Definition tl_get_idata.F:4
subroutine wpoints(ng, tile, model)
Definition wpoints.F:40

References analytical_mod::ana_biology(), analytical_mod::ana_drag(), analytical_mod::ana_initial(), analytical_mod::ana_passive(), analytical_mod::ana_perturb(), analytical_mod::ana_psource(), analytical_mod::ana_sediment(), analytical_mod::ana_sponge(), mod_scalars::avgke, mod_scalars::avgkp, mod_scalars::avgpe, check_multifile(), close_io_mod::close_inp(), mod_scalars::day2sec, mod_scalars::dstart, mod_scalars::dt, mod_scalars::erstr, mod_scalars::exit_flag, mod_parallel::first_tile, mod_scalars::first_time, strings_mod::founderror(), get_state_mod::get_state(), get_wetdry_mod::get_wetdry(), grid_coords(), mod_scalars::iic, mod_scalars::iif, mod_scalars::indx1, ini_hmixcoef_mod::ini_hmixcoef(), ini_lanczos_mod::ini_lanczos(), mod_boundary::initialize_boundary(), mod_coupling::initialize_coupling(), mod_forces::initialize_forces(), mod_ocean::initialize_ocean(), mod_scalars::initime, mod_param::inlm, mod_scalars::inner, mod_scalars::io_time, mod_iounits::itl, mod_param::itlm, mod_stepping::knew, mod_stepping::krhs, mod_stepping::kstp, mod_parallel::last_tile, mod_scalars::ldefitl, mod_scalars::ldeftlm, mod_stepping::lnew, mod_scalars::lsponge, mod_scalars::lstiffness, mod_scalars::ltracersrc, mod_scalars::luvsrc, mod_scalars::lwrttlm, mod_scalars::lwsrc, mod_parallel::master, mod_parallel::myrank, mod_scalars::nadj, mod_scalars::next_kstp, mod_stepping::nf, mod_stepping::nfm1, mod_stepping::nfm2, mod_stepping::nfm3, mod_stepping::nfp1, mod_stepping::nnew, mod_scalars::noerror, mod_stepping::nrhs, mod_scalars::nrrec, mod_scalars::nrun, mod_stepping::nstp, mod_scalars::ntend, mod_scalars::ntfirst, mod_scalars::ntimes, mod_scalars::ntstart, mod_scalars::obccount, obs_initial_mod::obs_initial(), mod_scalars::outer, mod_scalars::predictor_2d_step, set_depth_mod::set_depth(), set_grid(), set_masks_mod::set_masks(), ini_fields_mod::set_zeta_timeavg(), mod_scalars::setgridconfig, mod_scalars::sfcount, mod_iounits::stdout, mod_scalars::step_counter, stiffness_mod::stiffness(), mod_scalars::synchro_flag, mod_scalars::tdays, mod_scalars::time, mod_scalars::time_code, dateclock_mod::time_string(), tl_set_depth_mod::tl_bath(), tl_def_ini_mod::tl_def_ini(), tl_get_data(), tl_get_idata(), ini_adjust_mod::tl_ini_perturb(), tl_omega_mod::tl_omega(), tl_rho_eos_mod::tl_rho_eos(), tl_set_depth_mod::tl_set_depth(), tl_set_massflux_mod::tl_set_massflux(), mod_scalars::tl_ubar_xs, mod_scalars::tl_volcons, tl_wrt_ini_mod::tl_wrt_ini(), mod_iounits::tlf, mod_iounits::tlm, mod_scalars::volume, wclock_off(), wclock_on(), wetdry_mod::wetdry(), and wpoints().

Referenced by i4dvar_mod::increment(), r4dvar_mod::increment(), rbl4dvar_mod::increment(), and roms_kernel_mod::roms_run().

Here is the call graph for this function:
Here is the caller graph for this function: