1 | MODULE ldftra_oce |
---|
2 | !!===================================================================== |
---|
3 | !! *** MODULE ldftra_oce *** |
---|
4 | !! Ocean physics : lateral tracer mixing coefficient defined in memory |
---|
5 | !!===================================================================== |
---|
6 | !! History : 9.0 ! 2002-11 (G. Madec) Original code |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | USE par_oce ! ocean parameters |
---|
9 | USE in_out_manager ! I/O manager |
---|
10 | USE lib_mpp ! MPP library |
---|
11 | |
---|
12 | IMPLICIT NONE |
---|
13 | PRIVATE |
---|
14 | |
---|
15 | PUBLIC ldftra_oce_alloc ! called by nemo_init->nemo_alloc, nemogcm.F90 |
---|
16 | |
---|
17 | !!---------------------------------------------------------------------- |
---|
18 | !! Lateral eddy diffusivity coefficients (tracers) |
---|
19 | !!---------------------------------------------------------------------- |
---|
20 | ! !!* Namelist namtra_ldf : lateral mixing * |
---|
21 | LOGICAL , PUBLIC :: ln_traldf_lap !: laplacian operator |
---|
22 | LOGICAL , PUBLIC :: ln_traldf_bilap !: bilaplacian operator |
---|
23 | LOGICAL , PUBLIC :: ln_traldf_level !: iso-level direction |
---|
24 | LOGICAL , PUBLIC :: ln_traldf_hor !: horizontal (geopotential) direction |
---|
25 | LOGICAL , PUBLIC :: ln_traldf_iso !: iso-neutral direction |
---|
26 | LOGICAL , PUBLIC :: ln_traldf_grif !: griffies skew flux |
---|
27 | LOGICAL , PUBLIC :: ln_traldf_gdia !: griffies skew flux streamfunction diagnostics |
---|
28 | REAL(wp), PUBLIC :: rn_aht_0 !: lateral eddy diffusivity (m2/s) |
---|
29 | REAL(wp), PUBLIC :: rn_ahtb_0 !: lateral background eddy diffusivity (m2/s) |
---|
30 | REAL(wp), PUBLIC :: rn_aeiv_0 !: eddy induced velocity coefficient (m2/s) |
---|
31 | REAL(wp), PUBLIC :: rn_slpmax !: slope limit |
---|
32 | REAL(wp), PUBLIC :: rn_chsmag !: multiplicative factor in Smagorinsky diffusivity |
---|
33 | REAL(wp), PUBLIC :: rn_smsh !: Smagorinsky diffusivity: = 0 - use only sheer |
---|
34 | REAL(wp), PUBLIC :: rn_aht_m !: upper limit or stability criteria for lateral eddy diffusivity (m2/s) |
---|
35 | |
---|
36 | REAL(wp), PUBLIC :: aht0, ahtb0, aeiv0 !!: OLD namelist names |
---|
37 | |
---|
38 | LOGICAL , PUBLIC :: ln_triad_iso !: calculate triads twice |
---|
39 | LOGICAL , PUBLIC :: ln_botmix_grif !: mixing on bottom |
---|
40 | LOGICAL , PUBLIC :: l_grad_zps = .FALSE. !: special treatment for Horz Tgradients w partial steps |
---|
41 | |
---|
42 | REAL(wp), PUBLIC :: rldf !: multiplicative factor of diffusive coefficient |
---|
43 | !: Needed to define the ratio between passive and active tracer diffusion coef. |
---|
44 | |
---|
45 | #if defined key_traldf_c3d |
---|
46 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 3D coefficients ** at T-,U-,V-,W-points |
---|
47 | #elif defined key_traldf_c2d |
---|
48 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ahtt, ahtu, ahtv, ahtw !: ** 2D coefficients ** at T-,U-,V-,W-points |
---|
49 | #elif defined key_traldf_c1d |
---|
50 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ahtt, ahtu, ahtv, ahtw !: ** 1D coefficients ** at T-,U-,V-,W-points |
---|
51 | #else |
---|
52 | REAL(wp), PUBLIC :: ahtt, ahtu, ahtv, ahtw !: ** 0D coefficients ** at T-,U-,V-,W-points |
---|
53 | #endif |
---|
54 | |
---|
55 | #if defined key_traldf_eiv |
---|
56 | !!---------------------------------------------------------------------- |
---|
57 | !! 'key_traldf_eiv' eddy induced velocity |
---|
58 | !!---------------------------------------------------------------------- |
---|
59 | LOGICAL, PUBLIC, PARAMETER :: lk_traldf_eiv = .TRUE. !: eddy induced velocity flag |
---|
60 | |
---|
61 | ! !!! eddy coefficients at U-, V-, W-points [m2/s] |
---|
62 | # if defined key_traldf_c3d |
---|
63 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aeiu , aeiv , aeiw !: ** 3D coefficients ** |
---|
64 | # elif defined key_traldf_c2d |
---|
65 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: aeiu , aeiv , aeiw !: ** 2D coefficients ** |
---|
66 | # elif defined key_traldf_c1d |
---|
67 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: aeiu , aeiv , aeiw !: ** 1D coefficients ** |
---|
68 | # else |
---|
69 | REAL(wp), PUBLIC :: aeiu , aeiv , aeiw !: ** 0D coefficients ** |
---|
70 | # endif |
---|
71 | # if defined key_diaeiv |
---|
72 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: u_eiv, v_eiv, w_eiv !: eddy induced velocity [m/s] |
---|
73 | # endif |
---|
74 | |
---|
75 | #else |
---|
76 | !!---------------------------------------------------------------------- |
---|
77 | !! Default option : NO eddy induced velocity |
---|
78 | !!---------------------------------------------------------------------- |
---|
79 | LOGICAL , PUBLIC, PARAMETER :: lk_traldf_eiv = .FALSE. !: eddy induced velocity flag |
---|
80 | REAL(wp), PUBLIC :: aeiu, aeiv, aeiw !: eddy induced coef. (not used) |
---|
81 | #endif |
---|
82 | |
---|
83 | !!---------------------------------------------------------------------- |
---|
84 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
85 | !! $Id$ |
---|
86 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
87 | !!---------------------------------------------------------------------- |
---|
88 | CONTAINS |
---|
89 | |
---|
90 | INTEGER FUNCTION ldftra_oce_alloc() |
---|
91 | !!---------------------------------------------------------------------- |
---|
92 | !! *** FUNCTION ldftra_oce_alloc *** |
---|
93 | !!---------------------------------------------------------------------- |
---|
94 | INTEGER, DIMENSION(3) :: ierr |
---|
95 | !!---------------------------------------------------------------------- |
---|
96 | ierr(:) = 0 |
---|
97 | |
---|
98 | #if defined key_traldf_c3d |
---|
99 | ALLOCATE( ahtt(jpi,jpj,jpk) , ahtu(jpi,jpj,jpk) , ahtv(jpi,jpj,jpk) , ahtw(jpi,jpj,jpk) , STAT=ierr(1) ) |
---|
100 | #elif defined key_traldf_c2d |
---|
101 | ALLOCATE( ahtt(jpi,jpj ) , ahtu(jpi,jpj ) , ahtv(jpi,jpj ) , ahtw(jpi,jpj ) , STAT=ierr(1) ) |
---|
102 | #elif defined key_traldf_c1d |
---|
103 | ALLOCATE( ahtt( jpk) , ahtu( jpk) , ahtv( jpk) , ahtw( jpk) , STAT=ierr(1) ) |
---|
104 | #endif |
---|
105 | ! |
---|
106 | #if defined key_traldf_eiv |
---|
107 | # if defined key_traldf_c3d |
---|
108 | ALLOCATE( aeiu(jpi,jpj,jpk) , aeiv(jpi,jpj,jpk) , aeiw(jpi,jpj,jpk) , STAT=ierr(2) ) |
---|
109 | # elif defined key_traldf_c2d |
---|
110 | ALLOCATE( aeiu(jpi,jpj ) , aeiv(jpi,jpj ) , aeiw(jpi,jpj ) , STAT=ierr(2) ) |
---|
111 | # elif defined key_traldf_c1d |
---|
112 | ALLOCATE( aeiu( jpk) , aeiv( jpk) , aeiw( jpk) , STAT=ierr(2) ) |
---|
113 | # endif |
---|
114 | # if defined key_diaeiv |
---|
115 | ALLOCATE( u_eiv(jpi,jpj,jpk), v_eiv(jpi,jpj,jpk), w_eiv(jpi,jpj,jpk), STAT=ierr(3)) |
---|
116 | # endif |
---|
117 | #endif |
---|
118 | ldftra_oce_alloc = MAXVAL( ierr ) |
---|
119 | IF( ldftra_oce_alloc /= 0 ) CALL ctl_warn('ldftra_oce_alloc: failed to allocate arrays') |
---|
120 | ! |
---|
121 | END FUNCTION ldftra_oce_alloc |
---|
122 | |
---|
123 | !!===================================================================== |
---|
124 | END MODULE ldftra_oce |
---|