New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ldftra_c2d.h90 in trunk/NEMO/OPA_SRC/LDF – NEMO

source: trunk/NEMO/OPA_SRC/LDF/ldftra_c2d.h90 @ 113

Last change on this file since 113 was 113, checked in by opalod, 20 years ago

CT : UPDATE072 : ahtt is proportional to the cube of the maximum of the gridspacing in the to horizontal direction as in ldfdyn_c2d.h90

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1   !!----------------------------------------------------------------------
2   !!                      ***  ldftra_c2d.h90  ***
3   !!----------------------------------------------------------------------
4
5   !!----------------------------------------------------------------------
6   !!   OPA 9.0 , LODYC-IPSL  (2003)
7   !!----------------------------------------------------------------------
8
9   SUBROUTINE ldf_tra_c2d( ld_print )
10      !!----------------------------------------------------------------------
11      !!                  ***  ROUTINE ldftra_c2d  ***
12      !!             
13      !! ** Purpose :   initializations of horizontally non uniform eddy
14      !!      diffusivity coefficients
15      !!
16      !! ** Method :
17      !!       biharmonic operator    : ahtt = defined at T-level
18      !!                                ahtu,ahtv,ahtw never used
19      !!       harmonic operator (ahtt never used)
20      !!           iso-model level   : ahtu, ahtv defined at u-, v-points
21      !!         isopycnal         : ahtu, ahtv, ahtw defined at u-, v-, w-pts
22      !!         or geopotential   
23      !!       eddy induced velocity
24      !!           always harmonic   : aeiu, aeiv, aeiw defined at u-, v-, w-pts
25      !!
26      !!----------------------------------------------------------------------
27      !! * Arguments
28      LOGICAL, INTENT (in) :: ld_print   ! If true, print arrays in numout
29
30      !! * Local variables
31# if defined key_traldf_eiv && defined key_orca_r4
32      INTEGER ::   ji, jj                  ! dummy loop indices
33# endif
34# if defined key_orca_r4
35      INTEGER :: i1, i2, j1, j2
36# endif
37      REAL(wp) ::   za00, zdx_max
38     
39      !!----------------------------------------------------------------------
40
41      IF( lk_traldf_eiv ) THEN
42         IF(lwp) WRITE(numout,*)
43         IF(lwp) WRITE(numout,*) ' inildf : 2D eddy diffusivity and eddy'
44         IF(lwp) WRITE(numout,*) ' ~~~~~~   --  induced velocity coefficients'
45         IF(lwp) WRITE(numout,*)
46      ELSE
47         IF(lwp) WRITE(numout,*)
48         IF(lwp) WRITE(numout,*) ' inildf : 2D eddy diffusivity coefficient'
49         IF(lwp) WRITE(numout,*) ' ~~~~~~   --'
50         IF(lwp) WRITE(numout,*)
51      ENDIF
52
53      zdx_max = MAXVAL( e1t(:,:) )
54      IF( lk_mpp )   CALL mpp_max( zdx_max )   ! max over the global domain
55     
56      ! biharmonic operator : (T-point)
57      ! ====================
58      ! Here: ahtt is proportional to the cube of the maximum of the gridspacing
59      !       in the to horizontal direction
60     
61      za00 = aht0 / ( zdx_max * zdx_max * zdx_max )
62
63      ahtt(:,:) = za00 * e1t(:,:) * e1t(:,:) *e1t(:,:)      ! set ahtt at T-point
64
65      CALL lbc_lnk( ahtt, 'T', 1. )   ! Lateral boundary conditions on ( ahtt )
66
67      ! Control print
68      IF( lwp .AND. ld_print ) THEN
69         WRITE(numout,*)
70         WRITE(numout,*) 'inildf: 2D ahtt array'
71         CALL prihre( ahtt, jpi, jpj, 1, jpi, 1,   &
72            &                         1, jpj, 1, 1.e-3, numout )
73      ENDIF
74
75
76      ! harmonic operator : (U-, V-, W-points)
77      ! ==================
78
79      za00 = aht0 / zdx_max
80
81      ahtu(:,:) = za00 * e1u(:,:)               ! set ahtu = ahtv at u- and v-points,
82      ahtv(:,:) = za00 * e1f(:,:)               ! and ahtw at w-point (idem T-point)
83      ahtw(:,:) = za00 * e1t(:,:)               !
84
85      CALL lbc_lnk( ahtu, 'U', 1. )   ! Lateral boundary conditions
86      CALL lbc_lnk( ahtv, 'V', 1. )   ! (no change of sign)
87      CALL lbc_lnk( ahtw, 'W', 1. )
88
89      ! Control print
90      IF( lwp .AND. ld_print ) THEN
91         WRITE(numout,*)
92         WRITE(numout,*) 'inildf: ahtu array'
93         CALL prihre( ahtu, jpi, jpj, 1, jpi, 1,   &
94            &                         1, jpj, 1, 1.e-3, numout )
95         WRITE(numout,*)
96         WRITE(numout,*) 'inildf: ahtv array'
97         CALL prihre( ahtv, jpi, jpj, 1, jpi, 1,   &
98            &                         1, jpj, 1, 1.e-3, numout )
99         WRITE(numout,*)
100         WRITE(numout,*) 'inildf: ahtw array'
101         CALL prihre( ahtw, jpi, jpj, 1, jpi, 1,   &
102            &                         1, jpj, 1, 1.e-3, numout )
103      ENDIF
104
105# if defined key_traldf_eiv
106      ! set aeiu = aeiv at u- and v-points, and aeiw at w-point (idem T-point)
107      ! (here no space variation)
108      aeiu(:,:) = aeiv0
109      aeiv(:,:) = aeiv0
110      aeiw(:,:) = aeiv0
111     
112      IF( cp_cfg == "orca" .AND. jp_cfg == 4 ) THEN
113         !                                 ! Cancel eiv in Gibraltar strait
114         aeiu( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0
115         aeiv( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0
116         aeiw( mi0(68):mi1(71) , mj0(50):mj1(53) ) = 0.e0
117         !                                 ! Cancel eiv in Mediterrannean sea
118         aeiu( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0
119         aeiv( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0
120         aeiw( mi0(70):mi1(90) , mj0(49):mj1(56) ) = 0.e0
121      ENDIF
122
123      ! Lateral boundary conditions on ( aeiu, aeiv, aeiw )
124      CALL lbc_lnk( aeiu, 'U', 1. )
125      CALL lbc_lnk( aeiv, 'V', 1. )
126      CALL lbc_lnk( aeiw, 'W', 1. )
127
128      ! Control print
129      IF( lwp .AND. ld_print ) THEN
130         WRITE(numout,*)
131         WRITE(numout,*) 'inildf: aeiu array'
132         CALL prihre(aeiu,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
133         WRITE(numout,*)
134         WRITE(numout,*) 'inildf: aeiv array'
135         CALL prihre(aeiv,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
136         WRITE(numout,*)
137         WRITE(numout,*) 'inildf: aeiw array'
138         CALL prihre(aeiw,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
139      ENDIF
140
141# endif
142
143   END SUBROUTINE ldf_tra_c2d
Note: See TracBrowser for help on using the repository browser.