Changeset 4245 for branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
- Timestamp:
- 2013-11-19T12:19:21+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
r4147 r4245 27 27 USE oce ! ocean: variables 28 28 USE dom_oce ! ocean: domain variables 29 USE c1d ! 1D vertical configuration 29 30 USE trdmod_oce ! ocean: trend variables 30 31 USE trdtra ! active tracers: trends … … 44 45 PUBLIC tra_dmp ! routine called by step.F90 45 46 PUBLIC tra_dmp_init ! routine called by opa.F90 46 PUBLIC dtacof ! routine called by in both tradmp.F90 and trcdmp.F9047 PUBLIC dtacof_zoom ! routine called by in both tradmp.F90 and trcdmp.F9047 PUBLIC dtacof ! routine called by tradmp.F90, trcdmp.F90 and dyndmp.F90 48 PUBLIC dtacof_zoom ! routine called by tradmp.F90, trcdmp.F90 and dyndmp.F90 48 49 49 50 ! !!* Namelist namtra_dmp : T & S newtonian damping * 50 LOGICAL, PUBLIC :: ln_tradmp = .TRUE.!: internal damping flag51 LOGICAL, PUBLIC :: ln_tradmp !: internal damping flag 51 52 INTEGER :: nn_hdmp ! = 0/-1/'latitude' for damping over T and S 52 53 INTEGER :: nn_zdmp ! = 0/1/2 flag for damping in the mixed layer … … 191 192 !! ** Purpose : Initialization for the newtonian damping 192 193 !! 193 !! ** Method : read the nam mbfnamelist and check the parameters194 !! ** Method : read the namtra_dmp namelist and check the parameters 194 195 !!---------------------------------------------------------------------- 195 196 NAMELIST/namtra_dmp/ ln_tradmp, nn_hdmp, nn_zdmp, rn_surf, rn_bot, rn_dep, nn_file … … 206 207 WRITE ( numond, namtra_dmp ) 207 208 208 IF( lzoom ) nn_zdmp = 0 ! restoring to climatology at closed north or south boundaries209 IF( lzoom .AND. .NOT. lk_c1d ) nn_zdmp = 0 ! restoring to climatology at closed north or south boundaries 209 210 210 211 IF(lwp) THEN ! Namelist print … … 213 214 WRITE(numout,*) '~~~~~~~' 214 215 WRITE(numout,*) ' Namelist namtra_dmp : set damping parameter' 215 WRITE(numout,*) ' add a damping term n or notln_tradmp = ', ln_tradmp216 WRITE(numout,*) ' add a damping term or not ln_tradmp = ', ln_tradmp 216 217 WRITE(numout,*) ' T and S damping option nn_hdmp = ', nn_hdmp 217 WRITE(numout,*) ' mixed layer damping option nn_zdmp = ', nn_zdmp, '( zoom: forced to 0)'218 WRITE(numout,*) ' mixed layer damping option nn_zdmp = ', nn_zdmp, '(non-C1D zoom: forced to 0)' 218 219 WRITE(numout,*) ' surface time scale (days) rn_surf = ', rn_surf 219 220 WRITE(numout,*) ' bottom time scale (days) rn_bot = ', rn_bot … … 227 228 IF( tra_dmp_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'tra_dmp_init: unable to allocate arrays' ) 228 229 ! 230 #if ! defined key_c1d 229 231 SELECT CASE ( nn_hdmp ) 230 232 CASE ( -1 ) ; IF(lwp) WRITE(numout,*) ' tracer damping in the Med & Red seas only' … … 235 237 END SELECT 236 238 ! 239 #endif 237 240 SELECT CASE ( nn_zdmp ) 238 241 CASE ( 0 ) ; IF(lwp) WRITE(numout,*) ' tracer damping throughout the water column' … … 252 255 ttrdmp(:,:,:) = 0._wp 253 256 ! ! Damping coefficients initialization 254 IF( lzoom ) THEN ; CALL dtacof_zoom( resto )257 IF( lzoom .AND. .NOT. lk_c1d ) THEN ; CALL dtacof_zoom( resto ) 255 258 ELSE ; CALL dtacof( nn_hdmp, rn_surf, rn_bot, rn_dep, nn_file, 'TRA', resto ) 256 259 ENDIF … … 360 363 REAL(wp) , INTENT(in ) :: pn_dep ! depth of transition (meters) 361 364 INTEGER , INTENT(in ) :: kn_file ! save the damping coef on a file or not 362 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracerindicator)365 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA, TRC or DYN (tracer/dynamics indicator) 363 366 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: presto ! restoring coeff. (s-1) 364 367 ! … … 380 383 CALL wrk_alloc( jpi, jpj, zmrs ) 381 384 CALL wrk_alloc( jpi, jpj, jpk, zdct ) 385 #if defined key_c1d 386 ! ! ==================== 387 ! ! C1D configuration : local domain 388 ! ! ==================== 389 ! 390 IF(lwp) WRITE(numout,*) 391 IF(lwp) WRITE(numout,*) ' dtacof : C1D 3x3 local domain' 392 IF(lwp) WRITE(numout,*) ' -----------------------------' 393 ! 394 presto(:,:,:) = 0._wp 395 ! 396 zsdmp = 1._wp / ( pn_surf * rday ) 397 zbdmp = 1._wp / ( pn_bot * rday ) 398 DO jk = 2, jpkm1 399 DO jj = 1, jpj 400 DO ji = 1, jpi 401 ! ONLY vertical variation from zsdmp (sea surface) to zbdmp (bottom) 402 presto(ji,jj,jk) = zbdmp + (zsdmp-zbdmp) * EXP(-fsdept(ji,jj,jk)/pn_dep) 403 END DO 404 END DO 405 END DO 406 ! 407 presto(:,:, : ) = presto(:,:,:) * tmask(:,:,:) 408 #else 382 409 ! ! ==================== 383 410 ! ! ORCA configuration : global domain … … 559 586 CALL ctl_stop( 'Choose a correct value of nn_hdmp or put ln_tradmp to FALSE' ) 560 587 ENDIF 588 #endif 561 589 562 590 ! !--------------------------------! … … 566 594 IF( cdtype == 'TRA' ) cfile = 'damping.coeff' 567 595 IF( cdtype == 'TRC' ) cfile = 'damping.coeff.trc' 596 IF( cdtype == 'DYN' ) cfile = 'damping.coeff.dyn' 568 597 cfile = TRIM( cfile ) 569 598 CALL iom_open ( cfile, inum0, ldwrt = .TRUE., kiolib = jprstlib )
Note: See TracChangeset
for help on using the changeset viewer.