[3] | 1 | !!---------------------------------------------------------------------- |
---|
| 2 | !! *** ldftra_c1d.h90 *** |
---|
| 3 | !!---------------------------------------------------------------------- |
---|
| 4 | |
---|
| 5 | !!---------------------------------------------------------------------- |
---|
| 6 | !! OPA 9.0 , LODYC-IPSL (2003) |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | |
---|
| 9 | SUBROUTINE ldf_tra_c1d( ld_print ) |
---|
| 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! *** ROUTINE ldftra_c1d *** |
---|
| 12 | !! |
---|
| 13 | !! ** Purpose : 1D eddy diffusivity coefficient |
---|
| 14 | !! |
---|
| 15 | !! ** Method : 1D eddy diffusivity coefficients ( depth ) |
---|
| 16 | !! biharmonic operator : ahtt = defined at T-level |
---|
| 17 | !! ahtu,ahtv,ahtw never used |
---|
| 18 | !! |
---|
| 19 | !! harmonic operator : ahtt never used |
---|
| 20 | !! -1- iso-model level: ahtu = ahtv defined at T-level |
---|
| 21 | !! ahtw never used |
---|
| 22 | !! -2- isopycnal or : ahtu = ahtv defined at T-level |
---|
| 23 | !! geopotential ahtw defined at w-level |
---|
| 24 | !! |
---|
| 25 | !! eddy induced velocity |
---|
| 26 | !! always harmonic : aeiu = aeiv defined at T-level |
---|
| 27 | !! aeiw defined at w-level |
---|
| 28 | !! |
---|
| 29 | !!---------------------------------------------------------------------- |
---|
| 30 | !! * Arguments |
---|
| 31 | LOGICAL, INTENT (in) :: ld_print ! If true, print arrays in numout |
---|
| 32 | |
---|
| 33 | !! * Local variables |
---|
| 34 | INTEGER :: jk ! dummy loop indices |
---|
| 35 | REAL(wp) :: & |
---|
| 36 | zkah, zahr, za00 , za01, & ! temporary scalars |
---|
| 37 | zahf, zahs, zahtf, zahts |
---|
| 38 | !!---------------------------------------------------------------------- |
---|
| 39 | |
---|
| 40 | IF( lk_traldf_eiv ) THEN |
---|
| 41 | IF(lwp) WRITE(numout,*) |
---|
| 42 | IF(lwp) WRITE(numout,*) ' inildf : 1D eddy diffusivity and eddy induced velocity coefficients' |
---|
[144] | 43 | IF(lwp) WRITE(numout,*) ' ~~~~~~ -- ' |
---|
[3] | 44 | IF(lwp) WRITE(numout,*) |
---|
| 45 | ELSE |
---|
| 46 | IF(lwp) WRITE(numout,*) |
---|
| 47 | IF(lwp) WRITE(numout,*) ' inildf : 1D eddy diffusivity coefficient ' |
---|
| 48 | IF(lwp) WRITE(numout,*) ' ~~~~~~ -- ' |
---|
| 49 | IF(lwp) WRITE(numout,*) |
---|
| 50 | ENDIF |
---|
| 51 | |
---|
| 52 | ! initialization of the profile |
---|
| 53 | |
---|
| 54 | ! ahts, ahtf: surface and bottom values |
---|
| 55 | zahts = aht0 |
---|
| 56 | zahtf = aht0/4. |
---|
| 57 | ! zkah, zahr: depth of the inflection pt and width of inflection |
---|
| 58 | zkah = -300. |
---|
| 59 | zahr = 300. |
---|
| 60 | ! computation coefficients |
---|
| 61 | za00 = TANH( ( -fsdept(1,1,1 ) - zkah ) / zahr ) |
---|
| 62 | za01 = TANH( ( -fsdept(1,1,jpk) - zkah ) / zahr ) |
---|
| 63 | zahf = ( zahts-zahtf ) / ( za00 - za01 ) |
---|
| 64 | zahs = zahts - zahf * za00 |
---|
| 65 | |
---|
| 66 | ! biharmonic operator : (T-point) |
---|
| 67 | ! ==================== |
---|
| 68 | |
---|
| 69 | ! set ahtt at T-level |
---|
| 70 | DO jk = 1, jpk |
---|
| 71 | ahtt(jk) = zahs + zahf * TANH( (-fsdept(1,1,jk)-zkah) / zahr ) |
---|
| 72 | END DO |
---|
| 73 | |
---|
| 74 | ! control print |
---|
| 75 | IF(lwp .AND. ld_print ) THEN |
---|
| 76 | WRITE(numout,*) |
---|
| 77 | WRITE(numout,*) ' aht profile at T-level : ' |
---|
| 78 | WRITE(numout,*) |
---|
[144] | 79 | WRITE(numout,*) ' level aht depth t-level ' |
---|
[3] | 80 | DO jk = 1, jpk |
---|
| 81 | WRITE(numout,'(i6,2f12.4)') jk, ahtt(jk), fsdept(1,1,jk) |
---|
| 82 | END DO |
---|
| 83 | ENDIF |
---|
| 84 | |
---|
| 85 | ! harmonic operator : (U-, V-, W-points) |
---|
| 86 | ! ================== |
---|
| 87 | |
---|
| 88 | ! set ahtu = ahtv at T-level, and ahtw at w-level |
---|
| 89 | DO jk = 1, jpk |
---|
| 90 | ahtu(jk) = zahs + zahf * TANH( ( -fsdept(1,1,jk) - zkah ) / zahr ) |
---|
| 91 | ahtv(jk) = ahtu(jk) |
---|
| 92 | ahtw(jk) = zahs + zahf * TANH( ( -fsdepw(1,1,jk) - zkah ) / zahr ) |
---|
| 93 | END DO |
---|
| 94 | |
---|
| 95 | ! control print |
---|
| 96 | IF(lwp .AND. ld_print ) THEN |
---|
| 97 | IF(lwp) WRITE(numout,*) |
---|
| 98 | IF(lwp) WRITE(numout,*) ' aht profile at T-level : ' |
---|
| 99 | IF(lwp) WRITE(numout,*) |
---|
| 100 | IF(lwp) WRITE(numout,*) ' level aht depth t-level ' |
---|
| 101 | DO jk = 1, jpk |
---|
| 102 | IF(lwp) WRITE(numout,"(i6,2f12.4)") jk, ahtu(jk), fsdept(1,1,jk) |
---|
| 103 | END DO |
---|
| 104 | IF(lwp) WRITE(numout,*) |
---|
| 105 | IF(lwp) WRITE(numout,*) ' aht profile at W-level : ' |
---|
| 106 | IF(lwp) WRITE(numout,*) |
---|
| 107 | IF(lwp) WRITE(numout,*) ' jk aht depth w-level ' |
---|
| 108 | DO jk = 1, jpk |
---|
| 109 | IF(lwp)WRITE(numout,"(i6,2f12.4)") jk, ahtw(jk), fsdepw(1,1,jk) |
---|
| 110 | END DO |
---|
| 111 | ENDIF |
---|
| 112 | |
---|
| 113 | # if defined key_traldf_eiv |
---|
| 114 | ! set aeiu = aeiv and set aeiw (here same profile as on aht) |
---|
| 115 | aeiu(:) = ahtu(:) |
---|
| 116 | aeiv(:) = aeiu(:) |
---|
| 117 | aeiw(:) = ahtw(:) |
---|
| 118 | |
---|
| 119 | ! Control print |
---|
| 120 | IF(lwp .AND. ld_print ) THEN |
---|
| 121 | IF(lwp) WRITE(numout,*) |
---|
| 122 | IF(lwp) WRITE(numout,*) ' aeiv profile at T-level : ' |
---|
| 123 | IF(lwp) WRITE(numout,*) |
---|
| 124 | IF(lwp) WRITE(numout,*) ' jk aeiv depth t-level ' |
---|
| 125 | DO jk = 1, jpk |
---|
| 126 | IF(lwp) WRITE(numout,"(i6,2f12.4)") jk, aeiu(jk), fsdept(1,1,jk) |
---|
| 127 | END DO |
---|
| 128 | ENDIF |
---|
| 129 | #endif |
---|
| 130 | |
---|
| 131 | END SUBROUTINE ldf_tra_c1d |
---|