1 | MODULE closea |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE closea *** |
---|
4 | !! Closed Seas : specific treatments associated with closed seas |
---|
5 | !!====================================================================== |
---|
6 | !! History : 8.2 ! 00-05 (O. Marti) Original code |
---|
7 | !! 8.5 ! 02-06 (E. Durand, G. Madec) F90 |
---|
8 | !! 9.0 ! 06-07 (G. Madec) add clo_rnf, clo_ups, clo_bat |
---|
9 | !! NEMO 3.4 ! 03-12 (P.G. Fogli) sbc_clo bug fix & mpp reproducibility |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! dom_clo : modification of the ocean domain for closed seas cases |
---|
14 | !! sbc_clo : Special handling of closed seas |
---|
15 | !! clo_rnf : set close sea outflows as river mouths (see sbcrnf) |
---|
16 | !! clo_ups : set mixed centered/upstream scheme in closed sea (see traadv_cen2) |
---|
17 | !! clo_bat : set to zero a field over closed sea (see domzrg) |
---|
18 | !!---------------------------------------------------------------------- |
---|
19 | USE oce ! dynamics and tracers |
---|
20 | USE dom_oce ! ocean space and time domain |
---|
21 | USE phycst ! physical constants |
---|
22 | USE in_out_manager ! I/O manager |
---|
23 | USE sbc_oce ! ocean surface boundary conditions |
---|
24 | USE lib_fortran, ONLY: glob_sum, DDPDD |
---|
25 | USE lbclnk ! lateral boundary condition - MPP exchanges |
---|
26 | USE lib_mpp ! MPP library |
---|
27 | USE timing |
---|
28 | |
---|
29 | IMPLICIT NONE |
---|
30 | PRIVATE |
---|
31 | |
---|
32 | PUBLIC dom_clo ! routine called by domain module |
---|
33 | PUBLIC sbc_clo ! routine called by step module |
---|
34 | PUBLIC clo_rnf ! routine called by sbcrnf module |
---|
35 | PUBLIC clo_ups ! routine called in traadv_cen2(_jki) module |
---|
36 | PUBLIC clo_bat ! routine called in domzgr module |
---|
37 | |
---|
38 | INTEGER, PUBLIC, PARAMETER :: jpncs = 4 !: number of closed sea |
---|
39 | INTEGER, PUBLIC, DIMENSION(jpncs) :: ncstt !: Type of closed sea |
---|
40 | INTEGER, PUBLIC, DIMENSION(jpncs) :: ncsi1, ncsj1 !: south-west closed sea limits (i,j) |
---|
41 | INTEGER, PUBLIC, DIMENSION(jpncs) :: ncsi2, ncsj2 !: north-east closed sea limits (i,j) |
---|
42 | INTEGER, PUBLIC, DIMENSION(jpncs) :: ncsnr !: number of point where run-off pours |
---|
43 | INTEGER, PUBLIC, DIMENSION(jpncs,4) :: ncsir, ncsjr !: Location of runoff |
---|
44 | |
---|
45 | REAL(wp), DIMENSION (jpncs+1) :: surf ! closed sea surface |
---|
46 | |
---|
47 | !! * Substitutions |
---|
48 | # include "vectopt_loop_substitute.h90" |
---|
49 | !!---------------------------------------------------------------------- |
---|
50 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
51 | !! $Id$ |
---|
52 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
53 | !!---------------------------------------------------------------------- |
---|
54 | CONTAINS |
---|
55 | |
---|
56 | SUBROUTINE dom_clo |
---|
57 | !!--------------------------------------------------------------------- |
---|
58 | !! *** ROUTINE dom_clo *** |
---|
59 | !! |
---|
60 | !! ** Purpose : Closed sea domain initialization |
---|
61 | !! |
---|
62 | !! ** Method : if a closed sea is located only in a model grid point |
---|
63 | !! just the thermodynamic processes are applied. |
---|
64 | !! |
---|
65 | !! ** Action : ncsi1(), ncsj1() : south-west closed sea limits (i,j) |
---|
66 | !! ncsi2(), ncsj2() : north-east Closed sea limits (i,j) |
---|
67 | !! ncsir(), ncsjr() : Location of runoff |
---|
68 | !! ncsnr : number of point where run-off pours |
---|
69 | !! ncstt : Type of closed sea |
---|
70 | !! =0 spread over the world ocean |
---|
71 | !! =2 put at location runoff |
---|
72 | !!---------------------------------------------------------------------- |
---|
73 | INTEGER :: jc ! dummy loop indices |
---|
74 | !!---------------------------------------------------------------------- |
---|
75 | |
---|
76 | IF(lwp) WRITE(numout,*) |
---|
77 | IF(lwp) WRITE(numout,*)'dom_clo : closed seas ' |
---|
78 | IF(lwp) WRITE(numout,*)'~~~~~~~' |
---|
79 | |
---|
80 | ! initial values |
---|
81 | ncsnr(:) = 1 ; ncsi1(:) = 1 ; ncsi2(:) = 1 ; ncsir(:,:) = 1 |
---|
82 | ncstt(:) = 0 ; ncsj1(:) = 1 ; ncsj2(:) = 1 ; ncsjr(:,:) = 1 |
---|
83 | |
---|
84 | ! set the closed seas (in data domain indices) |
---|
85 | ! ------------------- |
---|
86 | |
---|
87 | IF( cp_cfg == "orca" ) THEN |
---|
88 | ! |
---|
89 | SELECT CASE ( jp_cfg ) |
---|
90 | ! ! ======================= |
---|
91 | CASE ( 1 ) ! ORCA_R1 configuration |
---|
92 | ! ! ======================= |
---|
93 | ncsnr(1) = 1 ; ncstt(1) = 0 ! Caspian Sea |
---|
94 | ncsi1(1) = 332 ; ncsj1(1) = 203 |
---|
95 | ncsi2(1) = 344 ; ncsj2(1) = 235 |
---|
96 | ncsir(1,1) = 1 ; ncsjr(1,1) = 1 |
---|
97 | ! |
---|
98 | ! ! ======================= |
---|
99 | CASE ( 2 ) ! ORCA_R2 configuration |
---|
100 | ! ! ======================= |
---|
101 | ! ! Caspian Sea |
---|
102 | ncsnr(1) = 1 ; ncstt(1) = 0 ! spread over the globe |
---|
103 | ncsi1(1) = 11 ; ncsj1(1) = 103 |
---|
104 | ncsi2(1) = 17 ; ncsj2(1) = 112 |
---|
105 | ncsir(1,1) = 1 ; ncsjr(1,1) = 1 |
---|
106 | ! ! Great North American Lakes |
---|
107 | ncsnr(2) = 1 ; ncstt(2) = 2 ! put at St Laurent mouth |
---|
108 | ncsi1(2) = 97 ; ncsj1(2) = 107 |
---|
109 | ncsi2(2) = 103 ; ncsj2(2) = 111 |
---|
110 | ncsir(2,1) = 110 ; ncsjr(2,1) = 111 |
---|
111 | ! ! Black Sea (crossed by the cyclic boundary condition) |
---|
112 | ncsnr(3:4) = 4 ; ncstt(3:4) = 2 ! put in Med Sea (north of Aegean Sea) |
---|
113 | ncsir(3:4,1) = 171; ncsjr(3:4,1) = 106 ! |
---|
114 | ncsir(3:4,2) = 170; ncsjr(3:4,2) = 106 |
---|
115 | ncsir(3:4,3) = 171; ncsjr(3:4,3) = 105 |
---|
116 | ncsir(3:4,4) = 170; ncsjr(3:4,4) = 105 |
---|
117 | ncsi1(3) = 174 ; ncsj1(3) = 107 ! 1 : west part of the Black Sea |
---|
118 | ncsi2(3) = 181 ; ncsj2(3) = 112 ! (ie west of the cyclic b.c.) |
---|
119 | ncsi1(4) = 2 ; ncsj1(4) = 107 ! 2 : east part of the Black Sea |
---|
120 | ncsi2(4) = 6 ; ncsj2(4) = 112 ! (ie east of the cyclic b.c.) |
---|
121 | |
---|
122 | |
---|
123 | |
---|
124 | ! ! ======================= |
---|
125 | CASE ( 4 ) ! ORCA_R4 configuration |
---|
126 | ! ! ======================= |
---|
127 | ! ! Caspian Sea |
---|
128 | ncsnr(1) = 1 ; ncstt(1) = 0 |
---|
129 | ncsi1(1) = 4 ; ncsj1(1) = 53 |
---|
130 | ncsi2(1) = 4 ; ncsj2(1) = 56 |
---|
131 | ncsir(1,1) = 1 ; ncsjr(1,1) = 1 |
---|
132 | ! ! Great North American Lakes |
---|
133 | ncsnr(2) = 1 ; ncstt(2) = 2 |
---|
134 | ncsi1(2) = 49 ; ncsj1(2) = 55 |
---|
135 | ncsi2(2) = 51 ; ncsj2(2) = 56 |
---|
136 | ncsir(2,1) = 57 ; ncsjr(2,1) = 55 |
---|
137 | ! ! Black Sea |
---|
138 | ncsnr(3) = 4 ; ncstt(3) = 2 |
---|
139 | ncsi1(3) = 88 ; ncsj1(3) = 55 |
---|
140 | ncsi2(3) = 91 ; ncsj2(3) = 56 |
---|
141 | ncsir(3,1) = 86 ; ncsjr(3,1) = 53 |
---|
142 | ncsir(3,2) = 87 ; ncsjr(3,2) = 53 |
---|
143 | ncsir(3,3) = 86 ; ncsjr(3,3) = 52 |
---|
144 | ncsir(3,4) = 87 ; ncsjr(3,4) = 52 |
---|
145 | ! ! Baltic Sea |
---|
146 | ncsnr(4) = 1 ; ncstt(4) = 2 |
---|
147 | ncsi1(4) = 75 ; ncsj1(4) = 59 |
---|
148 | ncsi2(4) = 76 ; ncsj2(4) = 61 |
---|
149 | ncsir(4,1) = 84 ; ncsjr(4,1) = 59 |
---|
150 | ! ! ======================= |
---|
151 | CASE ( 025 ) ! ORCA_R025 configuration |
---|
152 | ! ! ======================= |
---|
153 | ncsnr(1) = 1 ; ncstt(1) = 0 ! Caspian + Aral sea |
---|
154 | ncsi1(1) = 1330 ; ncsj1(1) = 645 |
---|
155 | ncsi2(1) = 1400 ; ncsj2(1) = 795 |
---|
156 | ncsir(1,1) = 1 ; ncsjr(1,1) = 1 |
---|
157 | ! |
---|
158 | ncsnr(2) = 1 ; ncstt(2) = 0 ! Azov Sea |
---|
159 | ncsi1(2) = 1284 ; ncsj1(2) = 722 |
---|
160 | ncsi2(2) = 1304 ; ncsj2(2) = 747 |
---|
161 | ncsir(2,1) = 1 ; ncsjr(2,1) = 1 |
---|
162 | ! |
---|
163 | END SELECT |
---|
164 | ! |
---|
165 | ENDIF |
---|
166 | |
---|
167 | ! convert the position in local domain indices |
---|
168 | ! -------------------------------------------- |
---|
169 | DO jc = 1, jpncs |
---|
170 | ncsi1(jc) = mi0( ncsi1(jc) ) |
---|
171 | ncsj1(jc) = mj0( ncsj1(jc) ) |
---|
172 | |
---|
173 | ncsi2(jc) = mi1( ncsi2(jc) ) |
---|
174 | ncsj2(jc) = mj1( ncsj2(jc) ) |
---|
175 | END DO |
---|
176 | ! |
---|
177 | END SUBROUTINE dom_clo |
---|
178 | |
---|
179 | |
---|
180 | SUBROUTINE sbc_clo( kt ) |
---|
181 | !!--------------------------------------------------------------------- |
---|
182 | !! *** ROUTINE sbc_clo *** |
---|
183 | !! |
---|
184 | !! ** Purpose : Special handling of closed seas |
---|
185 | !! |
---|
186 | !! ** Method : Water flux is forced to zero over closed sea |
---|
187 | !! Excess is shared between remaining ocean, or |
---|
188 | !! put as run-off in open ocean. |
---|
189 | !! |
---|
190 | !! ** Action : emp updated surface freshwater fluxes and associated heat content at kt |
---|
191 | !!---------------------------------------------------------------------- |
---|
192 | INTEGER, INTENT(in) :: kt ! ocean model time step |
---|
193 | ! |
---|
194 | INTEGER :: ji, jj, jc, jn ! dummy loop indices |
---|
195 | REAL(wp), PARAMETER :: rsmall = 1.e-20_wp ! Closed sea correction epsilon |
---|
196 | REAL(wp) :: zze2, ztmp, zcorr ! |
---|
197 | REAL(wp) :: zcoef, zcoef1 ! |
---|
198 | COMPLEX(wp) :: ctmp |
---|
199 | REAL(wp), DIMENSION(jpncs) :: zfwf ! 1D workspace |
---|
200 | !!---------------------------------------------------------------------- |
---|
201 | ! |
---|
202 | IF( nn_timing == 1 ) CALL timing_start('sbc_clo') |
---|
203 | ! !------------------! |
---|
204 | IF( kt == nit000 ) THEN ! Initialisation ! |
---|
205 | ! !------------------! |
---|
206 | IF(lwp) WRITE(numout,*) |
---|
207 | IF(lwp) WRITE(numout,*)'sbc_clo : closed seas ' |
---|
208 | IF(lwp) WRITE(numout,*)'~~~~~~~' |
---|
209 | |
---|
210 | surf(:) = 0.e0_wp |
---|
211 | ! |
---|
212 | surf(jpncs+1) = glob_sum( e1e2t(:,:) ) ! surface of the global ocean |
---|
213 | ! |
---|
214 | ! ! surface of closed seas |
---|
215 | IF( lk_mpp_rep ) THEN ! MPP reproductible calculation |
---|
216 | DO jc = 1, jpncs |
---|
217 | ctmp = CMPLX( 0.e0, 0.e0, wp ) |
---|
218 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
219 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
220 | ztmp = e1e2t(ji,jj) * tmask_i(ji,jj) |
---|
221 | CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp ) |
---|
222 | END DO |
---|
223 | END DO |
---|
224 | IF( lk_mpp ) CALL mpp_sum( ctmp ) |
---|
225 | surf(jc) = REAL(ctmp,wp) |
---|
226 | END DO |
---|
227 | ELSE ! Standard calculation |
---|
228 | DO jc = 1, jpncs |
---|
229 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
230 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
231 | surf(jc) = surf(jc) + e1e2t(ji,jj) * tmask_i(ji,jj) ! surface of closed seas |
---|
232 | END DO |
---|
233 | END DO |
---|
234 | END DO |
---|
235 | IF( lk_mpp ) CALL mpp_sum ( surf, jpncs ) ! mpp: sum over all the global domain |
---|
236 | ENDIF |
---|
237 | |
---|
238 | IF(lwp) WRITE(numout,*)' Closed sea surfaces' |
---|
239 | DO jc = 1, jpncs |
---|
240 | IF(lwp)WRITE(numout,FMT='(1I3,4I4,5X,F16.2)') jc, ncsi1(jc), ncsi2(jc), ncsj1(jc), ncsj2(jc), surf(jc) |
---|
241 | END DO |
---|
242 | |
---|
243 | ! jpncs+1 : surface of sea, closed seas excluded |
---|
244 | DO jc = 1, jpncs |
---|
245 | surf(jpncs+1) = surf(jpncs+1) - surf(jc) |
---|
246 | END DO |
---|
247 | ! |
---|
248 | ENDIF |
---|
249 | ! !--------------------! |
---|
250 | ! ! update emp ! |
---|
251 | zfwf = 0.e0_wp !--------------------! |
---|
252 | IF( lk_mpp_rep ) THEN ! MPP reproductible calculation |
---|
253 | DO jc = 1, jpncs |
---|
254 | ctmp = CMPLX( 0.e0, 0.e0, wp ) |
---|
255 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
256 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
257 | ztmp = e1e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj) |
---|
258 | CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp ) |
---|
259 | END DO |
---|
260 | END DO |
---|
261 | IF( lk_mpp ) CALL mpp_sum( ctmp ) |
---|
262 | zfwf(jc) = REAL(ctmp,wp) |
---|
263 | END DO |
---|
264 | ELSE ! Standard calculation |
---|
265 | DO jc = 1, jpncs |
---|
266 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
267 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
268 | zfwf(jc) = zfwf(jc) + e1e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj) |
---|
269 | END DO |
---|
270 | END DO |
---|
271 | END DO |
---|
272 | IF( lk_mpp ) CALL mpp_sum ( zfwf(:) , jpncs ) ! mpp: sum over all the global domain |
---|
273 | ENDIF |
---|
274 | |
---|
275 | IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN ! Black Sea case for ORCA_R2 configuration |
---|
276 | zze2 = ( zfwf(3) + zfwf(4) ) * 0.5_wp |
---|
277 | zfwf(3) = zze2 |
---|
278 | zfwf(4) = zze2 |
---|
279 | ENDIF |
---|
280 | |
---|
281 | zcorr = 0._wp |
---|
282 | |
---|
283 | DO jc = 1, jpncs |
---|
284 | ! |
---|
285 | ! The following if avoids the redistribution of the round off |
---|
286 | IF ( ABS(zfwf(jc) / surf(jpncs+1) ) > rsmall) THEN |
---|
287 | ! |
---|
288 | IF( ncstt(jc) == 0 ) THEN ! water/evap excess is shared by all open ocean |
---|
289 | zcoef = zfwf(jc) / surf(jpncs+1) |
---|
290 | zcoef1 = rcp * zcoef |
---|
291 | emp(:,:) = emp(:,:) + zcoef |
---|
292 | qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) |
---|
293 | ! accumulate closed seas correction |
---|
294 | zcorr = zcorr + zcoef |
---|
295 | ! |
---|
296 | ELSEIF( ncstt(jc) == 1 ) THEN ! Excess water in open sea, at outflow location, excess evap shared |
---|
297 | IF ( zfwf(jc) <= 0.e0_wp ) THEN |
---|
298 | DO jn = 1, ncsnr(jc) |
---|
299 | ji = mi0(ncsir(jc,jn)) |
---|
300 | jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean |
---|
301 | IF ( ji > 1 .AND. ji < jpi & |
---|
302 | .AND. jj > 1 .AND. jj < jpj ) THEN |
---|
303 | zcoef = zfwf(jc) / ( REAL(ncsnr(jc)) * e1e2t(ji,jj) ) |
---|
304 | zcoef1 = rcp * zcoef |
---|
305 | emp(ji,jj) = emp(ji,jj) + zcoef |
---|
306 | qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj) |
---|
307 | ENDIF |
---|
308 | END DO |
---|
309 | ELSE |
---|
310 | zcoef = zfwf(jc) / surf(jpncs+1) |
---|
311 | zcoef1 = rcp * zcoef |
---|
312 | emp(:,:) = emp(:,:) + zcoef |
---|
313 | qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) |
---|
314 | ! accumulate closed seas correction |
---|
315 | zcorr = zcorr + zcoef |
---|
316 | ENDIF |
---|
317 | ELSEIF( ncstt(jc) == 2 ) THEN ! Excess e-p-r (either sign) goes to open ocean, at outflow location |
---|
318 | DO jn = 1, ncsnr(jc) |
---|
319 | ji = mi0(ncsir(jc,jn)) |
---|
320 | jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean |
---|
321 | IF( ji > 1 .AND. ji < jpi & |
---|
322 | .AND. jj > 1 .AND. jj < jpj ) THEN |
---|
323 | zcoef = zfwf(jc) / ( REAL(ncsnr(jc)) * e1e2t(ji,jj) ) |
---|
324 | zcoef1 = rcp * zcoef |
---|
325 | emp(ji,jj) = emp(ji,jj) + zcoef |
---|
326 | qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj) |
---|
327 | ENDIF |
---|
328 | END DO |
---|
329 | ENDIF |
---|
330 | ! |
---|
331 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
332 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
333 | zcoef = zfwf(jc) / surf(jc) |
---|
334 | zcoef1 = rcp * zcoef |
---|
335 | emp(ji,jj) = emp(ji,jj) - zcoef |
---|
336 | qns(ji,jj) = qns(ji,jj) + zcoef1 * sst_m(ji,jj) |
---|
337 | END DO |
---|
338 | END DO |
---|
339 | ! |
---|
340 | END IF |
---|
341 | END DO |
---|
342 | |
---|
343 | IF ( ABS(zcorr) > rsmall ) THEN ! remove the global correction from the closed seas |
---|
344 | DO jc = 1, jpncs ! only if it is large enough |
---|
345 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
346 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
347 | emp(ji,jj) = emp(ji,jj) - zcorr |
---|
348 | qns(ji,jj) = qns(ji,jj) + rcp * zcorr * sst_m(ji,jj) |
---|
349 | END DO |
---|
350 | END DO |
---|
351 | END DO |
---|
352 | ENDIF |
---|
353 | ! |
---|
354 | emp (:,:) = emp (:,:) * tmask(:,:,1) |
---|
355 | ! |
---|
356 | CALL lbc_lnk( emp , 'T', 1._wp ) |
---|
357 | ! |
---|
358 | IF( nn_timing == 1 ) CALL timing_stop('sbc_clo') |
---|
359 | ! |
---|
360 | END SUBROUTINE sbc_clo |
---|
361 | |
---|
362 | |
---|
363 | SUBROUTINE clo_rnf( p_rnfmsk ) |
---|
364 | !!--------------------------------------------------------------------- |
---|
365 | !! *** ROUTINE sbc_rnf *** |
---|
366 | !! |
---|
367 | !! ** Purpose : allow the treatment of closed sea outflow grid-points |
---|
368 | !! to be the same as river mouth grid-points |
---|
369 | !! |
---|
370 | !! ** Method : set to 1 the runoff mask (mskrnf, see sbcrnf module) |
---|
371 | !! at the closed sea outflow grid-point. |
---|
372 | !! |
---|
373 | !! ** Action : update (p_)mskrnf (set 1 at closed sea outflow) |
---|
374 | !!---------------------------------------------------------------------- |
---|
375 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: p_rnfmsk ! river runoff mask (rnfmsk array) |
---|
376 | ! |
---|
377 | INTEGER :: jc, jn, ji, jj ! dummy loop indices |
---|
378 | !!---------------------------------------------------------------------- |
---|
379 | ! |
---|
380 | DO jc = 1, jpncs |
---|
381 | IF( ncstt(jc) >= 1 ) THEN ! runoff mask set to 1 at closed sea outflows |
---|
382 | DO jn = 1, 4 |
---|
383 | DO jj = mj0( ncsjr(jc,jn) ), mj1( ncsjr(jc,jn) ) |
---|
384 | DO ji = mi0( ncsir(jc,jn) ), mi1( ncsir(jc,jn) ) |
---|
385 | p_rnfmsk(ji,jj) = MAX( p_rnfmsk(ji,jj), 1.0_wp ) |
---|
386 | END DO |
---|
387 | END DO |
---|
388 | END DO |
---|
389 | ENDIF |
---|
390 | END DO |
---|
391 | ! |
---|
392 | END SUBROUTINE clo_rnf |
---|
393 | |
---|
394 | |
---|
395 | SUBROUTINE clo_ups( p_upsmsk ) |
---|
396 | !!--------------------------------------------------------------------- |
---|
397 | !! *** ROUTINE sbc_rnf *** |
---|
398 | !! |
---|
399 | !! ** Purpose : allow the treatment of closed sea outflow grid-points |
---|
400 | !! to be the same as river mouth grid-points |
---|
401 | !! |
---|
402 | !! ** Method : set to 0.5 the upstream mask (upsmsk, see traadv_cen2 |
---|
403 | !! module) over the closed seas. |
---|
404 | !! |
---|
405 | !! ** Action : update (p_)upsmsk (set 0.5 over closed seas) |
---|
406 | !!---------------------------------------------------------------------- |
---|
407 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: p_upsmsk ! upstream mask (upsmsk array) |
---|
408 | ! |
---|
409 | INTEGER :: jc, ji, jj ! dummy loop indices |
---|
410 | !!---------------------------------------------------------------------- |
---|
411 | ! |
---|
412 | DO jc = 1, jpncs |
---|
413 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
414 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
415 | p_upsmsk(ji,jj) = 0.5_wp ! mixed upstream/centered scheme over closed seas |
---|
416 | END DO |
---|
417 | END DO |
---|
418 | END DO |
---|
419 | ! |
---|
420 | END SUBROUTINE clo_ups |
---|
421 | |
---|
422 | |
---|
423 | SUBROUTINE clo_bat( pbat, kbat ) |
---|
424 | !!--------------------------------------------------------------------- |
---|
425 | !! *** ROUTINE clo_bat *** |
---|
426 | !! |
---|
427 | !! ** Purpose : suppress closed sea from the domain |
---|
428 | !! |
---|
429 | !! ** Method : set to 0 the meter and level bathymetry (given in |
---|
430 | !! arguments) over the closed seas. |
---|
431 | !! |
---|
432 | !! ** Action : set pbat=0 and kbat=0 over closed seas |
---|
433 | !!---------------------------------------------------------------------- |
---|
434 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pbat ! bathymetry in meters (bathy array) |
---|
435 | INTEGER , DIMENSION(jpi,jpj), INTENT(inout) :: kbat ! bathymetry in levels (mbathy array) |
---|
436 | ! |
---|
437 | INTEGER :: jc, ji, jj ! dummy loop indices |
---|
438 | !!---------------------------------------------------------------------- |
---|
439 | ! |
---|
440 | DO jc = 1, jpncs |
---|
441 | DO jj = ncsj1(jc), ncsj2(jc) |
---|
442 | DO ji = ncsi1(jc), ncsi2(jc) |
---|
443 | pbat(ji,jj) = 0._wp |
---|
444 | kbat(ji,jj) = 0 |
---|
445 | END DO |
---|
446 | END DO |
---|
447 | END DO |
---|
448 | ! |
---|
449 | END SUBROUTINE clo_bat |
---|
450 | |
---|
451 | !!====================================================================== |
---|
452 | END MODULE closea |
---|
453 | |
---|