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 5758 for branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90 – NEMO

Ignore:
Timestamp:
2015-09-24T08:31:40+02:00 (9 years ago)
Author:
gm
Message:

#1593: LDF-ADV, step II.1: phasing the improvements/simplifications of diffusive trend (see wiki)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r5385 r5758  
    1919   USE sbc_oce         ! surface boundary condition: ocean 
    2020   USE dynspg_oce 
     21   ! 
     22   USE ldftra          ! lateral diffusion: eddy diffusivity 
     23   USE ldfslp          ! lateral diffusion: iso-neutral slope  
    2124   USE trazdf_exp      ! vertical diffusion: explicit (tra_zdf_exp     routine) 
    2225   USE trazdf_imp      ! vertical diffusion: implicit (tra_zdf_imp     routine) 
    23    USE ldftra_oce      ! ocean active tracers: lateral physics 
     26   ! 
    2427   USE trd_oce         ! trends: ocean variables 
    2528   USE trdtra          ! trends manager: tracers  
     
    4548#  include "vectopt_loop_substitute.h90" 
    4649   !!---------------------------------------------------------------------- 
    47    !! NEMO/OPA 3.7 , NEMO Consortium (2014) 
     50   !! NEMO/OPA 3.7 , NEMO Consortium (2015) 
    4851   !! $Id$ 
    4952   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    8891         &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    8992      END SELECT 
     93!!gm WHY here !   and I don't like that ! 
    9094      ! DRAKKAR SSS control { 
    9195      ! JMM avoid negative salinities near river outlet ! Ugly fix 
    9296      ! JMM : restore negative salinities to small salinities: 
    9397      WHERE ( tsa(:,:,:,jp_sal) < 0._wp )   tsa(:,:,:,jp_sal) = 0.1_wp 
     98!!gm 
    9499 
    95100      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
     
    98103            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk) 
    99104         END DO 
     105!!gm this should be moved in trdtra.F90 and done on all trends 
    100106         CALL lbc_lnk( ztrdt, 'T', 1. ) 
    101107         CALL lbc_lnk( ztrds, 'T', 1. ) 
     108!!gm 
    102109         CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdf, ztrdt ) 
    103110         CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdf, ztrds ) 
     
    123130      !!      nzdf = 0   explicit (time-splitting) scheme (ln_zdfexp=T) 
    124131      !!           = 1   implicit (euler backward) scheme (ln_zdfexp=F) 
    125       !!      NB: rotation of lateral mixing operator or TKE or KPP scheme, 
    126       !!      the implicit scheme is required. 
     132      !!      NB: rotation of lateral mixing operator or TKE & GLS schemes, 
     133      !!          an implicit scheme is required. 
    127134      !!---------------------------------------------------------------------- 
    128135      USE zdftke 
    129136      USE zdfgls 
    130       USE zdfkpp 
    131137      !!---------------------------------------------------------------------- 
    132138 
     
    137143 
    138144      ! Force implicit schemes 
    139       IF( lk_zdftke .OR. lk_zdfgls .OR. lk_zdfkpp )   nzdf = 1      ! TKE, GLS or KPP physics 
    140       IF( ln_traldf_iso                           )   nzdf = 1      ! iso-neutral lateral physics 
    141       IF( ln_traldf_hor .AND. ln_sco              )   nzdf = 1      ! horizontal lateral physics in s-coordinate 
     145      IF( lk_zdftke .OR. lk_zdfgls   )   nzdf = 1   ! TKE, or GLS physics 
     146      IF( ln_traldf_iso              )   nzdf = 1   ! iso-neutral lateral physics 
     147      IF( ln_traldf_hor .AND. ln_sco )   nzdf = 1   ! horizontal lateral physics in s-coordinate 
    142148      IF( ln_zdfexp .AND. nzdf == 1 )   CALL ctl_stop( 'tra_zdf : If using the rotation of lateral mixing operator',   & 
    143             &                         ' TKE or KPP scheme, the implicit scheme is required, set ln_zdfexp = .false.' ) 
     149            &                         ' GLS or TKE scheme, the implicit scheme is required, set ln_zdfexp = .false.' ) 
    144150 
    145151      ! Test: esopa 
Note: See TracChangeset for help on using the changeset viewer.