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