[3] | 1 | MODULE dynldf_lap |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE dynldf_lap *** |
---|
| 4 | !! Ocean dynamics: lateral viscosity trend |
---|
| 5 | !!====================================================================== |
---|
[2715] | 6 | !! History : OPA ! 1990-09 (G. Madec) Original code |
---|
| 7 | !! 4.0 ! 1991-11 (G. Madec) |
---|
| 8 | !! 6.0 ! 1996-01 (G. Madec) statement function for e3 and ahm |
---|
| 9 | !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module |
---|
| 10 | !! - ! 2004-08 (C. Talandier) New trends organization |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
[3] | 12 | |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | !! dyn_ldf_lap : update the momentum trend with the lateral diffusion |
---|
| 15 | !! using an iso-level harmonic operator |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
| 17 | USE oce ! ocean dynamics and tracers |
---|
| 18 | USE dom_oce ! ocean space and time domain |
---|
| 19 | USE ldfdyn_oce ! ocean dynamics: lateral physics |
---|
| 20 | USE zdf_oce ! ocean vertical physics |
---|
[5965] | 21 | ! |
---|
[3] | 22 | USE in_out_manager ! I/O manager |
---|
[3294] | 23 | USE timing ! Timing |
---|
[3] | 24 | |
---|
| 25 | IMPLICIT NONE |
---|
| 26 | PRIVATE |
---|
| 27 | |
---|
| 28 | PUBLIC dyn_ldf_lap ! called by step.F90 |
---|
| 29 | |
---|
| 30 | !! * Substitutions |
---|
| 31 | # include "domzgr_substitute.h90" |
---|
| 32 | # include "ldfdyn_substitute.h90" |
---|
| 33 | # include "vectopt_loop_substitute.h90" |
---|
| 34 | !!---------------------------------------------------------------------- |
---|
[2528] | 35 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
[5966] | 36 | !! $Id$ |
---|
[2715] | 37 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[3] | 38 | !!---------------------------------------------------------------------- |
---|
| 39 | CONTAINS |
---|
| 40 | |
---|
| 41 | SUBROUTINE dyn_ldf_lap( kt ) |
---|
| 42 | !!---------------------------------------------------------------------- |
---|
| 43 | !! *** ROUTINE dyn_ldf_lap *** |
---|
| 44 | !! |
---|
| 45 | !! ** Purpose : Compute the before horizontal tracer (t & s) diffusive |
---|
| 46 | !! trend and add it to the general trend of tracer equation. |
---|
| 47 | !! |
---|
| 48 | !! ** Method : The before horizontal momentum diffusion trend is an |
---|
| 49 | !! harmonic operator (laplacian type) which separates the divergent |
---|
| 50 | !! and rotational parts of the flow. |
---|
| 51 | !! Its horizontal components are computed as follow: |
---|
| 52 | !! difu = 1/e1u di[ahmt hdivb] - 1/(e2u*e3u) dj-1[e3f ahmf rotb] |
---|
| 53 | !! difv = 1/e2v dj[ahmt hdivb] + 1/(e1v*e3v) di-1[e3f ahmf rotb] |
---|
[455] | 54 | !! in the rotational part of the diffusion. |
---|
[3] | 55 | !! Add this before trend to the general trend (ua,va): |
---|
| 56 | !! (ua,va) = (ua,va) + (diffu,diffv) |
---|
| 57 | !! |
---|
[5965] | 58 | !! ** Action : - Update (ua,va) with the iso-level harmonic mixing trend |
---|
[3] | 59 | !!---------------------------------------------------------------------- |
---|
[2715] | 60 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 61 | ! |
---|
| 62 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
| 63 | REAL(wp) :: zua, zva, ze2u, ze1v ! local scalars |
---|
[3] | 64 | !!---------------------------------------------------------------------- |
---|
[2715] | 65 | ! |
---|
[3294] | 66 | IF( nn_timing == 1 ) CALL timing_start('dyn_ldf_lap') |
---|
| 67 | ! |
---|
[3] | 68 | IF( kt == nit000 ) THEN |
---|
| 69 | IF(lwp) WRITE(numout,*) |
---|
[2528] | 70 | IF(lwp) WRITE(numout,*) 'dyn_ldf : iso-level harmonic (laplacian) operator' |
---|
[3] | 71 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
| 72 | ENDIF |
---|
| 73 | ! ! =============== |
---|
| 74 | DO jk = 1, jpkm1 ! Horizontal slab |
---|
| 75 | ! ! =============== |
---|
| 76 | DO jj = 2, jpjm1 |
---|
| 77 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
[2715] | 78 | ze2u = rotb (ji,jj,jk) * fsahmf(ji,jj,jk) * fse3f(ji,jj,jk) |
---|
| 79 | ze1v = hdivb(ji,jj,jk) * fsahmt(ji,jj,jk) |
---|
[3] | 80 | ! horizontal diffusive trends |
---|
| 81 | zua = - ( ze2u - rotb (ji,jj-1,jk)*fsahmf(ji,jj-1,jk)*fse3f(ji,jj-1,jk) ) / ( e2u(ji,jj) * fse3u(ji,jj,jk) ) & |
---|
| 82 | + ( hdivb(ji+1,jj,jk)*fsahmt(ji+1,jj,jk) - ze1v ) / e1u(ji,jj) |
---|
| 83 | |
---|
| 84 | zva = + ( ze2u - rotb (ji-1,jj,jk)*fsahmf(ji-1,jj,jk)*fse3f(ji-1,jj,jk) ) / ( e1v(ji,jj) * fse3v(ji,jj,jk) ) & |
---|
| 85 | + ( hdivb(ji,jj+1,jk)*fsahmt(ji,jj+1,jk) - ze1v ) / e2v(ji,jj) |
---|
| 86 | |
---|
| 87 | ! add it to the general momentum trends |
---|
| 88 | ua(ji,jj,jk) = ua(ji,jj,jk) + zua |
---|
| 89 | va(ji,jj,jk) = va(ji,jj,jk) + zva |
---|
| 90 | END DO |
---|
| 91 | END DO |
---|
| 92 | ! ! =============== |
---|
| 93 | END DO ! End of slab |
---|
| 94 | ! ! =============== |
---|
[3294] | 95 | IF( nn_timing == 1 ) CALL timing_stop('dyn_ldf_lap') |
---|
| 96 | ! |
---|
[3] | 97 | END SUBROUTINE dyn_ldf_lap |
---|
| 98 | |
---|
| 99 | !!====================================================================== |
---|
| 100 | END MODULE dynldf_lap |
---|