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 5901 for branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90 – NEMO

Ignore:
Timestamp:
2015-11-20T09:39:06+01:00 (8 years ago)
Author:
jamesharle
Message:

merging branch with head of the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r5620 r5901  
    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) 
     
    8083      CASE ( 0 )    ;    CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts )  !   explicit scheme  
    8184      CASE ( 1 )    ;    CALL tra_zdf_imp( kt, nit000, 'TRA', r2dtra,            tsb, tsa, jpts )  !   implicit scheme  
    82       CASE ( -1 )                                       ! esopa: test all possibility with control print 
    83          CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts ) 
    84          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf0 - Ta: ', mask1=tmask,               & 
    85          &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    86          CALL tra_zdf_imp( kt, nit000, 'TRA', r2dtra,            tsb, tsa, jpts )  
    87          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf1 - Ta: ', mask1=tmask,               & 
    88          &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    8985      END SELECT 
     86!!gm WHY here !   and I don't like that ! 
    9087      ! DRAKKAR SSS control { 
    9188      ! JMM avoid negative salinities near river outlet ! Ugly fix 
    9289      ! JMM : restore negative salinities to small salinities: 
    9390      WHERE ( tsa(:,:,:,jp_sal) < 0._wp )   tsa(:,:,:,jp_sal) = 0.1_wp 
     91!!gm 
    9492 
    9593      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
     
    9896            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk) 
    9997         END DO 
     98!!gm this should be moved in trdtra.F90 and done on all trends 
    10099         CALL lbc_lnk( ztrdt, 'T', 1. ) 
    101100         CALL lbc_lnk( ztrds, 'T', 1. ) 
     101!!gm 
    102102         CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdf, ztrdt ) 
    103103         CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdf, ztrds ) 
     
    123123      !!      nzdf = 0   explicit (time-splitting) scheme (ln_zdfexp=T) 
    124124      !!           = 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. 
     125      !!      NB: rotation of lateral mixing operator or TKE & GLS schemes, 
     126      !!          an implicit scheme is required. 
    127127      !!---------------------------------------------------------------------- 
    128128      USE zdftke 
    129129      USE zdfgls 
    130       USE zdfkpp 
    131130      !!---------------------------------------------------------------------- 
    132131 
     
    137136 
    138137      ! 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 
     138      IF( lk_zdftke .OR. lk_zdfgls   )   nzdf = 1   ! TKE, or GLS physics 
     139      IF( ln_traldf_iso              )   nzdf = 1   ! iso-neutral lateral physics 
     140      IF( ln_traldf_hor .AND. ln_sco )   nzdf = 1   ! horizontal lateral physics in s-coordinate 
    142141      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.' ) 
    144  
    145       ! Test: esopa 
    146       IF( lk_esopa )    nzdf = -1                      ! All schemes used 
     142            &                         ' GLS or TKE scheme, the implicit scheme is required, set ln_zdfexp = .false.' ) 
    147143 
    148144      IF(lwp) THEN 
     
    150146         WRITE(numout,*) 'tra_zdf_init : vertical tracer physics scheme' 
    151147         WRITE(numout,*) '~~~~~~~~~~~' 
    152          IF( nzdf == -1 )   WRITE(numout,*) '              ESOPA test All scheme used' 
    153148         IF( nzdf ==  0 )   WRITE(numout,*) '              Explicit time-splitting scheme' 
    154149         IF( nzdf ==  1 )   WRITE(numout,*) '              Implicit (euler backward) scheme' 
Note: See TracChangeset for help on using the changeset viewer.