closea.F90 22 KB

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