source: branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c1d.h90 @ 9295

Last change on this file since 9295 was 9295, checked in by jcastill, 3 years ago

Remove svn keywords

File size: 4.9 KB
Line 
1   !!----------------------------------------------------------------------
2   !!                      ***  ldftra_c1d.h90  ***
3   !!----------------------------------------------------------------------
4
5   !!----------------------------------------------------------------------
6   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
7   !! $Id$
8   !! Software governed by the CeCILL licence     (NEMOGCM/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      LOGICAL, INTENT (in) ::   ld_print   ! If true, print arrays in numout
32      !
33      INTEGER  ::   jk   ! dummy loop indices
34      REAL(wp) ::   zkah, zahr, za00 , za01    ! local scalars
35      REAL(wp) ::   zahf, zahs, zahtf, zahts   !   -      -
36      !!----------------------------------------------------------------------
37
38      IF( lk_traldf_eiv ) THEN
39         IF(lwp) WRITE(numout,*)
40         IF(lwp) WRITE(numout,*) ' ldf_tra_c1d : 1D eddy diffusivity and eddy induced velocity coefficients'
41         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~   -- '
42         IF(lwp) WRITE(numout,*)
43      ELSE
44         IF(lwp) WRITE(numout,*)
45         IF(lwp) WRITE(numout,*) ' inildf : 1D eddy diffusivity coefficient '
46         IF(lwp) WRITE(numout,*) ' ~~~~~~   -- '
47         IF(lwp) WRITE(numout,*)
48      ENDIF
49
50      ! initialization of the profile
51
52      ! ahts, ahtf: surface and bottom values
53      zahts = aht0
54      zahtf = aht0/4.
55      ! zkah, zahr: depth of the inflection pt and width of inflection
56      zkah =  -300.
57      zahr =   300.
58      ! computation coefficients
59      za00 = TANH( ( -fsdept(1,1,1  ) - zkah ) / zahr )
60      za01 = TANH( ( -fsdept(1,1,jpk) - zkah ) / zahr )
61      zahf = ( zahts-zahtf ) / ( za00 - za01 )
62      zahs = zahts - zahf * za00
63
64      ! biharmonic operator : (T-point)
65      ! ====================
66
67      ! set ahtt at T-level
68      DO jk = 1, jpk
69         ahtt(jk) = zahs + zahf * TANH( (-fsdept(1,1,jk)-zkah) / zahr )
70      END DO
71
72      ! control print
73      IF(lwp .AND. ld_print ) THEN
74         WRITE(numout,*)
75         WRITE(numout,*) '         aht profile at T-level : '
76         WRITE(numout,*)
77         WRITE(numout,*) ' level    aht          depth t-level '
78         DO jk = 1, jpk
79            WRITE(numout,'(i6,2f12.4)') jk, ahtt(jk), fsdept(1,1,jk)
80         END DO
81      ENDIF
82
83      ! harmonic operator : (U-, V-, W-points)
84      ! ==================
85
86      ! set ahtu = ahtv at T-level, and ahtw at w-level
87      DO jk = 1, jpk
88         ahtu(jk) = zahs + zahf * TANH( ( -fsdept(1,1,jk) - zkah ) / zahr )
89         ahtv(jk) = ahtu(jk)
90         ahtw(jk) = zahs + zahf * TANH( ( -fsdepw(1,1,jk) - zkah ) / zahr )
91      END DO
92
93      ! control print
94      IF(lwp .AND. ld_print ) THEN
95         IF(lwp) WRITE(numout,*)
96         IF(lwp) WRITE(numout,*) '         aht profile at T-level : '
97         IF(lwp) WRITE(numout,*)
98         IF(lwp) WRITE(numout,*) ' level    aht          depth t-level '
99         DO jk = 1, jpk
100            IF(lwp) WRITE(numout,"(i6,2f12.4)") jk, ahtu(jk), fsdept(1,1,jk)
101         END DO
102         IF(lwp) WRITE(numout,*)
103         IF(lwp) WRITE(numout,*) '         aht profile at W-level : '
104         IF(lwp) WRITE(numout,*)
105         IF(lwp) WRITE(numout,*) '  jk      aht          depth w-level '
106         DO jk = 1, jpk
107            IF(lwp)WRITE(numout,"(i6,2f12.4)") jk, ahtw(jk), fsdepw(1,1,jk)
108         END DO
109      ENDIF
110
111# if defined key_traldf_eiv
112      ! set aeiu = aeiv and set aeiw (here same profile as on aht)
113      aeiu(:) = ahtu(:)
114      aeiv(:) = aeiu(:)
115      aeiw(:) = ahtw(:)
116     
117      ! Control print
118      IF(lwp .AND. ld_print ) THEN
119         IF(lwp) WRITE(numout,*)
120         IF(lwp) WRITE(numout,*) '         aeiv profile at T-level : '
121         IF(lwp) WRITE(numout,*)
122         IF(lwp) WRITE(numout,*) '  jk      aeiv           depth t-level '
123         DO jk = 1, jpk
124            IF(lwp) WRITE(numout,"(i6,2f12.4)") jk, aeiu(jk), fsdept(1,1,jk)
125         END DO
126      ENDIF
127#endif
128      !
129   END SUBROUTINE ldf_tra_c1d
Note: See TracBrowser for help on using the repository browser.