Changeset 566 for trunk/NEMO/OFF_SRC
- Timestamp:
- 2006-11-13T14:39:40+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OFF_SRC/LDF/ldftra.F90
r343 r566 4 4 !! Ocean physics: lateral diffusivity coefficient 5 5 !!===================================================================== 6 6 !! History : 7 !! ! 07-97 (G. Madec) from inimix.F split in 2 routines 8 !! ! 08-97 (G. Madec) multi dimensional coefficients 9 !! 8.5 ! 02-09 (G. Madec) F90: Free form and module 10 !! 9.0 ! 05-11 (G. Madec) 7 11 !!---------------------------------------------------------------------- 8 12 !! ldf_tra_init : initialization, namelist read, and parameters control … … 30 34 # include "domzgr_substitute.h90" 31 35 # include "vectopt_loop_substitute.h90" 32 !!---------------------------------------------------------------------- 33 !! OPA 9.0 , LOCEAN-IPSL (2005)34 !! 35 !! 36 !!---------------------------------------------------------------------- 36 !!--------------------------------------------------------------------------------- 37 !! OPA 9.0 , LOCEAN-IPSL (2005) 38 !! $Header$ 39 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 40 !!--------------------------------------------------------------------------------- 37 41 38 42 CONTAINS … … 42 46 !! *** ROUTINE ldf_tra_init *** 43 47 !! 44 !! ** Purpose : initializations of the horizontal ocean tracer physics48 !! ** Purpose : initializations of the tracer lateral mixing coeff. 45 49 !! 46 !! ** Method : 47 !! Direction of lateral diffusion (tracers and/or momentum) 48 !! ln_traldf_iso = T : initialize the slope arrays to zero 49 !! ln_traldf_geop = T : initialise the slope arrays to the i- and 50 !! j-slopes of s-surfaces 51 !! Eddy diffusivity and eddy induced velocity cefficients: 50 !! ** Method : the Eddy diffusivity and eddy induced velocity ceoff. 51 !! are defined as follows: 52 52 !! default option : constant coef. aht0, aeiv0 (namelist) 53 53 !! 'key_traldf_c1d': depth dependent coef. defined in … … 63 63 !! profile. 64 64 !! 65 !! Reference :66 !! Madec, G. and M. Imbard, 1996, A global ocean mesh to overcome67 !! the North Pole singularity, Climate Dynamics, 12, 381-388.68 !!69 !! History :70 !! ! 07-97 (G. Madec) from inimix.F split in 2 routines71 !! ! 08-97 (G. Madec) multi dimensional coefficients72 !! 8.5 ! 02-09 (G. Madec) F90: Free form and module73 65 !!---------------------------------------------------------------------- 74 !! * Modules used75 66 USE ioipsl 76 67 77 !! * Local declarations78 68 INTEGER :: ioptio ! ??? 79 69 LOGICAL :: ll_print = .FALSE. ! =T print eddy coef. in numout … … 93 83 IF(lwp) THEN 94 84 WRITE(numout,*) 95 WRITE(numout,*) 'ldf_tra : lateral tracer physics'96 WRITE(numout,*) '~~~~~~~ '97 WRITE(numout,*) ' Namelist nam_traldf : set lateral mixing parameters (type, direction, coefficients)'85 WRITE(numout,*) 'ldf_tra_init : lateral tracer physics' 86 WRITE(numout,*) '~~~~~~~~~~~~ ' 87 WRITE(numout,*) ' Namelist nam_traldf : lateral mixing coefficients' 98 88 WRITE(numout,*) ' laplacian operator ln_traldf_lap = ', ln_traldf_lap 99 89 WRITE(numout,*) ' bilaplacian operator ln_traldf_bilap = ', ln_traldf_bilap 100 WRITE(numout,*) ' iso-level ln_traldf_level = ', ln_traldf_level101 WRITE(numout,*) ' horizontal (geopotential) ln_traldf_hor = ', ln_traldf_hor102 WRITE(numout,*) ' iso-neutral ln_traldf_iso = ', ln_traldf_iso103 90 WRITE(numout,*) ' lateral eddy diffusivity aht0 = ', aht0 104 91 WRITE(numout,*) ' background hor. diffusivity ahtb0 = ', ahtb0 … … 109 96 ! Parameter control 110 97 111 ! control the input 112 ioptio = 0 113 IF( ln_traldf_lap ) ioptio = ioptio + 1 114 IF( ln_traldf_bilap ) ioptio = ioptio + 1 115 IF( ioptio /= 1 ) THEN 116 IF(lwp) WRITE(numout,cform_err) 117 IF(lwp) WRITE(numout,*) ' use ONE of the 2 lap/bilap operator type on tracer' 118 nstop = nstop + 1 119 ENDIF 120 ioptio = 0 121 IF( ln_traldf_level ) ioptio = ioptio + 1 122 IF( ln_traldf_hor ) ioptio = ioptio + 1 123 IF( ln_traldf_iso ) ioptio = ioptio + 1 124 IF( ioptio /= 1 ) THEN 125 IF(lwp) WRITE(numout,cform_err) 126 IF(lwp) WRITE(numout,*) ' use only ONE direction (level/hor/iso)' 127 nstop = nstop + 1 128 ENDIF 129 130 ! ... Choice of the lateral scheme used 131 IF( lk_traldf_eiv ) THEN 132 IF(lwp) WRITE(numout,*) ' eddy induced velocity on tracers' 133 IF( .NOT.ln_traldf_iso .OR. ln_traldf_bilap ) THEN 134 IF(lwp) WRITE(numout,cform_err) 135 IF(lwp) WRITE(numout,*) ' the eddy induced velocity on tracers requires isopycnal laplacian diffusion' 136 nstop = nstop + 1 137 ENDIF 138 ENDIF 139 140 IF( lk_sco ) THEN ! s-coordinates: rotation required for horizontal or isopycnal mixing 141 IF( ( ln_traldf_iso .OR. ln_traldf_hor ) .AND. .NOT.lk_ldfslp ) THEN 142 IF(lwp) WRITE(numout,cform_err) 143 IF(lwp) WRITE(numout,*) ' the rotation of the diffusive tensor require key_ldfslp' 144 IF( .NOT.lk_esopa ) nstop = nstop + 1 145 ENDIF 146 ELSE ! z-coordinates with/without partial step: 147 ln_traldf_level = ln_traldf_level .OR. ln_traldf_hor ! level diffusion = horizontal diffusion 148 ln_traldf_hor = .FALSE. 149 IF(lwp) WRITE(numout,*) ' horizontal mixing in z-coord or partial steps: force ln_traldf_level = T' 150 IF(lwp) WRITE(numout,*) ' and force ln_traldf_hor = F' 151 IF( ln_traldf_iso .AND. .NOT.lk_ldfslp ) THEN ! rotation required for isopycnal mixing 152 IF(lwp) WRITE(numout,cform_err) 153 IF(lwp) WRITE(numout,*) ' the rotation of the diffusive tensor require key_ldfslp' 154 IF( .NOT.lk_esopa ) nstop = nstop + 1 155 ENDIF 156 ENDIF 157 158 l_traldf_lap = ln_traldf_lap .AND. ln_traldf_level ! iso-level laplacian operator 159 l_traldf_bilap = ln_traldf_bilap .AND. ln_traldf_level ! iso-level bilaplacian operator 160 l_traldf_bilapg = ln_traldf_bilap .AND. ln_traldf_hor ! geopotential bilap. (s-coord) 161 l_traldf_iso = ln_traldf_lap .AND. & ! laplacian operator 162 & ( ln_traldf_iso .OR. ln_traldf_hor ) & ! iso-neutral (z-coord) or horizontal (s-coord) 163 & .AND. .NOT.lk_zps 164 l_traldf_iso_zps = ln_traldf_lap .AND. & ! laplacian operator 165 & ( ln_traldf_iso .OR. ln_traldf_hor ) & ! iso-neutral (partial steps) 166 & .AND. lk_zps ! or geopotential in mixed partial steps/s-coord 167 l_trazdf_iso = .FALSE. 168 l_trazdf_iso_vo = .FALSE. 169 IF( l_traldf_iso ) l_trazdf_iso = .TRUE. 170 IF( l_traldf_iso_zps ) l_trazdf_iso = .TRUE. 171 #if defined key_vectopt_memory 172 IF( l_trazdf_iso ) THEN 173 l_trazdf_iso = .FALSE. 174 l_trazdf_iso_vo = .TRUE. 175 ENDIF 176 #endif 177 178 ioptio = 0 179 IF( l_traldf_lap ) ioptio = ioptio + 1 180 IF( l_traldf_bilap ) ioptio = ioptio + 1 181 IF( l_traldf_bilapg ) ioptio = ioptio + 1 182 IF( l_traldf_iso ) ioptio = ioptio + 1 183 IF( l_traldf_iso_zps ) ioptio = ioptio + 1 184 IF( ioptio /= 1 ) THEN 185 IF(lwp) WRITE(numout,cform_err) 186 IF(lwp) WRITE(numout,*) ' this combination of operator and direction has not been implemented' 187 nstop = nstop + 1 188 ENDIF 189 IF( lk_esopa ) THEN 190 l_traldf_lap = .TRUE. ; l_traldf_bilap = .TRUE. ; l_traldf_bilapg = .TRUE. 191 l_traldf_iso = .TRUE. ; l_traldf_iso_zps = .TRUE. 192 l_trazdf_iso = .TRUE. ; l_trazdf_iso_vo = .TRUE. 193 IF(lwp ) WRITE(numout,*) ' esopa test: use all lateral physics options' 194 ENDIF 195 98 ! ... Check consistency for type and direction : 99 ! ==> will be done in traldf module 196 100 197 101 ! ... Space variation of eddy coefficients … … 208 112 IF(lwp) WRITE(numout,*) ' tracer mixing coef. = F( depth )' 209 113 ioptio = ioptio + 1 210 IF( lk_sco ) THEN 211 IF(lwp) WRITE(numout,cform_err) 212 IF(lwp) WRITE(numout,*) ' key_traldf_c1d cannot be used in s-coordinate (key_s_coord)' 213 nstop = nstop + 1 214 ENDIF 114 IF( .NOT. ln_zco ) & 115 & CALL ctl_stop( ' key_traldf_c1d can only be used in z-coordinate - full step' ) 215 116 #endif 216 117 IF( ioptio == 0 ) THEN 217 118 IF(lwp) WRITE(numout,*) ' tracer mixing coef. = constant (default option)' 218 119 ELSEIF( ioptio > 1 ) THEN 219 IF(lwp) WRITE(numout,cform_err) 220 IF(lwp) WRITE(numout,*) ' use only one of the following keys:', & 221 & ' key_traldf_c3d, key_traldf_c2d, key_traldf_c1d' 222 nstop = nstop + 1 120 CALL ctl_stop(' use only one of the following keys:', & 121 & ' key_traldf_c3d, key_traldf_c2d, key_traldf_c1d' ) 223 122 ENDIF 224 123 225 IF( l _traldf_bilap .OR. l_traldf_bilapg) THEN124 IF( ln_traldf_bilap ) THEN 226 125 IF(lwp) WRITE(numout,*) ' biharmonic tracer diffusion' 227 IF( aht0 > 0 .AND. .NOT. lk_esopa ) THEN 228 IF(lwp) WRITE(numout,cform_err) 229 IF(lwp) WRITE(numout,*) ' The horizontal diffusivity coef. aht0 must be negative' 230 nstop = nstop + 1 231 ENDIF 126 IF( aht0 > 0 .AND. .NOT. lk_esopa ) & 127 & CALL ctl_stop( ' The horizontal diffusivity coef. aht0 must be negative' ) 232 128 ELSE 233 129 IF(lwp) WRITE(numout,*) ' harmonic tracer diffusion (default)' 234 IF( aht0 < 0 .AND. .NOT. lk_esopa ) THEN 235 IF(lwp) WRITE(numout,cform_err) 236 IF(lwp) WRITE(numout,*) ' The horizontal diffusivity coef. aht0 must be positive' 237 nstop = nstop + 1 238 ENDIF 130 IF( aht0 < 0 .AND. .NOT. lk_esopa ) & 131 & CALL ctl_stop(' The horizontal diffusivity coef. aht0 must be positive' ) 239 132 ENDIF 240 133 … … 244 137 245 138 #if defined key_traldf_c3d 246 CALL ldf_tra_c3d( ll_print ) 139 CALL ldf_tra_c3d( ll_print ) ! aht = 3D coef. = F( longitude, latitude, depth ) 247 140 #elif defined key_traldf_c2d 248 CALL ldf_tra_c2d( ll_print ) 141 CALL ldf_tra_c2d( ll_print ) ! aht = 2D coef. = F( longitude, latitude ) 249 142 #elif defined key_traldf_c1d 250 CALL ldf_tra_c1d( ll_print ) 143 CALL ldf_tra_c1d( ll_print ) ! aht = 1D coef. = F( depth ) 251 144 #else 252 ! Constant coefficients145 ! Constant coefficients 253 146 IF(lwp)WRITE(numout,*) 254 IF(lwp)WRITE(numout,*) ' inildf: constant eddy diffusivity coef.' 255 IF(lwp)WRITE(numout,*) ' ~~~~~~' 256 IF(lwp)WRITE(numout,*) ' ahtu = ahtv = ahtw = aht0 = ', aht0 147 IF(lwp)WRITE(numout,*) ' constant eddy diffusivity coef. ahtu = ahtv = ahtw = aht0 = ', aht0 257 148 IF( lk_traldf_eiv ) THEN 258 149 IF(lwp)WRITE(numout,*) 259 IF(lwp)WRITE(numout,*) ' inildf: constant eddy induced velocity coef.' 260 IF(lwp)WRITE(numout,*) ' ~~~~~~ ' 261 IF(lwp)WRITE(numout,*) ' aeiu = aeiv = aeiw = aeiv0 = ', aeiv0 150 IF(lwp)WRITE(numout,*) ' constant eddy induced velocity coef. aeiu = aeiv = aeiw = aeiv0 = ', aeiv0 262 151 ENDIF 263 152 #endif
Note: See TracChangeset
for help on using the changeset viewer.