Changeset 12482
- Timestamp:
- 2020-02-28T11:26:52+01:00 (3 years ago)
- Location:
- NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DIA/diamlr.F90
r12377 r12482 33 33 !!---------------------------------------------------------------------- 34 34 CONTAINS 35 35 36 36 SUBROUTINE dia_mlr_init 37 37 !!---------------------------------------------------------------------- 38 38 !! *** ROUTINE dia_mlr_init *** 39 39 !! 40 !! ** Purpose : initialisation of IOM context management for 40 !! ** Purpose : initialisation of IOM context management for 41 41 !! multiple-linear-regression analysis 42 42 !! … … 145 145 ! Retrieve information (frequency, phase, nodal correction) about all 146 146 ! available tidal constituents for placeholder substitution below 147 ctide_selected(1:34) = (/ 'Mf ', 'Mm', 'Ssa', 'Mtm', 'Msf', &148 & 'Msqm', 'Sa', 'K1', 'O1', 'P1', &149 & 'Q1', 'J1', 'S1', 'M2', 'S2', 'N2', &150 & 'K2', 'nu2', 'mu2', '2N2', 'L2', &151 & 'T2', 'eps2', 'lam2', 'R2', 'M3', &152 & 'MKS2', 'MN4', 'MS4', 'M4', 'N4', &153 & 'S4', 'M6', 'M8' /)147 ctide_selected(1:34) = (/ 'Mf ', 'Mm ', 'Ssa ', 'Mtm ', 'Msf ', & 148 & 'Msqm', 'Sa ', 'K1 ', 'O1 ', 'P1 ', & 149 & 'Q1 ', 'J1 ', 'S1 ', 'M2 ', 'S2 ', 'N2 ', & 150 & 'K2 ', 'nu2 ', 'mu2 ', '2N2 ', 'L2 ', & 151 & 'T2 ', 'eps2', 'lam2', 'R2 ', 'M3 ', & 152 & 'MKS2', 'MN4 ', 'MS4 ', 'M4 ', 'N4 ', & 153 & 'S4 ', 'M6 ', 'M8 ' /) 154 154 CALL tide_init_harmonics(ctide_selected, stideconst) 155 155 itide = size(stideconst) … … 157 157 itide = 0 158 158 ENDIF 159 159 160 160 DO jm = 1, jpscanmax 161 161 WRITE (cl3i, '(i3.3)') jm … … 236 236 ! If enabled, keep handle in list of fields selected for analysis 237 237 IF ( llxatt_enabled ) THEN 238 238 239 239 ! Set name attribute (and overwrite possible pre-configured name) 240 240 ! with field id to enable id string retrieval from stored handle … … 323 323 CALL xios_set_attr ( slxhdl_fld, standard_name=TRIM( clxatt_comment ), long_name=TRIM( clxatt_expr ), & 324 324 & operation="average" ) 325 325 326 326 ! iii) set up the output of scalar products with itself and with 327 327 ! other active regressors … … 416 416 zadatrj2d(:,:) = adatrj*86400.0_wp 417 417 IF ( iom_use('diamlr_time') ) CALL iom_put('diamlr_time', zadatrj2d) 418 418 419 419 IF( ln_timing ) CALL timing_stop('dia_mlr') 420 420 -
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DOM/dom_oce.F90
r12377 r12482 2 2 !!====================================================================== 3 3 !! *** MODULE dom_oce *** 4 !! 4 !! 5 5 !! ** Purpose : Define in memory all the ocean space domain variables 6 6 !!====================================================================== 7 !! History : 1.0 ! 2005-10 (A. Beckmann, G. Madec) reactivate s-coordinate 7 !! History : 1.0 ! 2005-10 (A. Beckmann, G. Madec) reactivate s-coordinate 8 8 !! 3.3 ! 2010-11 (G. Madec) add mbk. arrays associated to the deepest ocean level 9 9 !! 3.4 ! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation … … 13 13 !! - ! 2015-11 (G. Madec, A. Coward) time varying zgr by default 14 14 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rename prognostic variables in preparation for new time scheme. 15 !! 4.x ! 2020-02 (G. Madec, S. Techene) introduce ssh to h0 ratio 15 16 !!---------------------------------------------------------------------- 16 17 … … 72 73 ! ! = 6 cyclic East-West AND North fold F-point pivot 73 74 ! ! = 7 bi-cyclic East-West AND North-South 74 LOGICAL, PUBLIC :: l_Iperio, l_Jperio ! should we explicitely take care I/J periodicity 75 LOGICAL, PUBLIC :: l_Iperio, l_Jperio ! should we explicitely take care I/J periodicity 75 76 76 77 ! ! domain MPP decomposition parameters … … 82 83 INTEGER, ALLOCATABLE, PUBLIC :: nbondi_bdy(:) !: mark i-direction local boundaries for BDY open boundaries 83 84 INTEGER, ALLOCATABLE, PUBLIC :: nbondj_bdy(:) !: mark j-direction local boundaries for BDY open boundaries 84 INTEGER, ALLOCATABLE, PUBLIC :: nbondi_bdy_b(:) !: mark i-direction of neighbours local boundaries for BDY open boundaries 85 INTEGER, ALLOCATABLE, PUBLIC :: nbondj_bdy_b(:) !: mark j-direction of neighbours local boundaries for BDY open boundaries 85 INTEGER, ALLOCATABLE, PUBLIC :: nbondi_bdy_b(:) !: mark i-direction of neighbours local boundaries for BDY open boundaries 86 INTEGER, ALLOCATABLE, PUBLIC :: nbondj_bdy_b(:) !: mark j-direction of neighbours local boundaries for BDY open boundaries 86 87 87 88 INTEGER, PUBLIC :: npolj !: north fold mark (0, 3 or 4) … … 127 128 LOGICAL, PUBLIC :: ln_zps !: z-coordinate - partial step 128 129 LOGICAL, PUBLIC :: ln_sco !: s-coordinate or hybrid z-s coordinate 129 LOGICAL, PUBLIC :: ln_isfcav !: presence of ISF 130 LOGICAL, PUBLIC :: ln_isfcav !: presence of ISF 130 131 ! ! reference scale factors 131 132 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: e3t_0 !: t- vert. scale factor [m] … … 139 140 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: e3t, e3u, e3v, e3w, e3uw, e3vw !: vert. scale factor [m] 140 141 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: e3f !: F-point vert. scale factor [m] 142 ! ! time-dependent ratio ssh / h_0 143 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: r3t, r3u, r3v !: [-] 144 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: r3f !: [-] 145 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: r3t_f, r3u_f, r3v_f !: [-] 141 146 142 147 ! ! reference depths of cells … … 145 150 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gde3w_0 !: w- depth (sum of e3w) [m] 146 151 ! ! time-dependent depths of cells 147 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: gdept, gdepw 148 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gde3w 149 152 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: gdept, gdepw 153 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gde3w 154 150 155 ! ! reference heights of water column 151 156 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ht_0 !: t-depth [m] 152 157 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hu_0 !: u-depth [m] 153 158 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hv_0 !: v-depth [m] 159 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hf_0 !: f-depth [m] 160 ! ! reciprocal reference heights of water column 161 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: r1_ht_0, r1_hu_0, r1_hv_0, r1_hf_0 !: t-depth [1/m] 154 162 ! time-dependent heights of water column 155 163 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ht !: height of water column at T-points [m] … … 157 165 158 166 INTEGER, PUBLIC :: nla10 !: deepest W level Above ~10m (nlb10 - 1) 159 INTEGER, PUBLIC :: nlb10 !: shallowest W level Bellow ~10m (nla10 + 1) 167 INTEGER, PUBLIC :: nlb10 !: shallowest W level Bellow ~10m (nla10 + 1) 160 168 161 169 !! 1D reference vertical coordinate … … 179 187 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mikt, miku, mikv, mikf !: top first wet T-, U-, V-, F-level (ISF) 180 188 181 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask 189 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask, ssfmask !: surface mask at T-,U-, V- and F-pts 182 190 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: tmask, umask, vmask, fmask !: land/ocean mask at T-, U-, V- and F-pts 183 191 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: wmask, wumask, wvmask !: land/ocean mask at WT-, WU- and WV-pts … … 199 207 INTEGER , PUBLIC :: nsec_monday !: seconds between 00h of the last Monday and half of the current time step 200 208 INTEGER , PUBLIC :: nsec_day !: seconds between 00h of the current day and half of the current time step 201 REAL(wp), PUBLIC :: fjulday !: current julian day 209 REAL(wp), PUBLIC :: fjulday !: current julian day 202 210 REAL(wp), PUBLIC :: fjulstartyear !: first day of the current year in julian days 203 211 REAL(wp), PUBLIC :: adatrj !: number of elapsed days since the begining of the whole simulation … … 221 229 !!---------------------------------------------------------------------- 222 230 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 223 !! $Id$ 231 !! $Id$ 224 232 !! Software governed by the CeCILL license (see ./LICENSE) 225 233 !!---------------------------------------------------------------------- … … 235 243 236 244 CHARACTER(len=3) FUNCTION Agrif_CFixed() 237 Agrif_CFixed = '0' 245 Agrif_CFixed = '0' 238 246 END FUNCTION Agrif_CFixed 239 247 #endif … … 266 274 ! 267 275 ALLOCATE( e3t_0(jpi,jpj,jpk) , e3u_0(jpi,jpj,jpk) , e3v_0(jpi,jpj,jpk) , e3f_0(jpi,jpj,jpk) , e3w_0(jpi,jpj,jpk) , & 268 & e3t (jpi,jpj,jpk,jpt) , e3u (jpi,jpj,jpk,jpt) , e3v (jpi,jpj,jpk,jpt) , e3f (jpi,jpj,jpk) , e3w (jpi,jpj,jpk,jpt) , & 276 & e3t (jpi,jpj,jpk,jpt) , e3u (jpi,jpj,jpk,jpt) , e3v (jpi,jpj,jpk,jpt) , e3f (jpi,jpj,jpk) , e3w (jpi,jpj,jpk,jpt) , & 269 277 & e3uw_0(jpi,jpj,jpk) , e3vw_0(jpi,jpj,jpk) , & 270 & e3uw (jpi,jpj,jpk,jpt) , e3vw (jpi,jpj,jpk,jpt) , STAT=ierr(5) ) 271 ! 272 ALLOCATE( ht_0(jpi,jpj) , hu_0(jpi,jpj) , hv_0(jpi,jpj) , & 273 & ht (jpi,jpj) , hu( jpi,jpj,jpt), hv( jpi,jpj,jpt) , r1_hu(jpi,jpj,jpt) , r1_hv(jpi,jpj,jpt) , & 274 & STAT=ierr(6) ) 278 & e3uw (jpi,jpj,jpk,jpt) , e3vw (jpi,jpj,jpk,jpt) , & 279 & r3t (jpi,jpj,jpt) , r3u (jpi,jpj,jpt) , r3v (jpi,jpj,jpt) , r3f (jpi,jpj) , & 280 & r3t_f(jpi,jpj) , r3u_f(jpi,jpj) , r3v_f(jpi,jpj) , STAT=ierr(5) ) 281 ! 282 ALLOCATE( ht_0(jpi,jpj) , hu_0(jpi,jpj) , hv_0(jpi,jpj) , hf_0(jpi,jpj) , & 283 & ht (jpi,jpj) , hu (jpi,jpj,jpt), hv (jpi,jpj,jpt) , & 284 & r1_hu (jpi,jpj,jpt), r1_hv (jpi,jpj,jpt) , & 285 & r1_ht_0(jpi,jpj) , r1_hu_0(jpi,jpj) , r1_hv_0(jpi,jpj), r1_hf_0(jpi,jpj) , STAT=ierr(6) ) 275 286 ! 276 287 ALLOCATE( risfdep(jpi,jpj) , bathy(jpi,jpj) , STAT=ierr(7) ) … … 278 289 ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(8) ) 279 290 ! 280 ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) , & 281 & ssmask (jpi,jpj) , ssumask(jpi,jpj) , ssvmask(jpi,jpj) , &291 ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) , & 292 & ssmask (jpi,jpj) , ssumask(jpi,jpj) , ssvmask(jpi,jpj) , ssfmask(jpi,jpj) , & 282 293 & mbkt (jpi,jpj) , mbku (jpi,jpj) , mbkv (jpi,jpj) , STAT=ierr(9) ) 283 294 ! 284 295 ALLOCATE( mikt(jpi,jpj), miku(jpi,jpj), mikv(jpi,jpj), mikf(jpi,jpj), STAT=ierr(10) ) 285 296 ! 286 ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) , & 297 ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) , & 287 298 & vmask(jpi,jpj,jpk) , fmask(jpi,jpj,jpk) , STAT=ierr(11) ) 288 299 ! -
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DOM/domain.F90
r12377 r12482 6 6 !! History : OPA ! 1990-10 (C. Levy - G. Madec) Original code 7 7 !! ! 1992-01 (M. Imbard) insert time step initialization 8 !! ! 1996-06 (G. Madec) generalized vertical coordinate 8 !! ! 1996-06 (G. Madec) generalized vertical coordinate 9 9 !! ! 1997-02 (G. Madec) creation of domwri.F 10 10 !! ! 2001-05 (E.Durand - G. Madec) insert closed sea … … 15 15 !! 3.7 ! 2015-11 (G. Madec, A. Coward) time varying zgr by default 16 16 !! 4.0 ! 2016-10 (G. Madec, S. Flavoni) domain configuration / user defined interface 17 !! 4.x ! 2020-02 (G. Madec, S. Techene) introduce ssh to h0 ratio 17 18 !!---------------------------------------------------------------------- 18 19 19 20 !!---------------------------------------------------------------------- 20 21 !! dom_init : initialize the space and time domain … … 61 62 !!---------------------------------------------------------------------- 62 63 !! *** ROUTINE dom_init *** 63 !! 64 !! ** Purpose : Domain initialization. Call the routines that are 65 !! required to create the arrays which define the space 64 !! 65 !! ** Purpose : Domain initialization. Call the routines that are 66 !! required to create the arrays which define the space 66 67 !! and time domain of the ocean model. 67 68 !! … … 78 79 INTEGER :: ji, jj, jk, ik ! dummy loop indices 79 80 INTEGER :: iconf = 0 ! local integers 80 CHARACTER (len=64) :: cform = "(A12, 3(A13, I7))" 81 CHARACTER (len=64) :: cform = "(A12, 3(A13, I7))" 81 82 INTEGER , DIMENSION(jpi,jpj) :: ik_top , ik_bot ! top and bottom ocean level 82 83 REAL(wp), DIMENSION(jpi,jpj) :: z1_hu_0, z1_hv_0 … … 147 148 hu_0(:,:) = 0._wp 148 149 hv_0(:,:) = 0._wp 150 hf_0(:,:) = 0._wp 149 151 DO jk = 1, jpk 150 152 ht_0(:,:) = ht_0(:,:) + e3t_0(:,:,jk) * tmask(:,:,jk) 151 153 hu_0(:,:) = hu_0(:,:) + e3u_0(:,:,jk) * umask(:,:,jk) 152 154 hv_0(:,:) = hv_0(:,:) + e3v_0(:,:,jk) * vmask(:,:,jk) 155 hf_0(:,:) = hf_0(:,:) + e3f_0(:,:,jk) * fmask(:,:,jk) 153 156 END DO 157 ! 158 r1_ht_0(:,:) = ssmask (:,:) / ( ht_0(:,:) + 1._wp - ssmask (:,:) ) 159 r1_hu_0(:,:) = ssumask(:,:) / ( hu_0(:,:) + 1._wp - ssumask(:,:) ) 160 r1_hv_0(:,:) = ssvmask(:,:) / ( hv_0(:,:) + 1._wp - ssvmask(:,:) ) 161 r1_hf_0(:,:) = ssfmask(:,:) / ( hf_0(:,:) + 1._wp - ssfmask(:,:) ) 154 162 ! 155 163 ! !== time varying part of coordinate system ==! … … 160 168 gdept(:,:,:,Kbb) = gdept_0 ; gdept(:,:,:,Kmm) = gdept_0 ; gdept(:,:,:,Kaa) = gdept_0 ! depth of grid-points 161 169 gdepw(:,:,:,Kbb) = gdepw_0 ; gdepw(:,:,:,Kmm) = gdepw_0 ; gdepw(:,:,:,Kaa) = gdepw_0 ! 162 gde3w= gde3w_0 ! --- !163 ! 170 gde3w = gde3w_0 ! --- ! 171 ! 164 172 e3t(:,:,:,Kbb) = e3t_0 ; e3t(:,:,:,Kmm) = e3t_0 ; e3t(:,:,:,Kaa) = e3t_0 ! scale factors 165 173 e3u(:,:,:,Kbb) = e3u_0 ; e3u(:,:,:,Kmm) = e3u_0 ; e3u(:,:,:,Kaa) = e3u_0 ! 166 174 e3v(:,:,:,Kbb) = e3v_0 ; e3v(:,:,:,Kmm) = e3v_0 ; e3v(:,:,:,Kaa) = e3v_0 ! 167 175 e3f = e3f_0 ! --- ! 168 e3w(:,:,:,Kbb) = e3w_0 ; e3w(:,:,:,Kmm) = e3w_0 ; e3w(:,:,:,Kaa) = e3w_0 ! 169 e3uw(:,:,:,Kbb) = e3uw_0 ; e3uw(:,:,:,Kmm) = e3uw_0 ; e3uw(:,:,:,Kaa) = e3uw_0 ! 176 e3w(:,:,:,Kbb) = e3w_0 ; e3w(:,:,:,Kmm) = e3w_0 ; e3w(:,:,:,Kaa) = e3w_0 ! 177 e3uw(:,:,:,Kbb) = e3uw_0 ; e3uw(:,:,:,Kmm) = e3uw_0 ; e3uw(:,:,:,Kaa) = e3uw_0 ! 170 178 e3vw(:,:,:,Kbb) = e3vw_0 ; e3vw(:,:,:,Kmm) = e3vw_0 ; e3vw(:,:,:,Kaa) = e3vw_0 ! 171 179 ! 172 z1_hu_0(:,:) = ssumask(:,:) / ( hu_0(:,:) + 1._wp - ssumask(:,:) ) ! _i mask due to ISF 173 z1_hv_0(:,:) = ssvmask(:,:) / ( hv_0(:,:) + 1._wp - ssvmask(:,:) ) 180 ! !!st new variable h1_hu_0 h1_hv_0 181 ! z1_hu_0(:,:) = ssumask(:,:) / ( hu_0(:,:) + 1._wp - ssumask(:,:) ) ! _i mask due to ISF 182 ! z1_hv_0(:,:) = ssvmask(:,:) / ( hv_0(:,:) + 1._wp - ssvmask(:,:) ) 174 183 ! 175 184 ! before ! now ! after ! 176 185 ht = ht_0 ! ! water column thickness 177 hu(:,:,Kbb) = hu_0 ; hu(:,:,Kmm) = hu_0 ; hu(:,:,Kaa) = hu_0 ! 186 hu(:,:,Kbb) = hu_0 ; hu(:,:,Kmm) = hu_0 ; hu(:,:,Kaa) = hu_0 ! 178 187 hv(:,:,Kbb) = hv_0 ; hv(:,:,Kmm) = hv_0 ; hv(:,:,Kaa) = hv_0 ! 179 r1_hu(:,:,Kbb) = z1_hu_0 ; r1_hu(:,:,Kmm) = z1_hu_0 ; r1_hu(:,:,Kaa) = z1_hu_0 ! inverse of water column thickness180 r1_hv(:,:,Kbb) = z1_hv_0 ; r1_hv(:,:,Kmm) = z1_hv_0 ; r1_hv(:,:,Kaa) = z1_hv_0 !188 r1_hu(:,:,Kbb) = r1_hu_0 ; r1_hu(:,:,Kmm) = r1_hu_0 ; r1_hu(:,:,Kaa) = r1_hu_0 ! inverse of water column thickness 189 r1_hv(:,:,Kbb) = r1_hv_0 ; r1_hv(:,:,Kmm) = r1_hv_0 ; r1_hv(:,:,Kaa) = r1_hv_0 ! 181 190 ! 182 191 ! … … 198 207 WRITE(numout,*) 'dom_init : ==>>> END of domain initialization' 199 208 WRITE(numout,*) '~~~~~~~~' 200 WRITE(numout,*) 209 WRITE(numout,*) 201 210 ENDIF 202 211 ! … … 210 219 !! ** Purpose : initialization of global domain <--> local domain indices 211 220 !! 212 !! ** Method : 221 !! ** Method : 213 222 !! 214 223 !! ** Action : - mig , mjg : local domain indices ==> global domain indices … … 226 235 END DO 227 236 ! ! global domain indices ==> local domain indices 228 ! ! (return (m.0,m.1)=(1,0) if data domain gridpoint is to the west/south of the 229 ! ! local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain. 237 ! ! (return (m.0,m.1)=(1,0) if data domain gridpoint is to the west/south of the 238 ! ! local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain. 230 239 DO ji = 1, jpiglo 231 240 mi0(ji) = MAX( 1 , MIN( ji - nimpp + 1, jpi+1 ) ) … … 273 282 !!---------------------------------------------------------------------- 274 283 !! *** ROUTINE dom_nam *** 275 !! 284 !! 276 285 !! ** Purpose : read domaine namelists and print the variables. 277 286 !! … … 355 364 neuler = nn_euler 356 365 IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 357 IF(lwp) WRITE(numout,*) 366 IF(lwp) WRITE(numout,*) 358 367 IF(lwp) WRITE(numout,*)' ==>>> Start from rest (ln_rstart=F)' 359 IF(lwp) WRITE(numout,*)' an Euler initial time step is used : nn_euler is forced to 0 ' 368 IF(lwp) WRITE(numout,*)' an Euler initial time step is used : nn_euler is forced to 0 ' 360 369 neuler = 0 361 370 ENDIF … … 383 392 IF(lwp) WRITE(numout,*) 384 393 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 385 CASE ( 1 ) 394 CASE ( 1 ) 386 395 CALL ioconf_calendar('gregorian') 387 396 IF(lwp) WRITE(numout,*) ' ==>>> The IOIPSL calendar is "gregorian", i.e. leap year' … … 419 428 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 420 429 lrxios = ln_xios_read.AND.ln_rstart 421 !set output file type for XIOS based on NEMO namelist 422 IF (nn_wxios > 0) lwxios = .TRUE. 430 !set output file type for XIOS based on NEMO namelist 431 IF (nn_wxios > 0) lwxios = .TRUE. 423 432 nxioso = nn_wxios 424 433 ENDIF … … 463 472 !!---------------------------------------------------------------------- 464 473 INTEGER, DIMENSION(2) :: imi1, imi2, ima1, ima2 465 INTEGER, DIMENSION(2) :: iloc ! 474 INTEGER, DIMENSION(2) :: iloc ! 466 475 REAL(wp) :: ze1min, ze1max, ze2min, ze2max 467 476 !!---------------------------------------------------------------------- … … 473 482 CALL mpp_maxloc( 'domain', e2t(:,:), tmask_i(:,:), ze2max, ima2 ) 474 483 ELSE 475 ze1min = MINVAL( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 476 ze2min = MINVAL( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 477 ze1max = MAXVAL( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 478 ze2max = MAXVAL( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 484 ze1min = MINVAL( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 485 ze2min = MINVAL( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 486 ze1max = MAXVAL( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) 487 ze2max = MAXVAL( e2t(:,:), mask = tmask_i(:,:) == 1._wp ) 479 488 ! 480 489 iloc = MINLOC( e1t(:,:), mask = tmask_i(:,:) == 1._wp ) … … 507 516 !!---------------------------------------------------------------------- 508 517 !! *** ROUTINE dom_nam *** 509 !! 518 !! 510 519 !! ** Purpose : read the domain size in domain configuration file 511 520 !! … … 514 523 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 515 524 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 516 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 517 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 525 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 526 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 518 527 ! 519 528 INTEGER :: inum ! local integer … … 547 556 cd_cfg = 'UNKNOWN' 548 557 kk_cfg = -9999999 549 !- or they may be present as global attributes 550 !- (netcdf only) 558 !- or they may be present as global attributes 559 !- (netcdf only) 551 560 CALL iom_getatt( inum, 'cn_cfg', cd_cfg ) ! returns ! if not found 552 561 CALL iom_getatt( inum, 'nn_cfg', kk_cfg ) ! returns -999 if not found … … 570 579 WRITE(numout,*) ' type of global domain lateral boundary jperio = ', kperio 571 580 ENDIF 572 ! 581 ! 573 582 END SUBROUTINE domain_cfg 574 575 583 584 576 585 SUBROUTINE cfg_write 577 586 !!---------------------------------------------------------------------- 578 587 !! *** ROUTINE cfg_write *** 579 !! 580 !! ** Purpose : Create the "cn_domcfg_out" file, a NetCDF file which 581 !! contains all the ocean domain informations required to 588 !! 589 !! ** Purpose : Create the "cn_domcfg_out" file, a NetCDF file which 590 !! contains all the ocean domain informations required to 582 591 !! define an ocean configuration. 583 592 !! … … 585 594 !! ocean configuration. 586 595 !! 587 !! ** output file : domcfg_out.nc : domain size, characteristics, horizontal 596 !! ** output file : domcfg_out.nc : domain size, characteristics, horizontal 588 597 !! mesh, Coriolis parameter, and vertical scale factors 589 598 !! NB: also contain ORCA family information … … 603 612 ! ! create 'domcfg_out.nc' file ! 604 613 ! ! ============================= ! 605 ! 614 ! 606 615 clnam = cn_domcfg_out ! filename (configuration information) 607 616 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. ) 608 617 609 618 ! 610 619 ! !== ORCA family specificities ==! 611 620 IF( cn_cfg == "ORCA" ) THEN 612 621 CALL iom_rstput( 0, 0, inum, 'ORCA' , 1._wp , ktype = jp_i4 ) 613 CALL iom_rstput( 0, 0, inum, 'ORCA_index', REAL( nn_cfg, wp), ktype = jp_i4 ) 622 CALL iom_rstput( 0, 0, inum, 'ORCA_index', REAL( nn_cfg, wp), ktype = jp_i4 ) 614 623 ENDIF 615 624 ! … … 643 652 CALL iom_rstput( 0, 0, inum, 'glamv', glamv, ktype = jp_r8 ) 644 653 CALL iom_rstput( 0, 0, inum, 'glamf', glamf, ktype = jp_r8 ) 645 ! 654 ! 646 655 CALL iom_rstput( 0, 0, inum, 'gphit', gphit, ktype = jp_r8 ) ! longitude 647 656 CALL iom_rstput( 0, 0, inum, 'gphiu', gphiu, ktype = jp_r8 ) 648 657 CALL iom_rstput( 0, 0, inum, 'gphiv', gphiv, ktype = jp_r8 ) 649 658 CALL iom_rstput( 0, 0, inum, 'gphif', gphif, ktype = jp_r8 ) 650 ! 659 ! 651 660 CALL iom_rstput( 0, 0, inum, 'e1t' , e1t , ktype = jp_r8 ) ! i-scale factors (e1.) 652 661 CALL iom_rstput( 0, 0, inum, 'e1u' , e1u , ktype = jp_r8 ) … … 663 672 ! 664 673 ! !== vertical mesh ==! 665 ! 674 ! 666 675 CALL iom_rstput( 0, 0, inum, 'e3t_1d' , e3t_1d , ktype = jp_r8 ) ! reference 1D-coordinate 667 676 CALL iom_rstput( 0, 0, inum, 'e3w_1d' , e3w_1d , ktype = jp_r8 ) … … 674 683 CALL iom_rstput( 0, 0, inum, 'e3uw_0' , e3uw_0 , ktype = jp_r8 ) 675 684 CALL iom_rstput( 0, 0, inum, 'e3vw_0' , e3vw_0 , ktype = jp_r8 ) 676 ! 685 ! 677 686 ! !== wet top and bottom level ==! (caution: multiplied by ssmask) 678 687 ! … … 694 703 ! 695 704 ! ! ============================ 696 ! ! close the files 705 ! ! close the files 697 706 ! ! ============================ 698 707 CALL iom_close( inum ) -
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DOM/dommsk.F90
r12377 r12482 2 2 !!====================================================================== 3 3 !! *** MODULE dommsk *** 4 !! Ocean initialization : domain land/sea mask 4 !! Ocean initialization : domain land/sea mask 5 5 !!====================================================================== 6 6 !! History : OPA ! 1987-07 (G. Madec) Original code … … 18 18 !! 3.6 ! 2015-05 (P. Mathiot) ISF: add wmask,wumask and wvmask 19 19 !! 4.0 ! 2016-06 (G. Madec, S. Flavoni) domain configuration / user defined interface 20 !! 4.x ! 2020-02 (G. Madec, S. Techene) introduce ssh to h0 ratio 20 21 !!---------------------------------------------------------------------- 21 22 … … 40 41 ! !!* Namelist namlbc : lateral boundary condition * 41 42 REAL(wp) :: rn_shlat ! type of lateral boundary condition on velocity 42 LOGICAL, PUBLIC :: ln_vorlat ! consistency of vorticity boundary condition 43 LOGICAL, PUBLIC :: ln_vorlat ! consistency of vorticity boundary condition 43 44 ! with analytical eqs. 44 45 … … 47 48 !!---------------------------------------------------------------------- 48 49 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 49 !! $Id$ 50 !! $Id$ 50 51 !! Software governed by the CeCILL license (see ./LICENSE) 51 52 !!---------------------------------------------------------------------- … … 59 60 !! zontal velocity points (u & v), vorticity points (f) points. 60 61 !! 61 !! ** Method : The ocean/land mask at t-point is deduced from ko_top 62 !! and ko_bot, the indices of the fist and last ocean t-levels which 62 !! ** Method : The ocean/land mask at t-point is deduced from ko_top 63 !! and ko_bot, the indices of the fist and last ocean t-levels which 63 64 !! are either defined in usrdef_zgr or read in zgr_read. 64 !! The velocity masks (umask, vmask, wmask, wumask, wvmask) 65 !! The velocity masks (umask, vmask, wmask, wumask, wvmask) 65 66 !! are deduced from a product of the two neighboring tmask. 66 67 !! The vorticity mask (fmask) is deduced from tmask taking … … 77 78 !! due to cyclic or North Fold boundaries as well as MPP halos. 78 79 !! 79 !! ** Action : tmask, umask, vmask, wmask, wumask, wvmask : land/ocean mask 80 !! ** Action : tmask, umask, vmask, wmask, wumask, wvmask : land/ocean mask 80 81 !! at t-, u-, v- w, wu-, and wv-points (=0. or 1.) 81 !! fmask : land/ocean mask at f-point (=0., or =1., or 82 !! fmask : land/ocean mask at f-point (=0., or =1., or 82 83 !! =rn_shlat along lateral boundaries) 83 !! tmask_i : interior ocean mask 84 !! tmask_i : interior ocean mask 84 85 !! tmask_h : halo mask 85 86 !! ssmask , ssumask, ssvmask, ssfmask : 2D ocean mask … … 108 109 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namlbc in configuration namelist' ) 109 110 IF(lwm) WRITE ( numond, namlbc ) 110 111 111 112 IF(lwp) THEN ! control print 112 113 WRITE(numout,*) … … 115 116 WRITE(numout,*) ' Namelist namlbc' 116 117 WRITE(numout,*) ' lateral momentum boundary cond. rn_shlat = ',rn_shlat 117 WRITE(numout,*) ' consistency with analytical form ln_vorlat = ',ln_vorlat 118 WRITE(numout,*) ' consistency with analytical form ln_vorlat = ',ln_vorlat 118 119 ENDIF 119 120 ! … … 140 141 ! 141 142 ! the following call is mandatory 142 ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...) 143 ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...) 143 144 CALL lbc_lnk( 'dommsk', tmask , 'T', 1._wp ) ! Lateral boundary conditions 144 145 … … 157 158 END_3D 158 159 ENDIF 159 160 160 161 ! Ocean/land mask at u-, v-, and f-points (computed from tmask) 161 162 ! ---------------------------------------- … … 174 175 END DO 175 176 CALL lbc_lnk_multi( 'dommsk', umask, 'U', 1., vmask, 'V', 1., fmask, 'F', 1. ) ! Lateral boundary conditions 176 177 177 178 ! Ocean/land mask at wu-, wv- and w points (computed from tmask) 178 179 !----------------------------------------- … … 182 183 DO jk = 2, jpk ! interior values 183 184 wmask (:,:,jk) = tmask(:,:,jk) * tmask(:,:,jk-1) 184 wumask(:,:,jk) = umask(:,:,jk) * umask(:,:,jk-1) 185 wumask(:,:,jk) = umask(:,:,jk) * umask(:,:,jk-1) 185 186 wvmask(:,:,jk) = vmask(:,:,jk) * vmask(:,:,jk-1) 186 187 END DO … … 192 193 ssumask(:,:) = MAXVAL( umask(:,:,:), DIM=3 ) 193 194 ssvmask(:,:) = MAXVAL( vmask(:,:,:), DIM=3 ) 195 ssfmask(:,:) = MAXVAL( fmask(:,:,:), DIM=3 ) 194 196 195 197 … … 201 203 ! 202 204 ! ! halo mask : 0 on the halo and 1 elsewhere 203 tmask_h(:,:) = 1._wp 205 tmask_h(:,:) = 1._wp 204 206 tmask_h( 1 :iif, : ) = 0._wp ! first columns 205 207 tmask_h(iil:jpi, : ) = 0._wp ! last columns (including mpp extra columns) … … 208 210 ! 209 211 ! ! north fold mask 210 tpol(1:jpiglo) = 1._wp 212 tpol(1:jpiglo) = 1._wp 211 213 fpol(1:jpiglo) = 1._wp 212 214 IF( jperio == 3 .OR. jperio == 4 ) THEN ! T-point pivot … … 225 227 ENDIF 226 228 ! 227 ! ! interior mask : 2D ocean mask x halo mask 229 ! ! interior mask : 2D ocean mask x halo mask 228 230 tmask_i(:,:) = ssmask(:,:) * tmask_h(:,:) 229 231 230 232 231 233 ! Lateral boundary conditions on velocity (modify fmask) 232 ! --------------------------------------- 234 ! --------------------------------------- 233 235 IF( rn_shlat /= 0 ) THEN ! Not free-slip lateral boundary condition 234 236 ! … … 236 238 ! 237 239 DO jk = 1, jpk 238 zwf(:,:) = fmask(:,:,jk) 240 zwf(:,:) = fmask(:,:,jk) 239 241 DO_2D_00_00 240 242 IF( fmask(ji,jj,jk) == 0._wp ) THEN … … 250 252 fmask(jpi,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(jpi,jj+1), zwf(jpim1,jj), zwf(jpi,jj-1) ) ) 251 253 ENDIF 252 END DO 254 END DO 253 255 DO ji = 2, jpim1 254 256 IF( fmask(ji,1,jk) == 0._wp ) THEN … … 259 261 ENDIF 260 262 END DO 261 #if defined key_agrif 262 IF( .NOT. AGRIF_Root() ) THEN 263 IF ((nbondi == 1).OR.(nbondi == 2)) fmask(nlci-1 , : ,jk) = 0.e0 ! east 264 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , : ,jk) = 0.e0 ! west 265 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1 ,jk) = 0.e0 ! north 266 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south 267 ENDIF 268 #endif 263 #if defined key_agrif 264 IF( .NOT. AGRIF_Root() ) THEN 265 IF ((nbondi == 1).OR.(nbondi == 2)) fmask(nlci-1 , : ,jk) = 0.e0 ! east 266 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , : ,jk) = 0.e0 ! west 267 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1 ,jk) = 0.e0 ! north 268 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south 269 ENDIF 270 #endif 269 271 END DO 270 272 ! … … 276 278 ! 277 279 ENDIF 278 280 279 281 ! User defined alteration of fmask (use to reduce ocean transport in specified straits) 280 ! -------------------------------- 282 ! -------------------------------- 281 283 ! 282 284 CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 283 285 ! 284 286 END SUBROUTINE dom_msk 285 287 286 288 !!====================================================================== 287 289 END MODULE dommsk -
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DOM/domvvl.F90
r12377 r12482 2 2 !!====================================================================== 3 3 !! *** MODULE domvvl *** 4 !! Ocean : 4 !! Ocean : 5 5 !!====================================================================== 6 6 !! History : 2.0 ! 2006-06 (B. Levier, L. Marie) original code … … 9 9 !! 3.6 ! 2014-11 (P. Mathiot) add ice shelf capability 10 10 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rename dom_vvl_sf_swp -> dom_vvl_sf_update for new timestepping 11 !! 4.x ! 2020-02 (G. Madec, S. Techene) introduce ssh to h0 ratio 11 12 !!---------------------------------------------------------------------- 12 13 … … 98 99 !!---------------------------------------------------------------------- 99 100 !! *** ROUTINE dom_vvl_init *** 100 !! 101 !! 101 102 !! ** Purpose : Initialization of all scale factors, depths 102 103 !! and water column heights … … 107 108 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 108 109 !! - Regrid: e3[u/v](:,:,:,Kmm) 109 !! e3[u/v](:,:,:,Kmm) 110 !! e3w(:,:,:,Kmm) 110 !! e3[u/v](:,:,:,Kmm) 111 !! e3w(:,:,:,Kmm) 111 112 !! e3[u/v]w_b 112 !! e3[u/v]w_n 113 !! e3[u/v]w_n 113 114 !! gdept(:,:,:,Kmm), gdepw(:,:,:,Kmm) and gde3w 114 115 !! - h(t/u/v)_0 … … 139 140 !!---------------------------------------------------------------------- 140 141 !! *** ROUTINE dom_vvl_init *** 141 !! 142 !! ** Purpose : Interpolation of all scale factors, 142 !! 143 !! ** Purpose : Interpolation of all scale factors, 143 144 !! depths and water column heights 144 145 !! … … 147 148 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 148 149 !! - Regrid: e3(u/v)_n 149 !! e3(u/v)_b 150 !! e3w_n 151 !! e3(u/v)w_b 152 !! e3(u/v)w_n 150 !! e3(u/v)_b 151 !! e3w_n 152 !! e3(u/v)w_b 153 !! e3(u/v)w_n 153 154 !! gdept_n, gdepw_n and gde3w_n 154 155 !! - h(t/u/v)_0 … … 168 169 CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3u(:,:,:,Kbb), 'U' ) ! from T to U 169 170 CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm), 'U' ) 170 CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3v(:,:,:,Kbb), 'V' ) ! from T to V 171 CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3v(:,:,:,Kbb), 'V' ) ! from T to V 171 172 CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm), 'V' ) 172 173 CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3f(:,:,:), 'F' ) ! from U to F 173 ! ! Vertical interpolation of e3t,u,v 174 ! ! Vertical interpolation of e3t,u,v 174 175 CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w (:,:,:,Kmm), 'W' ) ! from T to W 175 176 CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3w (:,:,:,Kbb), 'W' ) … … 193 194 ! zcoef = tmask - wmask ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 194 195 ! ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf) 195 ! ! 0.5 where jk = mikt 196 ! ! 0.5 where jk = mikt 196 197 !!gm ??????? BUG ? gdept(:,:,:,Kmm) as well as gde3w does not include the thickness of ISF ?? 197 198 zcoef = ( tmask(ji,jj,jk) - wmask(ji,jj,jk) ) 198 199 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) 199 200 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm)) & 200 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm)) 201 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm)) 201 202 gde3w(ji,jj,jk) = gdept(ji,jj,jk,Kmm) - ssh(ji,jj,Kmm) 202 203 gdepw(ji,jj,jk,Kbb) = gdepw(ji,jj,jk-1,Kbb) + e3t(ji,jj,jk-1,Kbb) 203 204 gdept(ji,jj,jk,Kbb) = zcoef * ( gdepw(ji,jj,jk ,Kbb) + 0.5 * e3w(ji,jj,jk,Kbb)) & 204 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kbb) + e3w(ji,jj,jk,Kbb)) 205 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kbb) + e3w(ji,jj,jk,Kbb)) 205 206 END_3D 206 207 ! … … 261 262 IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN 262 263 IF( nn_cfg == 3 ) THEN ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2 263 ii0 = 103 ; ii1 = 111 264 ij0 = 128 ; ij1 = 135 ; 264 ii0 = 103 ; ii1 = 111 265 ij0 = 128 ; ij1 = 135 ; 265 266 frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.0_wp 266 267 frq_rst_hdv( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 1.e0_wp / rdt … … 280 281 CALL iom_set_rstw_var_active('tilde_e3t_n') 281 282 END IF 282 ! ! -------------! 283 ! ! -------------! 283 284 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 284 285 ! ! ------------ ! … … 291 292 292 293 293 SUBROUTINE dom_vvl_sf_nxt( kt, Kbb, Kmm, Kaa, kcall ) 294 SUBROUTINE dom_vvl_sf_nxt( kt, Kbb, Kmm, Kaa, kcall ) 294 295 !!---------------------------------------------------------------------- 295 296 !! *** ROUTINE dom_vvl_sf_nxt *** 296 !! 297 !! 297 298 !! ** Purpose : - compute the after scale factors used in tra_zdf, dynnxt, 298 299 !! tranxt and dynspg routines 299 300 !! 300 301 !! ** Method : - z_star case: Repartition of ssh INCREMENT proportionnaly to the level thickness. 301 !! - z_tilde_case: after scale factor increment = 302 !! - z_tilde_case: after scale factor increment = 302 303 !! high frequency part of horizontal divergence 303 304 !! + retsoring towards the background grid … … 307 308 !! 308 309 !! ** Action : - hdiv_lf : restoring towards full baroclinic divergence in z_tilde case 309 !! - tilde_e3t_a: after increment of vertical scale factor 310 !! - tilde_e3t_a: after increment of vertical scale factor 310 311 !! in z_tilde case 311 312 !! - e3(t/u/v)_a … … 410 411 un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj) & 411 412 & * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj ,jk) ) 412 vn_td(ji,jj,jk) = rn_ahe3 * vmask(ji,jj,jk) * e1_e2v(ji,jj) & 413 vn_td(ji,jj,jk) = rn_ahe3 * vmask(ji,jj,jk) * e1_e2v(ji,jj) & 413 414 & * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji ,jj+1,jk) ) 414 415 zwu(ji,jj) = zwu(ji,jj) + un_td(ji,jj,jk) … … 467 468 WRITE(numout, *) 'at i, j, k=', ijk_max 468 469 WRITE(numout, *) 'MIN( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmin 469 WRITE(numout, *) 'at i, j, k=', ijk_min 470 WRITE(numout, *) 'at i, j, k=', ijk_min 470 471 CALL ctl_stop( 'STOP', 'MAX( ABS( tilde_e3t_a(:,:,: ) ) / e3t_0(:,:,:) ) too high') 471 472 ENDIF … … 582 583 !!---------------------------------------------------------------------- 583 584 !! *** ROUTINE dom_vvl_sf_update *** 584 !! 585 !! ** Purpose : for z tilde case: compute time filter and swap of scale factors 585 !! 586 !! ** Purpose : for z tilde case: compute time filter and swap of scale factors 586 587 !! compute all depths and related variables for next time step 587 588 !! write outputs and restart file … … 593 594 !! ** Action : - tilde_e3t_(b/n) ready for next time step 594 595 !! - Recompute: 595 !! e3(u/v)_b 596 !! e3w(:,:,:,Kmm) 597 !! e3(u/v)w_b 598 !! e3(u/v)w_n 596 !! e3(u/v)_b 597 !! e3w(:,:,:,Kmm) 598 !! e3(u/v)w_b 599 !! e3(u/v)w_n 599 600 !! gdept(:,:,:,Kmm), gdepw(:,:,:,Kmm) and gde3w 600 601 !! h(u/v) and h(u/v)r … … 627 628 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) 628 629 ELSE 629 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) & 630 tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) & 630 631 & + atfp * ( tilde_e3t_b(:,:,:) - 2.0_wp * tilde_e3t_n(:,:,:) + tilde_e3t_a(:,:,:) ) 631 632 ENDIF … … 639 640 ! - ML - e3u(:,:,:,Kbb) and e3v(:,:,:,Kbb) are already computed in dynnxt 640 641 ! - JC - hu(:,:,:,Kbb), hv(:,:,:,:,Kbb), hur_b, hvr_b also 641 642 642 643 CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3f(:,:,:), 'F' ) 643 644 644 645 ! Vertical scale factor interpolations 645 646 CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w(:,:,:,Kmm), 'W' ) … … 660 661 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) 661 662 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm) ) & 662 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm) ) 663 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm) ) 663 664 gde3w(ji,jj,jk) = gdept(ji,jj,jk,Kmm) - ssh(ji,jj,Kmm) 664 665 END_3D … … 779 780 !!--------------------------------------------------------------------- 780 781 !! *** ROUTINE dom_vvl_rst *** 781 !! 782 !! 782 783 !! ** Purpose : Read or write VVL file in restart file 783 784 !! … … 796 797 !!---------------------------------------------------------------------- 797 798 ! 798 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialise 799 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialise 799 800 ! ! =============== 800 801 IF( ln_rstart ) THEN !* Read the restart file … … 815 816 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 816 817 CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 817 ! needed to restart if land processor not computed 818 ! needed to restart if land processor not computed 818 819 IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' 819 WHERE ( tmask(:,:,:) == 0.0_wp ) 820 WHERE ( tmask(:,:,:) == 0.0_wp ) 820 821 e3t(:,:,:,Kmm) = e3t_0(:,:,:) 821 822 e3t(:,:,:,Kbb) = e3t_0(:,:,:) … … 880 881 ! 881 882 882 IF( ll_wd ) THEN ! MJB ll_wd edits start here - these are essential 883 IF( ll_wd ) THEN ! MJB ll_wd edits start here - these are essential 883 884 ! 884 885 IF( cn_cfg == 'wad' ) THEN … … 915 916 CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' ) 916 917 ENDIF 917 END DO 918 END DO 918 END DO 919 END DO 919 920 ! 920 921 ELSE … … 957 958 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lwxios) 958 959 END IF 959 ! ! -------------! 960 ! ! -------------! 960 961 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 961 962 ! ! ------------ ! … … 972 973 !!--------------------------------------------------------------------- 973 974 !! *** ROUTINE dom_vvl_ctl *** 974 !! 975 !! 975 976 !! ** Purpose : Control the consistency between namelist options 976 977 !! for vertical coordinate … … 981 982 & ln_vvl_zstar_at_eqtor , rn_ahe3 , rn_rst_e3t , & 982 983 & rn_lf_cutoff , rn_zdef_max , ln_vvl_dbg ! not yet implemented: ln_vvl_kepe 983 !!---------------------------------------------------------------------- 984 !!---------------------------------------------------------------------- 984 985 ! 985 986 READ ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) -
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/nemogcm.F90
r12377 r12482 29 29 !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 30 30 !! - ! 2011-11 (C. Harris) decomposition changes for running with CICE 31 !! 3.6 ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 31 !! 3.6 ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 32 32 !! - ! 2014-12 (G. Madec) remove KPP scheme and cross-land advection (cla) 33 33 !! 4.0 ! 2016-10 (G. Madec, S. Flavoni) domain configuration / user defined interface … … 53 53 USE ldftra ! lateral diffusivity setting (ldftra_init routine) 54 54 USE trdini ! dyn/tra trends initialization (trd_init routine) 55 USE asminc ! assimilation increments 55 USE asminc ! assimilation increments 56 56 USE asmbkg ! writing out state trajectory 57 57 USE diaptr ! poleward transports (dia_ptr_init routine) … … 60 60 USE diacfl ! CFL diagnostics (dia_cfl_init routine) 61 61 USE diamlr ! IOM context management for multiple-linear-regression analysis 62 USE step ! NEMO time-stepping (stproutine)62 USE steplf ! NEMO time-stepping (stplf routine) 63 63 USE isfstp ! ice shelf (isf_stp_init routine) 64 64 USE icbini ! handle bergs, initialisation … … 86 86 USE lib_mpp ! distributed memory computing 87 87 USE mppini ! shared/distributed memory setting (mpp_init routine) 88 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 88 USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 89 89 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 90 90 #if defined key_iomput … … 124 124 !! 125 125 !! ** Method : - model general initialization 126 !! - launch the time-stepping (stp routine)126 !! - launch the time-stepping (stplf routine) 127 127 !! - finalize the run by closing files and communications 128 128 !! … … 143 143 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 144 144 CALL Agrif_Declare_Var_dom ! AGRIF: set the meshes for DOM 145 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 145 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 146 146 # if defined key_top 147 147 CALL Agrif_Declare_Var_top ! " " " " " TOP … … 178 178 ! 179 179 DO WHILE( istp <= nitend .AND. nstop == 0 ) 180 CALL stp 180 CALL stplf 181 181 istp = istp + 1 182 182 END DO … … 201 201 IF ( istp == nitend ) elapsed_time = zstptiming - elapsed_time 202 202 ENDIF 203 204 CALL stp ( istp )203 204 CALL stplf ( istp ) 205 205 istp = istp + 1 206 206 … … 212 212 ! 213 213 DO WHILE( istp <= nitend .AND. nstop == 0 ) 214 CALL stp_diurnal( istp ) ! time step only the diurnal SST 214 CALL stp_diurnal( istp ) ! time step only the diurnal SST 215 215 istp = istp + 1 216 216 END DO … … 384 384 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 385 385 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 386 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 386 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 387 387 ! 388 388 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file … … 420 420 CALL wad_init ! Wetting and drying options 421 421 CALL dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 422 IF( ln_crs ) CALL crs_init( Nnn ) ! coarsened grid: domain initialization 422 IF( ln_crs ) CALL crs_init( Nnn ) ! coarsened grid: domain initialization 423 423 IF( sn_cfctl%l_prtctl ) & 424 424 & CALL prt_ctl_init ! Print control 425 425 426 426 CALL diurnal_sst_bulk_init ! diurnal sst 427 IF( ln_diurnal ) CALL diurnal_sst_coolskin_init ! cool skin 428 ! 427 IF( ln_diurnal ) CALL diurnal_sst_coolskin_init ! cool skin 428 ! 429 429 IF( ln_diurnal_only ) THEN ! diurnal only: a subset of the initialisation routines 430 430 CALL istate_init( Nbb, Nnn, Naa ) ! ocean initial state (Dynamics and tracers) … … 434 434 CALL dia_obs_init( Nnn ) ! Initialize observational data 435 435 CALL dia_obs( nit000 - 1, Nnn ) ! Observation operator for restart 436 ENDIF 436 ENDIF 437 437 IF( lk_asminc ) CALL asm_inc_init( Nbb, Nnn, Nrhs ) ! Assimilation increments 438 438 ! … … 440 440 ENDIF 441 441 ! 442 442 443 443 CALL istate_init( Nbb, Nnn, Naa ) ! ocean initial state (Dynamics and tracers) 444 444 445 ! ! external forcing 445 ! ! external forcing 446 446 CALL tide_init ! tidal harmonics 447 447 CALL sbc_init( Nbb, Nnn, Naa ) ! surface boundary conditions (including sea-ice) … … 450 450 ! ! Ocean physics 451 451 CALL zdf_phy_init( Nnn ) ! Vertical physics 452 452 453 453 ! ! Lateral physics 454 454 CALL ldf_tra_init ! Lateral ocean tracer physics … … 487 487 CALL sto_par_init ! Stochastic parametrization 488 488 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 489 489 490 490 ! ! Diagnostics 491 491 CALL flo_init( Nnn ) ! drifting Floats … … 535 535 WRITE(numout,*) ' sn_cfctl%l_prttrc = ', sn_cfctl%l_prttrc 536 536 WRITE(numout,*) ' sn_cfctl%l_oasout = ', sn_cfctl%l_oasout 537 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 538 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax 539 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr 540 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr 537 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 538 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax 539 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr 540 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr 541 541 WRITE(numout,*) ' level of print nn_print = ', nn_print 542 542 WRITE(numout,*) ' Start i indice for SUM control nn_ictls = ', nn_ictls … … 662 662 !!---------------------------------------------------------------------- 663 663 ! 664 ierr = oce_alloc () ! ocean 664 ierr = oce_alloc () ! ocean 665 665 ierr = ierr + dia_wri_alloc() 666 666 ierr = ierr + dom_oce_alloc() ! ocean domain … … 674 674 END SUBROUTINE nemo_alloc 675 675 676 676 677 677 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all ) 678 678 !!---------------------------------------------------------------------- … … 705 705 !!====================================================================== 706 706 END MODULE nemogcm 707
Note: See TracChangeset
for help on using the changeset viewer.