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 6043 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90 – NEMO

Ignore:
Timestamp:
2015-12-14T10:27:28+01:00 (8 years ago)
Author:
timgraham
Message:

Merged head of trunk into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r5600 r6043  
    1818   USE zdf_oce         ! ocean vertical physics variables 
    1919   USE sbc_oce         ! surface boundary condition: ocean 
    20    USE dynspg_oce 
     20   ! 
     21   USE ldftra          ! lateral diffusion: eddy diffusivity 
     22   USE ldfslp          ! lateral diffusion: iso-neutral slope  
    2123   USE trazdf_exp      ! vertical diffusion: explicit (tra_zdf_exp     routine) 
    2224   USE trazdf_imp      ! vertical diffusion: implicit (tra_zdf_imp     routine) 
    23    USE ldftra_oce      ! ocean active tracers: lateral physics 
     25   ! 
    2426   USE trd_oce         ! trends: ocean variables 
    2527   USE trdtra          ! trends manager: tracers  
     
    4547#  include "vectopt_loop_substitute.h90" 
    4648   !!---------------------------------------------------------------------- 
    47    !! NEMO/OPA 3.7 , NEMO Consortium (2014) 
     49   !! NEMO/OPA 3.7 , NEMO Consortium (2015) 
    4850   !! $Id$ 
    4951   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    8082      CASE ( 0 )    ;    CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts )  !   explicit scheme  
    8183      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' ) 
    8984      END SELECT 
     85!!gm WHY here !   and I don't like that ! 
    9086      ! DRAKKAR SSS control { 
    9187      ! JMM avoid negative salinities near river outlet ! Ugly fix 
    9288      ! JMM : restore negative salinities to small salinities: 
    9389      WHERE ( tsa(:,:,:,jp_sal) < 0._wp )   tsa(:,:,:,jp_sal) = 0.1_wp 
     90!!gm 
    9491 
    9592      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
     
    9895            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk) 
    9996         END DO 
     97!!gm this should be moved in trdtra.F90 and done on all trends 
    10098         CALL lbc_lnk( ztrdt, 'T', 1. ) 
    10199         CALL lbc_lnk( ztrds, 'T', 1. ) 
     100!!gm 
    102101         CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdf, ztrdt ) 
    103102         CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdf, ztrds ) 
     
    123122      !!      nzdf = 0   explicit (time-splitting) scheme (ln_zdfexp=T) 
    124123      !!           = 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. 
     124      !!      NB: rotation of lateral mixing operator or TKE & GLS schemes, 
     125      !!          an implicit scheme is required. 
    127126      !!---------------------------------------------------------------------- 
    128127      USE zdftke 
    129128      USE zdfgls 
    130       USE zdfkpp 
    131129      !!---------------------------------------------------------------------- 
    132130 
     
    137135 
    138136      ! 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 
     137      IF( lk_zdftke .OR. lk_zdfgls   )   nzdf = 1   ! TKE, or GLS physics 
     138      IF( ln_traldf_iso              )   nzdf = 1   ! iso-neutral lateral physics 
     139      IF( ln_traldf_hor .AND. ln_sco )   nzdf = 1   ! horizontal lateral physics in s-coordinate 
    142140      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 
     141            &                         ' GLS or TKE scheme, the implicit scheme is required, set ln_zdfexp = .false.' ) 
    147142 
    148143      IF(lwp) THEN 
     
    150145         WRITE(numout,*) 'tra_zdf_init : vertical tracer physics scheme' 
    151146         WRITE(numout,*) '~~~~~~~~~~~' 
    152          IF( nzdf == -1 )   WRITE(numout,*) '              ESOPA test All scheme used' 
    153147         IF( nzdf ==  0 )   WRITE(numout,*) '              Explicit time-splitting scheme' 
    154148         IF( nzdf ==  1 )   WRITE(numout,*) '              Implicit (euler backward) scheme' 
Note: See TracChangeset for help on using the changeset viewer.