| 82 | |
| 83 | = Jointly agreed plan (after preview) = |
| 84 | |
| 85 | == Description == |
| 86 | This task reimplements a spatially varying eddy viscosity coefficient proportional |
| 87 | to the local deformation rate and grid scale (Smagorinsky 1993). This reimplementation |
| 88 | takes advantage of the recently reorganised and simplified LDF modules which means the |
| 89 | scheme can be implemented as a simple alternative to the existing scheme for a space |
| 90 | and time varying coefficient (nn_aht_ijk_t=31). This will provide a much cleaner |
| 91 | implementation than the version which was removed from v3.6_STABLE and requires very |
| 92 | few additional arrays and no preprocessor keys |
| 93 | |
| 94 | == Implementation == |
| 95 | The changes will occur primarily in ldfdyn.F90. |
| 96 | |
| 97 | Firstly, in MODULE ldfdyn which will acquire the following name list additions: |
| 98 | |
| 99 | {{{ |
| 100 | !! If nn_ahm_ijk_t = 32 a time and space varying Smagorinsky viscosity |
| 101 | !! will be computed. |
| 102 | REAL(wp), PUBLIC :: rn_csmc !: Smagorinsky constant of proportionality |
| 103 | REAL(wp), PUBLIC :: rn_cfacmin !: Multiplicative factor of theorectical minimum Smagorinsky viscosity |
| 104 | REAL(wp), PUBLIC :: rn_cfacmax !: Multiplicative factor of theorectical maximum Smagorinsky viscosity |
| 105 | }}} |
| 106 | |
| 107 | The majority of code changes then occur in ldf_dyn where the CASE statement is extended |
| 108 | to respond to CASE 32 by setting coefficients according to the Smagorinsky scheme |
| 109 | as revisited in Griffies and Hallberg (2000). For efficiency it is useful to define |
| 110 | module-private 2D arrays to store some calculated terms: |
| 111 | |
| 112 | {{{ |
| 113 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: dtensq !: horizontal tension squared (Smagorinsky only) |
| 114 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: dshesq !: horizontal shearing strain squared (Smagorinsky only) |
| 115 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: esqt, esqf !: Square of the local gridscale (e1e2/(e1+e2))**2 |
| 116 | }}} |
| 117 | |
| 118 | The length-squared terms (L^2^) are geometric invariants that can be calculated once |
| 119 | at start (ldf_dyn_init). The horizontal tension (D,,T,,= du/dx - dv/y) is calculated at |
| 120 | T-points using the before velocities. The horizontal shearing strain (D,,S,, = du/dy + |
| 121 | dv/dx) is calculated at F-points using the same velocities. Storing the squares of |
| 122 | these terms means that computing viscosity coefficients at T & F points is merely a |
| 123 | case of combining different averages of these arrays. |
| 124 | |
| 125 | Using the relationship given by Griffies and Hallberg (2000); namely: |
| 126 | |
| 127 | {{{ |
| 128 | B_smag = A_smag * L^2 / 8 |
| 129 | }}} |
| 130 | |
| 131 | means that the biharmonic coefficients (if required) can be computed from a simple |
| 132 | scaling of the harmonic values. Note that the new implementation of the biharmonic |
| 133 | operator as a re-rentrant laplacian means that the square root of the biharmonic |
| 134 | coefficient should be returned by this routine. |
| 135 | |
| 136 | |
| 137 | == Reference manual == |
| 138 | |
| 139 | The description of the Smagorinsky scheme in the current reference will be altered to |
| 140 | reflect the new method of activation. At this stage there are no plans to implement the |
| 141 | additional experimental options in the previous implementation (i.e. the ability to |
| 142 | control the contribution of the sheer term with an additional name list parameter and |
| 143 | the option to apply a Smagorinsky type criterion to a space a time varying diffusion |
| 144 | coefficient. |
| 145 | |
| 146 | Details of the new implementation will be added and will include both the continuous |
| 147 | and discrete forms of the operators used. |
| 148 | |
| 149 | '''Griffies, S., M., and W. Hallberg, R''' , Biharmonic friction with a Smagorinsky-like |
| 150 | viscosity for use in large-scale eddy-permitting ocean models, Mon. Wea. Rev., 128(8), |
| 151 | 2935-2946, 2000. |