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.
dom_oce.F90 in branches/dev_004_VVL/NEMO/OPA_SRC/DOM – NEMO

source: branches/dev_004_VVL/NEMO/OPA_SRC/DOM/dom_oce.F90 @ 1388

Last change on this file since 1388 was 1385, checked in by rblod, 15 years ago

Correct a mistake in previous commit for scale factors initialisation

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.2 KB
Line 
1MODULE dom_oce
2   !!----------------------------------------------------------------------
3   !!                       ***  MODULE dom_oce  ***
4   !!       
5   !! ** Purpose :   Define in memory all the ocean space domain variables
6   !!----------------------------------------------------------------------
7   !! History :
8   !!   9.0  !  05-10  (A. Beckmann, G. Madec)  reactivate s-coordinate
9   !!----------------------------------------------------------------------
10   !!  OPA 9.0 , LOCEAN-IPSL (2006)
11   !! $Id$
12   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
13   !!----------------------------------------------------------------------
14   !! * Modules used
15   USE par_oce      ! ocean parameters
16
17   IMPLICIT NONE
18   PUBLIC           ! allows the acces to par_oce when dom_oce is used
19   !                ! exception to coding rules... to be suppressed ???
20
21   !!----------------------------------------------------------------------
22   !! space domain parameters
23   !! -----------------------
24   LOGICAL, PUBLIC ::   &   !:
25      lzoom      =  .FALSE. ,   &  !: zoom flag
26      lzoom_e    =  .FALSE. ,   &  !: East  zoom type flag
27      lzoom_w    =  .FALSE. ,   &  !: West  zoom type flag
28      lzoom_s    =  .FALSE. ,   &  !: South zoom type flag
29      lzoom_n    =  .FALSE. ,   &  !: North zoom type flag
30      lzoom_arct =  .FALSE. ,   &  !: ORCA    arctic zoom flag
31      lzoom_anta =  .FALSE.        !: ORCA antarctic zoom flag
32
33   INTEGER, PUBLIC ::           & !!: namdom : space domain (bathymetry, mesh)
34      ntopo   =  0 ,            &  !: = 0/1 ,compute/read the bathymetry file
35      nmsh    =  0                 !: = 1 create a mesh-mask file
36
37   INTEGER, PUBLIC ::         &   !:
38      ! domain parameters linked to mpp
39      nperio,          &  !: type of lateral boundary condition
40      nimpp, njmpp,    &  !: i- & j-indexes for mpp-subdomain left bottom
41      nreci, nrecj,    &  !: overlap region in i and j
42      nproc,           &  !: number for local processor
43      narea,           &  !: number for local area
44      nbondi, nbondj,  &  !: mark of i- and j-direction local boundaries
45      npolj,           &  !: north fold mark (0, 3 or 4)
46      nlci, nlcj,      &  !: i- & j-dimensions of the local subdomain
47      nldi, nlei,      &  !: first and last indoor i- and j-indexes
48      nldj, nlej,      &  !:
49      noea, nowe,      &  !: index of the local neighboring processors in
50      noso, nono,      &  !: east, west, south and north directions
51      npne, npnw,      &  !: index of north east and north west processor
52      npse, npsw,      &  !: index of south east and south west processor
53      nbne, nbnw,      &  !: logical of north east & north west processor
54      nbse, nbsw,      &  !: logical of south east & south west processor
55      nidom               !: ???
56
57   INTEGER, PUBLIC, DIMENSION(jpi) ::   &   !:
58      mig                 !: local  ==> global  domain i-indice
59   INTEGER, PUBLIC, DIMENSION(jpj) ::   &   !:
60      mjg                 !: local  ==> global  domain j-indice
61   INTEGER, PUBLIC, DIMENSION( jpidta ) ::   &  !:  !!bug ==> other solution?
62      mi0, mi1            !: global ==> local domain i-indice
63      !                   !  (mi0=1 and mi1=0 if the global indice is not in the local domain)
64   INTEGER, PUBLIC, DIMENSION( jpjdta ) ::   &  !:
65      mj0, mj1            !: global ==> local domain j-indice
66      !                   ! (mi0=1 and mi1=0 if the global indice is not in the local domain)
67
68   INTEGER, PUBLIC, DIMENSION(jpnij) ::   &  !:
69      nimppt, njmppt,  &  !: i-, j-indexes for each processor
70      ibonit, ibonjt,  &  !: i-, j- processor neighbour existence
71      nlcit , nlcjt,   &  !: dimensions of every subdomain
72      nldit , nldjt,   &  !: first, last indoor index for each i-domain
73      nleit , nlejt       !: first, last indoor index for each j-domain
74
75   !!----------------------------------------------------------------------
76   !! horizontal curvilinear coordinate and scale factors
77   !! ---------------------------------------------------------------------
78
79   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
80      glamt, glamu,    &  !: longitude of t-, u-, v- and f-points (degre)
81      glamv, glamf,    &  !:
82      gphit, gphiu,    &  !: latitude  of t-, u-, v- and f-points (degre)
83      gphiv, gphif,    &  !:
84      e1t, e2t,        &  !: horizontal scale factors at t-point (m)
85      e1u, e2u,        &  !: horizontal scale factors at u-point (m)
86      e1v, e2v,        &  !: horizontal scale factors at v-point (m)
87      e1f, e2f,        &  !: horizontal scale factors at f-point (m)
88      ff                  !: coriolis factor (2.*omega*sin(yphi) ) (s-1)
89
90   !!----------------------------------------------------------------------
91   !! vertical coordinate and scale factors
92   !! --------------------------------------
93
94   LOGICAL, PUBLIC ::           & !!: namzgr : vertical coordinate
95      ln_zco     =  .TRUE.  ,   &  !: z-coordinate - full step
96      ln_zps     =  .FALSE. ,   &  !: z-coordinate - partial step
97      ln_sco     =  .FALSE.        !: s-coordinate or hybrid z-s coordinate
98
99#if defined key_zco
100   LOGICAL, PUBLIC, PARAMETER ::   lk_zco = .TRUE.    !: z-coordinate flag (1D arrays)
101#else
102   LOGICAL, PUBLIC, PARAMETER ::   lk_zco = .FALSE.   !: z-coordinate flag (3D arrays)
103
104   !! All coordinates
105   !! ---------------
106   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !:
107      gdep3w        ,    &  !: depth of T-points (sum of e3w) (m)
108      gdept , gdepw ,    &  !: analytical depth at T-W  points (m)
109      e3v   , e3f   ,    &  !: analytical vertical scale factors at  V--F
110      e3t   , e3u   ,    &  !:                                       T--U  points (m)
111      e3vw          ,    &  !: analytical vertical scale factors at  VW--
112      e3w   , e3uw          !:                                        W--UW  points (m)
113#endif
114#if defined key_vvl
115   LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .TRUE.    !: variable grid flag
116   !! All coordinates
117   !! ---------------
118   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   gdep3w_1           !: depth of T-points (sum of e3w) (m)
119   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   gdept_1, gdepw_1   !: analytical depth at T-W  points (m)
120   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3v_1  , e3f_1     !: analytical vertical scale factors at  V--F
121   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3t_1  , e3u_1     !:                                       T--U  points (m)
122   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3vw_1             !: analytical vertical scale factors at  VW--
123   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3w_1  , e3uw_1    !:                                       W--UW  points (m)
124#else
125   LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .FALSE.   !: fixed grid flag
126#endif
127   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
128      hur, hvr,          &  !: inverse of u and v-points ocean depth (1/m)
129      hu , hv               !: depth at u- and v-points (meters)
130
131   !! z-coordinate with full steps (also used in the other cases as reference z-coordinate)
132   !! =-----------------====------
133   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &  !:
134      gdept_0, gdepw_0,       &  !: reference depth of t- and w-points (m)
135      e3t_0  , e3w_0             !: reference vertical scale factors at T- and W-pts (m)
136
137   !! z-coordinate with partial steps
138   !! =-----------------=======------
139   REAL(wp), PUBLIC ::      & !!: * namelist namdom *
140      e3zps_min = 5.0_wp,   &  !: miminum thickness for partial steps (meters)
141      e3zps_rat = 0.1_wp       !: minimum thickness ration for partial steps
142
143   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
144      hdept, hdepw, e3tp, e3wp   !: bottom depth and thickness at T and W points
145
146   !! s-coordinate and hybrid z-s-coordinate
147   !! =----------------======---------------
148   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &   !:
149      gsigt, gsigw ,   &  !: model level depth coefficient at t-, w-levels (analytic)
150      gsi3w        ,   &  !: model level depth coefficient at w-level (sum of gsigw)
151      esigt, esigw        !: vertical scale factor coef. at t-, w-levels
152
153   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
154      hbatv , hbatf ,   &  !: ocean depth at the vertical of  V--F
155      hbatt , hbatu ,   &  !:                                 T--U  points (m)
156      scosrf, scobot,   &  !:  ocean surface and bottom topographies (if deviating from coordinate surfaces in HYBRID)
157      hifv  , hiff  ,   &  !: interface depth between stretching    at  V--F
158      hift  , hifu         !: and quasi-uniform spacing                 T--U  points (m)
159
160   !!----------------------------------------------------------------------
161   !! masks, bathymetry
162   !! -----------------
163
164   INTEGER , PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
165      mbathy     !: number of ocean level (=0, 1, ... , jpk-1)
166
167   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
168      bathy  ,         &  !: ocean depth (meters)
169      tmask_i,         &  !: interior domain T-point mask
170      bmask               !: land/ocean mask of barotropic stream function
171
172   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &   !:
173      tmask, umask,    &  !: land/ocean mask at T-, U-, V- and F-points
174      vmask, fmask        !:
175
176   REAL(wp), PUBLIC, DIMENSION(jpiglo) ::   &   !:
177      tpol, fpol          !: north fold mask (nperio= 3 or 4)
178
179#if defined key_noslip_accurate
180   INTEGER, PUBLIC, DIMENSION(4,jpk) ::   &   !:
181      npcoa               !: ???
182   INTEGER, PUBLIC, DIMENSION(2*(jpi+jpj),4,jpk) ::   &   !:
183      nicoa,           &  !: ???
184      njcoa               !: ???
185#endif
186
187   !!----------------------------------------------------------------------
188   !! agrif domain
189   !!----------------------------------------------------------------------
190#if defined key_agrif
191   LOGICAL, PUBLIC, PARAMETER ::   lk_agrif = .TRUE.    !: agrif flag
192#else
193   LOGICAL, PUBLIC, PARAMETER ::   lk_agrif = .FALSE.   !: agrif flag
194#endif
195
196
197   !!----------------------------------------------------------------------
198   !! time domain
199   !!----------------------------------------------------------------------
200   INTEGER, PUBLIC ::      & !!: * Namelist * ???
201      nacc   = 0   ,       &  !: = 0/1 use of the acceleration of convergence technique
202      neuler       ,       &  !: restart euler forward option (0=Euler)
203      nn_baro = 64            !: number of barotropic time steps (key_dynspg_ts)
204
205   REAL(wp), PUBLIC ::       & !!: * Namelist ??? *
206      rdt    = 3600._wp ,    &  !: time step for the dynamics (and tracer if nacc=0)
207      rdtmin = 3600._wp ,    &  !: minimum time step on tracers
208      rdtmax = 3600._wp ,    &  !: maximum time step on tracers
209      rdth   =  800._wp ,    &  !: depth variation of tracer step
210      atfp   = 0.1_wp   ,    &  !: asselin time filter parameter
211      atfp1                     !: asselin time filter coeff. (atfp1= 1-2*atfp)
212
213   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &  !:
214      rdttra                    !: vertical profile of tracer time step
215
216   !!----------------------------------------------------------------------
217   !! cross land advection
218   !!----------------------------------------------------------------------
219
220   INTEGER, PUBLIC ::       & !!: namelist ???
221      n_cla                    !: flag (0/1) for cross land advection to
222      !                        ! parameterize exchanges through straits
223
224END MODULE dom_oce
Note: See TracBrowser for help on using the repository browser.