4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
27# if defined SSH_TIDES_NOT_YET || defined UV_TIDES_NOT_YET
29# endif
30
32
33 implicit none
34
35
36
37 integer, intent(in) :: ng
38
39
40
41 logical, save :: recordless = .true.
42
43 logical, dimension(3) :: update = &
44 & (/ .FALSE., .FALSE., .FALSE. /)
45
46 integer :: LBi, UBi, LBj, UBj
47 integer :: itrc, is
48
49 real(r8) :: time_save = 0.0_r8
50
51 character (len=*), parameter :: MyFile = &
52 & __FILE__
53
55
56
57
58 lbi=lbound(
grid(ng)%h,dim=1)
59 ubi=ubound(
grid(ng)%h,dim=1)
60 lbj=lbound(
grid(ng)%h,dim=2)
61 ubj=ubound(
grid(ng)%h,dim=2)
62
63# ifdef PROFILE
64
65
66
67
68
70# endif
71
72# if defined SSH_TIDES_NOT_YET || defined UV_TIDES_NOT_YET
73
74
75
76
77
78
79
81 IF (
iic(ng).eq.0)
THEN
83# if defined PIO_LIB && defined DISTRIBUTE
85# endif
86 & 1,
tide(ng), recordless, update(1), &
87 & 1,
mtc, 1, 1, 1,
ntc(ng), 1, &
88 &
tides(ng) % Tperiod)
90 END IF
91 END IF
92# endif
93
94# ifdef SSH_TIDES_NOT_YET
95
96
97
98
99
101 IF (
iic(ng).eq.0)
THEN
103 time(ng)=8640000.0_r8
105
107# if defined PIO_LIB && defined DISTRIBUTE
108 &
tide(ng)%pioFile, &
109# endif
110 & 1,
tide(ng), update(1), &
111 & lbi, ubi, lbj, ubj,
mtc,
ntc(ng), &
112# ifdef MASKING
113 &
grid(ng) % rmask, &
114# endif
115 &
tides(ng) % SSH_Tamp)
117
119# if defined PIO_LIB && defined DISTRIBUTE
120 &
tide(ng)%pioFile, &
121# endif
122 & 1,
tide(ng), update(1), &
123 & lbi, ubi, lbj, ubj,
mtc,
ntc(ng), &
124# ifdef MASKING
125 &
grid(ng) % rmask, &
126# endif
127 &
tides(ng) % SSH_Tphase)
129
132 END IF
133 END IF
134# endif
135
136# ifdef UV_TIDES_NOT_YET
137
138
139
141 IF (
iic(ng).eq.0)
THEN
143 time(ng)=8640000.0_r8
145
147# if defined PIO_LIB && defined DISTRIBUTE
148 &
tide(ng)%pioFile, &
149# endif
150 & 1,
tide(ng), update(1), &
151 & lbi, ubi, lbj, ubj,
mtc,
ntc(ng), &
152# ifdef MASKING
153 &
grid(ng) % rmask, &
154# endif
155 &
tides(ng) % UV_Tangle)
157
159# if defined PIO_LIB && defined DISTRIBUTE
160 &
tide(ng)%pioFile, &
161# endif
162 & 1,
tide(ng), update(1), &
163 & lbi, ubi, lbj, ubj,
mtc,
ntc(ng), &
164# ifdef MASKING
165 &
grid(ng) % rmask, &
166# endif
167 &
tides(ng) % UV_Tphase)
169
171# if defined PIO_LIB && defined DISTRIBUTE
172 &
tide(ng)%pioFile, &
173# endif
174 & 1,
tide(ng), update(1), &
175 & lbi, ubi, lbj, ubj,
mtc,
ntc(ng), &
176# ifdef MASKING
177 &
grid(ng) % rmask, &
178# endif
179 &
tides(ng) % UV_Tmajor)
181
183# if defined PIO_LIB && defined DISTRIBUTE
184 &
tide(ng)%pioFile, &
185# endif
186 & 1,
tide(ng), update(1), &
187 & lbi, ubi, lbj, ubj,
mtc,
ntc(ng), &
188# ifdef MASKING
189 &
grid(ng) % rmask, &
190# endif
191 &
tides(ng) % UV_Tminor)
193
196 END IF
197 END IF
198# endif
199
200# ifndef ANA_PSOURCE
201
202
203
204
205
206
207
208 IF ((
iic(ng).eq.0).and. &
211# if defined PIO_LIB && defined DISTRIBUTE
213# endif
214 & 1,
ssf(ng), recordless, update(1), &
215 & 1,
nsrc(ng), 1, 1, 1,
nsrc(ng), 1, &
218
220# if defined PIO_LIB && defined DISTRIBUTE
222# endif
223 & 1,
ssf(ng), recordless, update(1), &
224 & 1,
nsrc(ng), 1, 1, 1,
nsrc(ng), 1, &
227
229# if defined PIO_LIB && defined DISTRIBUTE
231# endif
232 & 1,
ssf(ng), recordless, update(1), &
233 & 1,
nsrc(ng), 1, 1, 1,
nsrc(ng), 1, &
236
237# ifdef SOLVE3D
238
240# if defined PIO_LIB && defined DISTRIBUTE
242# endif
243 & 1,
ssf(ng), recordless, update(1), &
244 & 1,
nsrc(ng),
n(ng), 1, 1,
nsrc(ng),
n(ng), &
247# endif
248
251 & max(1,min(nint(
sources(ng)%Xsrc(is)),
lm(ng)+1))
253 & max(1,min(nint(
sources(ng)%Ysrc(is)),
mm(ng)+1))
254 END DO
255 END IF
256# endif
257
258# ifdef PROFILE
259
260
261
262
263
265# endif
266
267 RETURN
subroutine get_2dfld(ng, model, ifield, ncid, piofile, nfiles, s, update, lbi, ubi, lbj, ubj, 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_grid), dimension(:), allocatable grid
type(t_io), dimension(:), allocatable ssf
type(t_io), dimension(:), allocatable tide
character(len=256) sourcefile
integer, dimension(:), allocatable n
integer, dimension(:), allocatable lm
integer, dimension(:), allocatable mm
logical, dimension(:), allocatable luvsrc
logical, dimension(:,:), allocatable ltracersrc
integer, dimension(:), allocatable iic
logical, dimension(:), allocatable lprocesstides
real(dp), dimension(:), allocatable tdays
logical, dimension(:), allocatable lwsrc
real(dp), parameter sec2day
real(dp), dimension(:), allocatable time
type(t_sources), dimension(:), allocatable sources
integer, dimension(:), allocatable nsrc
integer, dimension(:), allocatable ntc
type(t_tides), dimension(:), allocatable tides
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)