[3] | 1 | !!---------------------------------------------------------------------- |
---|
| 2 | !! *** ldftra_c2d.h90 *** |
---|
| 3 | !!---------------------------------------------------------------------- |
---|
| 4 | |
---|
| 5 | !!---------------------------------------------------------------------- |
---|
[2528] | 6 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
[5966] | 7 | !! $Id$ |
---|
[2528] | 8 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[3] | 9 | !!---------------------------------------------------------------------- |
---|
| 10 | |
---|
| 11 | SUBROUTINE ldf_tra_c2d( ld_print ) |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | !! *** ROUTINE ldftra_c2d *** |
---|
| 14 | !! |
---|
| 15 | !! ** Purpose : initializations of horizontally non uniform eddy |
---|
| 16 | !! diffusivity coefficients |
---|
| 17 | !! |
---|
| 18 | !! ** Method : |
---|
| 19 | !! biharmonic operator : ahtt = defined at T-level |
---|
| 20 | !! ahtu,ahtv,ahtw never used |
---|
| 21 | !! harmonic operator (ahtt never used) |
---|
| 22 | !! iso-model level : ahtu, ahtv defined at u-, v-points |
---|
| 23 | !! isopycnal : ahtu, ahtv, ahtw defined at u-, v-, w-pts |
---|
| 24 | !! or geopotential |
---|
| 25 | !! eddy induced velocity |
---|
| 26 | !! always harmonic : aeiu, aeiv, aeiw defined at u-, v-, w-pts |
---|
| 27 | !!---------------------------------------------------------------------- |
---|
[2715] | 28 | LOGICAL, INTENT (in) :: ld_print ! If true, print arrays in numout |
---|
| 29 | ! |
---|
| 30 | INTEGER :: ji, jj ! dummy loop indices |
---|
[901] | 31 | REAL(wp) :: za00, zd_max, zeumax, zevmax, zetmax |
---|
[3] | 32 | !!---------------------------------------------------------------------- |
---|
| 33 | |
---|
| 34 | IF( lk_traldf_eiv ) THEN |
---|
| 35 | IF(lwp) WRITE(numout,*) |
---|
[461] | 36 | IF(lwp) WRITE(numout,*) ' ldf_tra_c2d : 2D eddy diffusivity and eddy' |
---|
| 37 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~ -- induced velocity coefficients' |
---|
[3] | 38 | ELSE |
---|
| 39 | IF(lwp) WRITE(numout,*) |
---|
[461] | 40 | IF(lwp) WRITE(numout,*) ' ldf_tra2d : 2D eddy diffusivity coefficient' |
---|
| 41 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~ --' |
---|
[3] | 42 | ENDIF |
---|
| 43 | |
---|
[901] | 44 | zd_max = MAX( MAXVAL( e1t(:,:) ), MAXVAL( e2t(:,:) ) ) |
---|
| 45 | IF( lk_mpp ) CALL mpp_max( zd_max ) ! max over the global domain |
---|
[461] | 46 | |
---|
[117] | 47 | ! harmonic operator : (U-, V-, W-points) |
---|
| 48 | ! ================== |
---|
| 49 | IF( ln_traldf_lap ) THEN |
---|
[2715] | 50 | ! |
---|
[901] | 51 | za00 = aht0 / zd_max |
---|
[2715] | 52 | ! |
---|
[901] | 53 | DO jj = 1, jpj |
---|
| 54 | DO ji = 1, jpi |
---|
| 55 | zeumax = MAX( e1u(ji,jj), e2u(ji,jj) ) |
---|
| 56 | zevmax = MAX( e1v(ji,jj), e2v(ji,jj) ) |
---|
| 57 | zetmax = MAX( e1t(ji,jj), e2t(ji,jj) ) |
---|
| 58 | ahtu(ji,jj) = za00 * zeumax ! set ahtu = ahtv at u- and v-points, |
---|
| 59 | ahtv(ji,jj) = za00 * zevmax ! and ahtw at w-point (idem T-point) |
---|
| 60 | ahtw(ji,jj) = za00 * zetmax ! |
---|
| 61 | END DO |
---|
| 62 | END DO |
---|
[3] | 63 | |
---|
[117] | 64 | CALL lbc_lnk( ahtu, 'U', 1. ) ! Lateral boundary conditions |
---|
| 65 | CALL lbc_lnk( ahtv, 'V', 1. ) ! (no change of sign) |
---|
| 66 | CALL lbc_lnk( ahtw, 'W', 1. ) |
---|
[3] | 67 | |
---|
[901] | 68 | ! Special case for ORCA R2 and R4 configurations (overwrite the value of ahtu ahtv ahtw) |
---|
| 69 | ! ============================================== |
---|
| 70 | IF( cp_cfg == "orca" .AND. ( jp_cfg == 2 .OR. jp_cfg == 4 ) ) THEN |
---|
| 71 | ahtu(:,:) = aht0 ! set ahtu = ahtv at u- and v-points, |
---|
| 72 | ahtv(:,:) = aht0 ! and ahtw at w-point |
---|
| 73 | ahtw(:,:) = aht0 ! (here : no space variation) |
---|
| 74 | IF(lwp) WRITE(numout,*) ' ORCA R2 or R4 case' |
---|
| 75 | IF(lwp) WRITE(numout,*) ' Constant values used for eddy diffusivity coefficients' |
---|
| 76 | IF(lwp) WRITE(numout,*) ' Variation lat/lon only for eddy induced velocity coefficients' |
---|
| 77 | ENDIF |
---|
| 78 | |
---|
[117] | 79 | ! Control print |
---|
| 80 | IF( lwp .AND. ld_print ) THEN |
---|
| 81 | WRITE(numout,*) |
---|
| 82 | WRITE(numout,*) 'inildf: ahtu array' |
---|
| 83 | CALL prihre( ahtu, jpi, jpj, 1, jpi, 1, & |
---|
| 84 | & 1, jpj, 1, 1.e-3, numout ) |
---|
| 85 | WRITE(numout,*) |
---|
| 86 | WRITE(numout,*) 'inildf: ahtv array' |
---|
| 87 | CALL prihre( ahtv, jpi, jpj, 1, jpi, 1, & |
---|
| 88 | & 1, jpj, 1, 1.e-3, numout ) |
---|
| 89 | WRITE(numout,*) |
---|
| 90 | WRITE(numout,*) 'inildf: ahtw array' |
---|
| 91 | CALL prihre( ahtw, jpi, jpj, 1, jpi, 1, & |
---|
| 92 | & 1, jpj, 1, 1.e-3, numout ) |
---|
| 93 | ENDIF |
---|
[3] | 94 | ENDIF |
---|
[117] | 95 | |
---|
| 96 | ! biharmonic operator : (T-point) |
---|
| 97 | ! ==================== |
---|
| 98 | IF( ln_traldf_bilap ) THEN |
---|
| 99 | ! (USER: modify ahtt following your desiderata) |
---|
| 100 | ! Here: ahm is proportional to the cube of the maximum of the gridspacing |
---|
| 101 | ! in the to horizontal direction |
---|
[3] | 102 | |
---|
[901] | 103 | zd_max = MAX( MAXVAL( e1t(:,:) ), MAXVAL( e2t(:,:) ) ) |
---|
| 104 | IF( lk_mpp ) CALL mpp_max( zd_max ) ! max over the global domain |
---|
[3] | 105 | |
---|
[901] | 106 | za00 = aht0 / ( zd_max * zd_max * zd_max ) |
---|
| 107 | DO jj = 1, jpj |
---|
| 108 | DO ji = 1, jpi |
---|
| 109 | zetmax = MAX( e1t(ji,jj), e2t(ji,jj) ) |
---|
| 110 | ahtt(ji,jj) = za00 * zetmax * zetmax * zetmax ! set ahtt at T-point |
---|
| 111 | END DO |
---|
| 112 | END DO |
---|
| 113 | |
---|
[117] | 114 | CALL lbc_lnk( ahtt, 'T', 1. ) ! Lateral boundary conditions on ( ahtt ) |
---|
[3] | 115 | |
---|
[117] | 116 | ! Control print |
---|
| 117 | IF( lwp .AND. ld_print ) THEN |
---|
| 118 | WRITE(numout,*) |
---|
| 119 | WRITE(numout,*) 'inildf: 2D ahtt array' |
---|
| 120 | CALL prihre( ahtt, jpi, jpj, 1, jpi, 1, & |
---|
| 121 | & 1, jpj, 1, 1.e-3, numout ) |
---|
| 122 | ENDIF |
---|
[3] | 123 | ENDIF |
---|
| 124 | |
---|
| 125 | # if defined key_traldf_eiv |
---|
| 126 | ! set aeiu = aeiv at u- and v-points, and aeiw at w-point (idem T-point) |
---|
| 127 | ! (here no space variation) |
---|
| 128 | aeiu(:,:) = aeiv0 |
---|
| 129 | aeiv(:,:) = aeiv0 |
---|
| 130 | aeiw(:,:) = aeiv0 |
---|
| 131 | |
---|
| 132 | IF( cp_cfg == "orca" .AND. jp_cfg == 4 ) THEN |
---|
| 133 | ! ! Cancel eiv in Gibraltar strait |
---|
| 134 | aeiu( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0 |
---|
| 135 | aeiv( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0 |
---|
| 136 | aeiw( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0 |
---|
| 137 | ! ! Cancel eiv in Mediterrannean sea |
---|
| 138 | aeiu( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0 |
---|
| 139 | aeiv( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0 |
---|
| 140 | aeiw( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0 |
---|
| 141 | ENDIF |
---|
| 142 | |
---|
| 143 | ! Lateral boundary conditions on ( aeiu, aeiv, aeiw ) |
---|
| 144 | CALL lbc_lnk( aeiu, 'U', 1. ) |
---|
| 145 | CALL lbc_lnk( aeiv, 'V', 1. ) |
---|
| 146 | CALL lbc_lnk( aeiw, 'W', 1. ) |
---|
| 147 | |
---|
| 148 | ! Control print |
---|
| 149 | IF( lwp .AND. ld_print ) THEN |
---|
| 150 | WRITE(numout,*) |
---|
| 151 | WRITE(numout,*) 'inildf: aeiu array' |
---|
| 152 | CALL prihre(aeiu,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout) |
---|
| 153 | WRITE(numout,*) |
---|
| 154 | WRITE(numout,*) 'inildf: aeiv array' |
---|
| 155 | CALL prihre(aeiv,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout) |
---|
| 156 | WRITE(numout,*) |
---|
| 157 | WRITE(numout,*) 'inildf: aeiw array' |
---|
| 158 | CALL prihre(aeiw,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout) |
---|
| 159 | ENDIF |
---|
| 160 | # endif |
---|
[2715] | 161 | ! |
---|
[3] | 162 | END SUBROUTINE ldf_tra_c2d |
---|