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.
Changeset 4596 for branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90 – NEMO

Ignore:
Timestamp:
2014-03-26T12:02:30+01:00 (10 years ago)
Author:
gm
Message:

#1260: LDF simplification + bilap iso-neutral for TRA and GYRE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90

    r3294 r4596  
    1919   
    2020   !!---------------------------------------------------------------------- 
    21    !!   tra_zdf_imp : Update the tracer trend with the diagonal vertical   
    22    !!                 part of the mixing tensor. 
    23    !!---------------------------------------------------------------------- 
    24    USE oce             ! ocean dynamics and tracers variables 
    25    USE dom_oce         ! ocean space and time domain variables  
    26    USE zdf_oce         ! ocean vertical physics variables 
    27    USE trc_oce         ! share passive tracers/ocean variables 
    28    USE domvvl          ! variable volume 
    29    USE ldftra_oce      ! ocean active tracers: lateral physics 
    30    USE ldftra          ! lateral mixing type 
    31    USE ldfslp          ! lateral physics: slope of diffusion 
    32    USE zdfddm          ! ocean vertical physics: double diffusion 
    33    USE traldf_iso_grif ! active tracers: Griffies operator 
    34    USE in_out_manager  ! I/O manager 
    35    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    36    USE lib_mpp         ! MPP library 
    37    USE wrk_nemo        ! Memory Allocation 
    38    USE timing          ! Timing 
     21   !!   tra_zdf_imp : Update the tracer trend with the diagonal vertical part of the mixing tensor. 
     22   !!---------------------------------------------------------------------- 
     23   USE oce              ! ocean dynamics and tracers variables 
     24   USE dom_oce          ! ocean space and time domain variables  
     25   USE zdf_oce          ! ocean vertical physics variables 
     26   USE trc_oce          ! share passive tracers/ocean variables 
     27   USE domvvl           ! variable volume 
     28   USE ldftra           ! lateral mixing type 
     29   USE ldfslp           ! lateral physics: slope of diffusion 
     30   USE zdfddm           ! ocean vertical physics: double diffusion 
     31   USE traldf_iso_triad ! active tracers: Method of Stabilizing Correction 
     32   ! 
     33   USE in_out_manager   ! I/O manager 
     34   USE lbclnk           ! ocean lateral boundary conditions (or mpp link) 
     35   USE lib_mpp          ! MPP library 
     36   USE wrk_nemo         ! Memory Allocation 
     37   USE timing           ! Timing 
    3938 
    4039   IMPLICIT NONE 
     
    4746   !! * Substitutions 
    4847#  include "domzgr_substitute.h90" 
    49 #  include "ldftra_substitute.h90" 
    5048#  include "zdfddm_substitute.h90" 
    5149#  include "vectopt_loop_substitute.h90" 
    5250   !!---------------------------------------------------------------------- 
    53    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     51   !! NEMO/OPA 3.7 , NEMO Consortium (2010) 
    5452   !! $Id$ 
    5553   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    122120            zwt(:,:,1) = 0._wp 
    123121            ! 
    124 #if defined key_ldfslp 
    125             ! isoneutral diffusion: add the contribution  
    126             IF( ln_traldf_grif    ) THEN     ! Griffies isoneutral diff 
    127                DO jk = 2, jpkm1 
    128                   DO jj = 2, jpjm1 
    129                      DO ji = fs_2, fs_jpim1   ! vector opt. 
    130                         zwt(ji,jj,jk) = zwt(ji,jj,jk) + ah_wslp2(ji,jj,jk)        
     122            IF( l_ldfslp ) THEN            ! isoneutral diffusion: add the contribution  
     123               IF( ln_traldf_msc  ) THEN     ! MSC iso-neutral operator  
     124                  DO jk = 2, jpkm1 
     125                     DO jj = 2, jpjm1 
     126                        DO ji = fs_2, fs_jpim1   ! vector opt. 
     127                           zwt(ji,jj,jk) = zwt(ji,jj,jk) + akz(ji,jj,jk)   
     128                        END DO 
    131129                     END DO 
    132130                  END DO 
    133                END DO 
    134             ELSE IF( l_traldf_rot ) THEN     ! standard isoneutral diff 
    135                DO jk = 2, jpkm1 
    136                   DO jj = 2, jpjm1 
    137                      DO ji = fs_2, fs_jpim1   ! vector opt. 
    138                         zwt(ji,jj,jk) = zwt(ji,jj,jk) + fsahtw(ji,jj,jk)                       & 
    139                            &                          * (  wslpi(ji,jj,jk) * wslpi(ji,jj,jk)   & 
    140                            &                             + wslpj(ji,jj,jk) * wslpj(ji,jj,jk)  ) 
     131               ELSE                          ! standard or triad iso-neutral operator 
     132                  DO jk = 2, jpkm1 
     133                     DO jj = 2, jpjm1 
     134                        DO ji = fs_2, fs_jpim1   ! vector opt. 
     135                           zwt(ji,jj,jk) = zwt(ji,jj,jk) + ah_wslp2(ji,jj,jk) 
     136                        END DO 
    141137                     END DO 
    142138                  END DO 
    143                END DO 
     139               ENDIF 
    144140            ENDIF 
    145 #endif 
     141            ! 
    146142            ! Diagonal, lower (i), upper (s)  (including the bottom boundary condition since avt is masked) 
    147143            DO jk = 1, jpkm1 
Note: See TracChangeset for help on using the changeset viewer.