New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
closea.F90 in branches/2016/dev_r6409_SIMPLIF_2_usrdef_tools/NEMOGCM/NEMO/OPA_SRC/DOM – NEMO

source: branches/2016/dev_r6409_SIMPLIF_2_usrdef_tools/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90 @ 6827

Last change on this file since 6827 was 6827, checked in by flavoni, 8 years ago

#1692 - branch SIMPLIF_2_usrdef: commit routines Fortran to create domain_cfg.nc file, to have domain (input) files for new simplification branch. To be moved in TOOLS directory

  • Property svn:keywords set to Id
File size: 10.4 KB
Line 
1MODULE 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 lib_fortran,    ONLY: glob_sum, DDPDD
24   USE lbclnk          ! lateral boundary condition - MPP exchanges
25   USE lib_mpp         ! MPP library
26   USE timing
27
28   IMPLICIT NONE
29   PRIVATE
30
31   PUBLIC dom_clo      ! routine called by domain module
32   PUBLIC clo_bat      ! routine called in domzgr module
33
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
41   REAL(wp), DIMENSION (jpncs+1)       ::   surf             ! closed sea surface
42
43   !! * Substitutions
44#  include "vectopt_loop_substitute.h90"
45   !!----------------------------------------------------------------------
46   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
47   !! $Id$
48   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
49   !!----------------------------------------------------------------------
50CONTAINS
51
52   SUBROUTINE dom_clo
53      !!---------------------------------------------------------------------
54      !!                  ***  ROUTINE dom_clo  ***
55      !!       
56      !! ** Purpose :   Closed sea domain initialization
57      !!
58      !! ** Method  :   if a closed sea is located only in a model grid point
59      !!                just the thermodynamic processes are applied.
60      !!
61      !! ** Action  :   ncsi1(), ncsj1() : south-west closed sea limits (i,j)
62      !!                ncsi2(), ncsj2() : north-east Closed sea limits (i,j)
63      !!                ncsir(), ncsjr() : Location of runoff
64      !!                ncsnr            : number of point where run-off pours
65      !!                ncstt            : Type of closed sea
66      !!                                   =0 spread over the world ocean
67      !!                                   =2 put at location runoff
68      !!----------------------------------------------------------------------
69      INTEGER ::   jc      ! dummy loop indices
70      INTEGER ::   isrow   ! local index
71      !!----------------------------------------------------------------------
72      !
73      IF(lwp) WRITE(numout,*)
74      IF(lwp) WRITE(numout,*)'dom_clo : closed seas '
75      IF(lwp) WRITE(numout,*)'~~~~~~~'
76      !
77      ! initial values
78      ncsnr(:) = 1  ;  ncsi1(:) = 1  ;  ncsi2(:) = 1  ;  ncsir(:,:) = 1
79      ncstt(:) = 0  ;  ncsj1(:) = 1  ;  ncsj2(:) = 1  ;  ncsjr(:,:) = 1
80      !
81      ! set the closed seas (in data domain indices)
82      ! -------------------
83      !
84      IF( cp_cfg == "orca" ) THEN
85         !
86         SELECT CASE ( jp_cfg )
87         !                                           ! =======================
88         CASE ( 1 )                                  ! ORCA_R1 configuration
89            !                                        ! =======================
90            ! This dirty section will be suppressed by simplification process:
91            ! all this will come back in input files
92            ! Currently these hard-wired indices relate to configuration with
93            ! extend grid (jpjglo=332)
94            isrow = 332 - jpjglo
95            !
96            ncsnr(1)   = 1    ; ncstt(1)   = 0           ! Caspian Sea
97            ncsi1(1)   = 332  ; ncsj1(1)   = 243 - isrow
98            ncsi2(1)   = 344  ; ncsj2(1)   = 275 - isrow
99            ncsir(1,1) = 1    ; ncsjr(1,1) = 1
100            !                                       
101            !                                        ! =======================
102         CASE ( 2 )                                  !  ORCA_R2 configuration
103            !                                        ! =======================
104            !                                            ! Caspian Sea
105            ncsnr(1)   =   1  ;  ncstt(1)   =   0           ! spread over the globe
106            ncsi1(1)   =  11  ;  ncsj1(1)   = 103
107            ncsi2(1)   =  17  ;  ncsj2(1)   = 112
108            ncsir(1,1) =   1  ;  ncsjr(1,1) =   1 
109            !                                            ! Great North American Lakes
110            ncsnr(2)   =   1  ;  ncstt(2)   =   2           ! put at St Laurent mouth
111            ncsi1(2)   =  97  ;  ncsj1(2)   = 107
112            ncsi2(2)   = 103  ;  ncsj2(2)   = 111
113            ncsir(2,1) = 110  ;  ncsjr(2,1) = 111           
114            !                                            ! Black Sea (crossed by the cyclic boundary condition)
115            ncsnr(3:4) =   4  ;  ncstt(3:4) =   2           ! put in Med Sea (north of Aegean Sea)
116            ncsir(3:4,1) = 171;  ncsjr(3:4,1) = 106         !
117            ncsir(3:4,2) = 170;  ncsjr(3:4,2) = 106 
118            ncsir(3:4,3) = 171;  ncsjr(3:4,3) = 105 
119            ncsir(3:4,4) = 170;  ncsjr(3:4,4) = 105 
120            ncsi1(3)   = 174  ;  ncsj1(3)   = 107           ! 1 : west part of the Black Sea     
121            ncsi2(3)   = 181  ;  ncsj2(3)   = 112           !            (ie west of the cyclic b.c.)
122            ncsi1(4)   =   2  ;  ncsj1(4)   = 107           ! 2 : east part of the Black Sea
123            ncsi2(4)   =   6  ;  ncsj2(4)   = 112           !           (ie east of the cyclic b.c.)
124             
125         
126
127            !                                        ! =======================
128         CASE ( 4 )                                  !  ORCA_R4 configuration
129            !                                        ! =======================
130            !                                            ! Caspian Sea
131            ncsnr(1)   =  1  ;  ncstt(1)   =  0 
132            ncsi1(1)   =  4  ;  ncsj1(1)   = 53 
133            ncsi2(1)   =  4  ;  ncsj2(1)   = 56
134            ncsir(1,1) =  1  ;  ncsjr(1,1) =  1
135            !                                            ! Great North American Lakes
136            ncsnr(2)   =  1  ;  ncstt(2)   =  2 
137            ncsi1(2)   = 49  ;  ncsj1(2)   = 55
138            ncsi2(2)   = 51  ;  ncsj2(2)   = 56
139            ncsir(2,1) = 57  ;  ncsjr(2,1) = 55
140            !                                            ! Black Sea
141            ncsnr(3)   =  4  ;  ncstt(3)   =  2 
142            ncsi1(3)   = 88  ;  ncsj1(3)   = 55 
143            ncsi2(3)   = 91  ;  ncsj2(3)   = 56
144            ncsir(3,1) = 86  ;  ncsjr(3,1) = 53
145            ncsir(3,2) = 87  ;  ncsjr(3,2) = 53 
146            ncsir(3,3) = 86  ;  ncsjr(3,3) = 52 
147            ncsir(3,4) = 87  ;  ncsjr(3,4) = 52
148            !                                            ! Baltic Sea
149            ncsnr(4)   =  1  ;  ncstt(4)   =  2
150            ncsi1(4)   = 75  ;  ncsj1(4)   = 59
151            ncsi2(4)   = 76  ;  ncsj2(4)   = 61
152            ncsir(4,1) = 84  ;  ncsjr(4,1) = 59 
153            !                                        ! =======================
154         CASE ( 025 )                                ! ORCA_R025 configuration
155            !                                        ! =======================
156            ncsnr(1)   = 1    ; ncstt(1)   = 0               ! Caspian + Aral sea
157            ncsi1(1)   = 1330 ; ncsj1(1)   = 645
158            ncsi2(1)   = 1400 ; ncsj2(1)   = 795
159            ncsir(1,1) = 1    ; ncsjr(1,1) = 1
160            !                                       
161            ncsnr(2)   = 1    ; ncstt(2)   = 0               ! Azov Sea
162            ncsi1(2)   = 1284 ; ncsj1(2)   = 722
163            ncsi2(2)   = 1304 ; ncsj2(2)   = 747
164            ncsir(2,1) = 1    ; ncsjr(2,1) = 1
165            !
166         END SELECT
167         !
168      ENDIF
169
170      ! convert the position in local domain indices
171      ! --------------------------------------------
172      DO jc = 1, jpncs
173         ncsi1(jc)   = mi0( ncsi1(jc) )
174         ncsj1(jc)   = mj0( ncsj1(jc) )
175
176         ncsi2(jc)   = mi1( ncsi2(jc) )   
177         ncsj2(jc)   = mj1( ncsj2(jc) ) 
178      END DO
179      !
180   END SUBROUTINE dom_clo
181
182
183   SUBROUTINE clo_bat( pbat, kbat )
184      !!---------------------------------------------------------------------
185      !!                  ***  ROUTINE clo_bat  ***
186      !!                   
187      !! ** Purpose :   suppress closed sea from the domain
188      !!
189      !! ** Method  :   set to 0 the meter and level bathymetry (given in
190      !!                arguments) over the closed seas.
191      !!
192      !! ** Action  :   set pbat=0 and kbat=0 over closed seas
193      !!----------------------------------------------------------------------
194      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   pbat   ! bathymetry in meters (bathy array)
195      INTEGER , DIMENSION(jpi,jpj), INTENT(inout) ::   kbat   ! bathymetry in levels (mbathy array)
196      !
197      INTEGER  ::   jc, ji, jj      ! dummy loop indices
198      !!----------------------------------------------------------------------
199      !
200      DO jc = 1, jpncs
201         DO jj = ncsj1(jc), ncsj2(jc)
202            DO ji = ncsi1(jc), ncsi2(jc)
203               pbat(ji,jj) = 0._wp   
204               kbat(ji,jj) = 0   
205            END DO
206         END DO
207       END DO 
208       !
209   END SUBROUTINE clo_bat
210
211   !!======================================================================
212END MODULE closea
213
Note: See TracBrowser for help on using the repository browser.