123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- !!----------------------------------------------------------------------
- !! *** ldftra_c2d.h90 ***
- !!----------------------------------------------------------------------
- !!----------------------------------------------------------------------
- !! NEMO/OPA 3.3 , NEMO Consortium (2010)
- !! $Id: ldftra_c2d.h90 4147 2013-11-04 11:51:55Z cetlod $
- !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
- !!----------------------------------------------------------------------
- SUBROUTINE ldf_tra_c2d( ld_print )
- !!----------------------------------------------------------------------
- !! *** ROUTINE ldftra_c2d ***
- !!
- !! ** Purpose : initializations of horizontally non uniform eddy
- !! diffusivity coefficients
- !!
- !! ** Method :
- !! biharmonic operator : ahtt = defined at T-level
- !! ahtu,ahtv,ahtw never used
- !! harmonic operator (ahtt never used)
- !! iso-model level : ahtu, ahtv defined at u-, v-points
- !! isopycnal : ahtu, ahtv, ahtw defined at u-, v-, w-pts
- !! or geopotential
- !! eddy induced velocity
- !! always harmonic : aeiu, aeiv, aeiw defined at u-, v-, w-pts
- !!----------------------------------------------------------------------
- LOGICAL, INTENT (in) :: ld_print ! If true, print arrays in numout
- !
- INTEGER :: ji, jj ! dummy loop indices
- REAL(wp) :: za00, zd_max, zeumax, zevmax, zetmax
- !!----------------------------------------------------------------------
- IF( lk_traldf_eiv ) THEN
- IF(lwp) WRITE(numout,*)
- IF(lwp) WRITE(numout,*) ' ldf_tra_c2d : 2D eddy diffusivity and eddy'
- IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~ -- induced velocity coefficients'
- ELSE
- IF(lwp) WRITE(numout,*)
- IF(lwp) WRITE(numout,*) ' ldf_tra2d : 2D eddy diffusivity coefficient'
- IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~ --'
- ENDIF
- zd_max = MAX( MAXVAL( e1t(:,:) ), MAXVAL( e2t(:,:) ) )
- IF( lk_mpp ) CALL mpp_max( zd_max ) ! max over the global domain
- ! harmonic operator : (U-, V-, W-points)
- ! ==================
- IF( ln_traldf_lap ) THEN
- !
- za00 = aht0 / zd_max
- !
- DO jj = 1, jpj
- DO ji = 1, jpi
- zeumax = MAX( e1u(ji,jj), e2u(ji,jj) )
- zevmax = MAX( e1v(ji,jj), e2v(ji,jj) )
- zetmax = MAX( e1t(ji,jj), e2t(ji,jj) )
- ahtu(ji,jj) = za00 * zeumax ! set ahtu = ahtv at u- and v-points,
- ahtv(ji,jj) = za00 * zevmax ! and ahtw at w-point (idem T-point)
- ahtw(ji,jj) = za00 * zetmax !
- END DO
- END DO
- CALL lbc_lnk( ahtu, 'U', 1. ) ! Lateral boundary conditions
- CALL lbc_lnk( ahtv, 'V', 1. ) ! (no change of sign)
- CALL lbc_lnk( ahtw, 'W', 1. )
- ! Special case for ORCA R2 and R4 configurations (overwrite the value of ahtu ahtv ahtw)
- ! ==============================================
- IF( cp_cfg == "orca" .AND. ( jp_cfg == 2 .OR. jp_cfg == 4 ) ) THEN
- ahtu(:,:) = aht0 ! set ahtu = ahtv at u- and v-points,
- ahtv(:,:) = aht0 ! and ahtw at w-point
- ahtw(:,:) = aht0 ! (here : no space variation)
- IF(lwp) WRITE(numout,*) ' ORCA R2 or R4 case'
- IF(lwp) WRITE(numout,*) ' Constant values used for eddy diffusivity coefficients'
- IF(lwp) WRITE(numout,*) ' Variation lat/lon only for eddy induced velocity coefficients'
- ENDIF
- ! Control print
- IF( lwp .AND. ld_print ) THEN
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: ahtu array'
- CALL prihre( ahtu, jpi, jpj, 1, jpi, 1, &
- & 1, jpj, 1, 1.e-3, numout )
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: ahtv array'
- CALL prihre( ahtv, jpi, jpj, 1, jpi, 1, &
- & 1, jpj, 1, 1.e-3, numout )
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: ahtw array'
- CALL prihre( ahtw, jpi, jpj, 1, jpi, 1, &
- & 1, jpj, 1, 1.e-3, numout )
- ENDIF
- ENDIF
-
- ! biharmonic operator : (T-point)
- ! ====================
- IF( ln_traldf_bilap ) THEN
- ! (USER: modify ahtt following your desiderata)
- ! Here: ahm is proportional to the cube of the maximum of the gridspacing
- ! in the to horizontal direction
- zd_max = MAX( MAXVAL( e1t(:,:) ), MAXVAL( e2t(:,:) ) )
- IF( lk_mpp ) CALL mpp_max( zd_max ) ! max over the global domain
- za00 = aht0 / ( zd_max * zd_max * zd_max )
- DO jj = 1, jpj
- DO ji = 1, jpi
- zetmax = MAX( e1t(ji,jj), e2t(ji,jj) )
- ahtt(ji,jj) = za00 * zetmax * zetmax * zetmax ! set ahtt at T-point
- END DO
- END DO
- CALL lbc_lnk( ahtt, 'T', 1. ) ! Lateral boundary conditions on ( ahtt )
- ! Control print
- IF( lwp .AND. ld_print ) THEN
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: 2D ahtt array'
- CALL prihre( ahtt, jpi, jpj, 1, jpi, 1, &
- & 1, jpj, 1, 1.e-3, numout )
- ENDIF
- ENDIF
- # if defined key_traldf_eiv
- ! set aeiu = aeiv at u- and v-points, and aeiw at w-point (idem T-point)
- ! (here no space variation)
- aeiu(:,:) = aeiv0
- aeiv(:,:) = aeiv0
- aeiw(:,:) = aeiv0
-
- IF( cp_cfg == "orca" .AND. jp_cfg == 4 ) THEN
- ! ! Cancel eiv in Gibraltar strait
- aeiu( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0
- aeiv( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0
- aeiw( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0
- ! ! Cancel eiv in Mediterrannean sea
- aeiu( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0
- aeiv( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0
- aeiw( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0
- ENDIF
- ! Lateral boundary conditions on ( aeiu, aeiv, aeiw )
- CALL lbc_lnk( aeiu, 'U', 1. )
- CALL lbc_lnk( aeiv, 'V', 1. )
- CALL lbc_lnk( aeiw, 'W', 1. )
- ! Control print
- IF( lwp .AND. ld_print ) THEN
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: aeiu array'
- CALL prihre(aeiu,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: aeiv array'
- CALL prihre(aeiv,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
- WRITE(numout,*)
- WRITE(numout,*) 'inildf: aeiw array'
- CALL prihre(aeiw,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
- ENDIF
- # endif
- !
- END SUBROUTINE ldf_tra_c2d
|