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/TOP_SRC/TRP/trcldf.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/TOP_SRC/TRP/trcldf.F90

    r5385 r5758  
    44   !! Ocean Passive tracers : lateral diffusive trends 
    55   !!===================================================================== 
    6    !! History :  9.0  ! 2005-11 (G. Madec)  Original code 
    7    !!       NEMO 3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA 
     6   !! History :  1.0  ! 2005-11  (G. Madec)  Original code 
     7   !!            3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA 
     8   !!            3.7  ! 2014-03  (G. Madec)  LDF simplification 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_top 
     
    1112   !!   'key_top'                                                TOP models 
    1213   !!---------------------------------------------------------------------- 
    13    !!---------------------------------------------------------------------- 
    14    !!   trc_ldf     : update the tracer trend with the lateral diffusion 
    15    !!       ldf_ctl : initialization, namelist read, and parameters control 
    16    !!---------------------------------------------------------------------- 
    17    USE oce_trc         ! ocean dynamics and active tracers 
    18    USE trc             ! ocean passive tracers variables 
    19    USE trcnam_trp      ! passive tracers transport namelist variables 
    20    USE ldftra_oce      ! lateral diffusion coefficient on tracers 
    21    USE ldfslp          ! ??? 
    22    USE traldf_bilapg   ! lateral mixing            (tra_ldf_bilapg routine) 
    23    USE traldf_bilap    ! lateral mixing            (tra_ldf_bilap routine) 
    24    USE traldf_iso      ! lateral mixing            (tra_ldf_iso routine) 
    25    USE traldf_iso_grif ! lateral mixing          (tra_ldf_iso_grif routine) 
    26    USE traldf_lap      ! lateral mixing            (tra_ldf_lap routine) 
    27    USE trd_oce 
    28    USE trdtra 
     14   !!   trc_ldf      : update the tracer trend with the lateral diffusion 
     15   !!       ldf_ctl  : initialization, namelist read, and parameters control 
     16   !!---------------------------------------------------------------------- 
     17   USE trc           ! ocean passive tracers variables 
     18   USE oce_trc       ! ocean dynamics and active tracers 
     19   USE trcnam_trp    ! passive tracers transport namelist variables 
     20   USE ldfslp        ! lateral diffusion: iso-neutral slope 
     21   USE traldf_lap    ! lateral diffusion: laplacian iso-level            operator  (tra_ldf_lap   routine) 
     22   USE traldf_iso    ! lateral diffusion: laplacian iso-neutral standard operator  (tra_ldf_iso   routine) 
     23   USE traldf_triad  ! lateral diffusion: laplacian iso-neutral triad    operator  (tra_ldf_triad routine) 
     24   USE traldf_blp    ! lateral diffusion (iso-level lap/blp)                       (tra_ldf_lap   routine) 
     25   USE trd_oce       ! trends: ocean variables 
     26   USE trdtra        ! trends manager: tracers  
     27   ! 
    2928   USE prtctl_trc      ! Print control 
    3029 
     
    3231   PRIVATE 
    3332 
    34    PUBLIC   trc_ldf    ! called by step.F90 
     33   PUBLIC   trc_ldf    ! called by trctrp.F90 
    3534   !                                                 !!: ** lateral mixing namelist (nam_trcldf) ** 
    3635   REAL(wp) ::  rldf_rat    ! ratio between active and passive tracers diffusive coefficient 
    3736   INTEGER  ::  nldf = 0   ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals) 
     37    
    3838   !! * Substitutions 
    3939#  include "domzgr_substitute.h90" 
    4040#  include "vectopt_loop_substitute.h90" 
    4141   !!---------------------------------------------------------------------- 
    42    !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     42   !! NEMO/TOP 3.7 , NEMO Consortium (2014) 
    4343   !! $Id$ 
    4444   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4545   !!---------------------------------------------------------------------- 
    46  
    4746CONTAINS 
    4847 
     
    5857      INTEGER            :: jn 
    5958      CHARACTER (len=22) :: charout 
     59      REAL(wp), POINTER, DIMENSION(:,:,:)   ::   zahu, zahv 
    6060      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd 
    6161      !!---------------------------------------------------------------------- 
     
    6363      IF( nn_timing == 1 )   CALL timing_start('trc_ldf') 
    6464      ! 
     65       
     66!!gm  this call should be put in trcini ! 
    6567      IF( kt == nittrc000 )   CALL ldf_ctl          ! initialisation & control of options 
    66  
    67       rldf = rldf_rat 
     68!!gm end 
    6869 
    6970      IF( l_trdtrc )  THEN 
    70          CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) 
     71         CALL wrk_alloc( jpi,jpj,jpk,jptra,  ztrtrd ) 
    7172         ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
    7273      ENDIF 
    7374 
    74       SELECT CASE ( nldf )                       ! compute lateral mixing trend and add it to the general trend 
    75       CASE ( 0 )   ;   CALL tra_ldf_lap   ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra        )  ! iso-level laplacian 
    76       CASE ( 1 )                                                                                            ! rotated laplacian 
    77                        IF( ln_traldf_grif ) THEN 
    78                           CALL tra_ldf_iso_grif( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
    79                        ELSE 
    80                           CALL tra_ldf_iso     ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra, rn_ahtb_0 ) 
    81                        ENDIF 
    82       CASE ( 2 )   ;   CALL tra_ldf_bilap ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra            )  ! iso-level bilaplacian 
    83       CASE ( 3 )   ;   CALL tra_ldf_bilapg( kt, nittrc000, 'TRC',             trb, tra, jptra            )  ! s-coord. horizontal bilaplacian 
    84          ! 
    85       CASE ( -1 )                                     ! esopa: test all possibility with control print 
    86          CALL tra_ldf_lap   ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra            ) 
    87          WRITE(charout, FMT="('ldf0 ')") ;  CALL prt_ctl_trc_info(charout) 
    88                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    89          IF( ln_traldf_grif ) THEN 
    90             CALL tra_ldf_iso_grif( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
    91          ELSE 
    92             CALL tra_ldf_iso     ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra, rn_ahtb_0 ) 
    93          ENDIF 
    94          WRITE(charout, FMT="('ldf1 ')") ;  CALL prt_ctl_trc_info(charout) 
    95                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    96          CALL tra_ldf_bilap ( kt, nittrc000, 'TRC', gtru, gtrv, gtrui, gtrvi, trb, tra, jptra            ) 
    97          WRITE(charout, FMT="('ldf2 ')") ;  CALL prt_ctl_trc_info(charout) 
    98                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    99          CALL tra_ldf_bilapg( kt, nittrc000, 'TRC',             trb, tra, jptra            ) 
    100          WRITE(charout, FMT="('ldf3 ')") ;  CALL prt_ctl_trc_info(charout) 
    101                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
     75      !                                        ! set the lateral diffusivity coef. for passive tracer       
     76      CALL wrk_alloc( jpi,jpj,jpk,   zahu, zahv ) 
     77      zahu(:,:,:) = rldf_rat * ahtu(:,:,:) 
     78      zahv(:,:,:) = rldf_rat * ahtv(:,:,:) 
     79 
     80      SELECT CASE ( nldf )                     !* compute lateral mixing trend and add it to the general trend 
     81      ! 
     82      CASE ( n_lap   )                                ! iso-level laplacian 
     83         CALL tra_ldf_lap  ( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb,      tra, jptra,  1   ) 
     84         ! 
     85      CASE ( n_lap_i )                                ! laplacian : standard iso-neutral operator (Madec) 
     86         CALL tra_ldf_iso  ( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb, trb, tra, jptra,  1   ) 
     87         ! 
     88      CASE ( n_lap_it )                               ! laplacian : triad iso-neutral operator (griffies) 
     89         CALL tra_ldf_triad( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb, trb, tra, jptra,  1   ) 
     90         ! 
     91      CASE ( n_blp , n_blp_i , n_blp_it )             ! bilaplacian: all operator (iso-level, -neutral) 
     92         CALL tra_ldf_blp  ( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb     , tra, jptra, nldf ) 
     93         ! 
    10294      END SELECT 
    10395      ! 
    104       IF( l_trdtrc )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
     96      IF( l_trdtrc )   THEN                    ! save the horizontal diffusive trends for further diagnostics 
    10597        DO jn = 1, jptra 
    10698           ztrtrd(:,:,:,jn) = tra(:,:,:,jn) - ztrtrd(:,:,:,jn) 
     
    109101        CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) 
    110102      ENDIF 
    111       !                                          ! print mean trends (used for debugging) 
    112       IF( ln_ctl )   THEN 
    113          WRITE(charout, FMT="('ldf ')") ;  CALL prt_ctl_trc_info(charout) 
    114                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    115       ENDIF 
     103      !                                        ! print mean trends (used for debugging) 
     104      IF( ln_ctl ) THEN 
     105         WRITE(charout, FMT="('ldf ')")   ;   CALL prt_ctl_trc_info(charout) 
     106                                              CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
     107      ENDIF 
     108      ! 
     109      CALL wrk_dealloc( jpi,jpj,jpk,   zahu, zahv ) 
    116110      ! 
    117111      IF( nn_timing == 1 )   CALL timing_stop('trc_ldf') 
     
    119113   END SUBROUTINE trc_ldf 
    120114 
     115!!gm ldf_ctl should be called in trcini  so that l_ldfslp=T  cause the slope init and calculation 
    121116 
    122117   SUBROUTINE ldf_ctl 
     
    124119      !!                  ***  ROUTINE ldf_ctl  *** 
    125120      !! 
    126       !! ** Purpose :   Choice of the operator for the lateral tracer diffusion 
     121      !! ** Purpose :   Define the operator for the lateral diffusion 
    127122      !! 
    128123      !! ** Method  :   set nldf from the namtra_ldf logicals 
    129124      !!      nldf == -2   No lateral diffusion 
    130       !!      nldf == -1   ESOPA test: ALL operators are used 
    131125      !!      nldf ==  0   laplacian operator 
    132126      !!      nldf ==  1   Rotated laplacian operator 
     
    136130      INTEGER ::   ioptio, ierr         ! temporary integers 
    137131      !!---------------------------------------------------------------------- 
    138  
    139       IF (ABS(rn_aht_0) < 2._wp*TINY(1.e0)) THEN 
    140          IF (ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0)) THEN 
    141             rldf_rat = 1.0_wp 
    142          ELSE 
    143             CALL ctl_stop( 'STOP', 'ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
    144          END IF 
    145       ELSE 
    146          rldf_rat = rn_ahtrc_0 / rn_aht_0 
    147       END IF 
    148       !  Define the lateral mixing oparator for tracers 
    149       ! =============================================== 
    150  
    151       !                               ! control the input 
     132      !       
     133      !                                ! control the namelist parameters 
    152134      ioptio = 0 
    153       IF( ln_trcldf_lap   )   ioptio = ioptio + 1 
    154       IF( ln_trcldf_bilap )   ioptio = ioptio + 1 
    155       IF( ioptio >  1 )   CALL ctl_stop( '          use ONE or NONE of the 2 lap/bilap operator type on tracer' ) 
    156       IF( ioptio == 0 )   nldf = -2   ! No lateral diffusion 
     135      IF( ln_trcldf_lap )   ioptio = ioptio + 1 
     136      IF( ln_trcldf_blp )   ioptio = ioptio + 1 
     137      IF( ioptio >  1 )   CALL ctl_stop( 'trc_ldf_ctl: use ONE or NONE of the 2 lap/bilap operator type on tracer' ) 
     138      IF( ioptio == 0 )   nldf = n_no_ldf   ! No lateral diffusion 
     139       
     140      IF( ln_trcldf_lap .AND. ln_trcldf_blp )   CALL ctl_stop( 'trc_ldf_ctl: bilaplacian should be used on both TRC and TRA' ) 
     141      IF( ln_trcldf_blp .AND. ln_trcldf_lap )   CALL ctl_stop( 'trc_ldf_ctl:   laplacian should be used on both TRC and TRA' ) 
     142       
    157143      ioptio = 0 
    158       IF( ln_trcldf_level )   ioptio = ioptio + 1 
    159       IF( ln_trcldf_hor   )   ioptio = ioptio + 1 
    160       IF( ln_trcldf_iso   )   ioptio = ioptio + 1 
    161       IF( ioptio /= 1 )   CALL ctl_stop( '          use only ONE direction (level/hor/iso)' ) 
     144      IF( ln_trcldf_lev )   ioptio = ioptio + 1 
     145      IF( ln_trcldf_hor )   ioptio = ioptio + 1 
     146      IF( ln_trcldf_iso )   ioptio = ioptio + 1 
     147      IF( ioptio /= 1   )   CALL ctl_stop( 'trc_ldf_ctl: use only ONE direction (level/hor/iso)' ) 
    162148 
    163149      ! defined the type of lateral diffusion from ln_trcldf_... logicals 
    164150      ! CAUTION : nldf = 1 is used in trazdf_imp, change it carefully 
    165151      ierr = 0 
    166       IF( ln_trcldf_lap ) THEN       ! laplacian operator 
     152      IF( ln_trcldf_lap ) THEN      !==  laplacian operator  ==! 
    167153         IF ( ln_zco ) THEN                ! z-coordinate 
    168             IF ( ln_trcldf_level )   nldf = 0      ! iso-level  (no rotation) 
    169             IF ( ln_trcldf_hor   )   nldf = 0      ! horizontal (no rotation) 
    170             IF ( ln_trcldf_iso   )   nldf = 1      ! isoneutral (   rotation) 
    171          ENDIF 
    172          IF ( ln_zps ) THEN             ! z-coordinate 
    173             IF ( ln_trcldf_level )   ierr = 1      ! iso-level not allowed 
    174             IF ( ln_trcldf_hor   )   nldf = 0      ! horizontal (no rotation) 
    175             IF ( ln_trcldf_iso   )   nldf = 1      ! isoneutral (   rotation) 
    176          ENDIF 
    177          IF ( ln_sco ) THEN             ! z-coordinate 
    178             IF ( ln_trcldf_level )   nldf = 0      ! iso-level  (no rotation) 
    179             IF ( ln_trcldf_hor   )   nldf = 1      ! horizontal (   rotation) 
    180             IF ( ln_trcldf_iso   )   nldf = 1      ! isoneutral (   rotation) 
    181          ENDIF 
    182       ENDIF 
    183  
    184       IF( ln_trcldf_bilap ) THEN      ! bilaplacian operator 
     154            IF ( ln_trcldf_lev   )   nldf = n_lap     ! iso-level = horizontal (no rotation) 
     155            IF ( ln_trcldf_hor   )   nldf = n_lap     ! iso-level = horizontal (no rotation) 
     156            IF ( ln_trcldf_iso   )   nldf = n_lap_i   ! iso-neutral: standard  (   rotation) 
     157            IF ( ln_trcldf_triad )   nldf = n_lap_it  ! iso-neutral: triad     (   rotation) 
     158         ENDIF 
     159         IF ( ln_zps ) THEN             ! z-coordinate with partial step 
     160            IF ( ln_trcldf_lev   )   ierr = 1         ! iso-level not allowed  
     161            IF ( ln_trcldf_hor   )   nldf = n_lap     ! horizontal (no rotation) 
     162            IF ( ln_trcldf_iso   )   nldf = n_lap_i   ! iso-neutral: standard (rotation) 
     163            IF ( ln_trcldf_triad )   nldf = n_lap_it  ! iso-neutral: triad    (rotation) 
     164         ENDIF 
     165         IF ( ln_sco ) THEN             ! s-coordinate 
     166            IF ( ln_trcldf_lev   )   nldf = n_lap     ! iso-level  (no rotation) 
     167            IF ( ln_trcldf_hor   )   nldf = n_lap_it  ! horizontal (   rotation)       !!gm   a checker.... 
     168            IF ( ln_trcldf_iso   )   nldf = n_lap_i   ! iso-neutral: standard (rotation) 
     169            IF ( ln_trcldf_triad )   nldf = n_lap_it  ! iso-neutral: triad    (rotation) 
     170         ENDIF 
     171         !                                ! diffusivity ratio: passive / active tracers  
     172         IF( ABS(rn_aht_0) < 2._wp*TINY(1.e0) ) THEN 
     173            IF( ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0) ) THEN 
     174               rldf_rat = 1.0_wp 
     175            ELSE 
     176               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
     177            ENDIF 
     178         ELSE 
     179            rldf_rat = rn_ahtrc_0 / rn_aht_0 
     180         ENDIF 
     181      ENDIF 
     182 
     183      IF( ln_trcldf_blp ) THEN      !==  bilaplacian operator  ==! 
    185184         IF ( ln_zco ) THEN                ! z-coordinate 
    186             IF ( ln_trcldf_level )   nldf = 2      ! iso-level  (no rotation) 
    187             IF ( ln_trcldf_hor   )   nldf = 2      ! horizontal (no rotation) 
    188             IF ( ln_trcldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
    189          ENDIF 
    190          IF ( ln_zps ) THEN             ! z-coordinate 
    191             IF ( ln_trcldf_level )   ierr = 1      ! iso-level not allowed 
    192             IF ( ln_trcldf_hor   )   nldf = 2      ! horizontal (no rotation) 
    193             IF ( ln_trcldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
    194          ENDIF 
    195          IF ( ln_sco ) THEN             ! z-coordinate 
    196             IF ( ln_trcldf_level )   nldf = 2      ! iso-level  (no rotation) 
    197             IF ( ln_trcldf_hor   )   nldf = 3      ! horizontal (   rotation) 
    198             IF ( ln_trcldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
     185            IF ( ln_trcldf_lev   )   nldf = n_blp     ! iso-level = horizontal (no rotation) 
     186            IF ( ln_trcldf_hor   )   nldf = n_blp     ! iso-level = horizontal (no rotation) 
     187            IF ( ln_trcldf_iso   )   nldf = n_blp_i   ! iso-neutral: standard (rotation) 
     188            IF ( ln_trcldf_triad )   nldf = n_blp_it  ! iso-neutral: triad    (rotation) 
     189         ENDIF 
     190         IF ( ln_zps ) THEN             ! z-coordinate with partial step 
     191            IF ( ln_trcldf_lev   )   ierr = 1         ! iso-level not allowed  
     192            IF ( ln_trcldf_hor   )   nldf = n_blp     ! horizontal (no rotation) 
     193            IF ( ln_trcldf_iso   )   nldf = n_blp_i   ! iso-neutral: standard (rotation) 
     194            IF ( ln_trcldf_triad )   nldf = n_blp_it  ! iso-neutral: triad    (rotation) 
     195         ENDIF 
     196         IF ( ln_sco ) THEN             ! s-coordinate 
     197            IF ( ln_trcldf_lev   )   nldf = n_blp     ! iso-level  (no rotation) 
     198            IF ( ln_trcldf_hor   )   nldf = n_blp_it  ! horizontal (   rotation)       !!gm   a checker.... 
     199            IF ( ln_trcldf_iso   )   nldf = n_blp_i   ! iso-neutral: standard (rotation) 
     200            IF ( ln_trcldf_triad )   nldf = n_blp_it  ! iso-neutral: triad    (rotation) 
     201         ENDIF 
     202         !                                ! diffusivity ratio: passive / active tracers  
     203         IF( ABS(rn_bht_0) < 2._wp*TINY(1.e0) ) THEN 
     204            IF( ABS(rn_bhtrc_0) < 2._wp*TINY(1.e0) ) THEN 
     205               rldf_rat = 1.0_wp 
     206            ELSE 
     207               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
     208            ENDIF 
     209         ELSE 
     210            rldf_rat = SQRT(  ABS( rn_bhtrc_0 / rn_bht_0 )  ) 
    199211         ENDIF 
    200212      ENDIF 
    201213 
    202214      IF( ierr == 1 )   CALL ctl_stop( ' iso-level in z-coordinate - partial step, not allowed' ) 
    203       IF( ierr == 2 )   CALL ctl_stop( ' isoneutral bilaplacian operator does not exist' ) 
    204       IF( lk_traldf_eiv .AND. .NOT.ln_trcldf_iso )   & 
     215      IF( ln_ldfeiv .AND. .NOT.ln_trcldf_iso )   & 
    205216           CALL ctl_stop( '          eddy induced velocity on tracers',   & 
    206217           &              ' the eddy induced velocity on tracers requires isopycnal laplacian diffusion' ) 
    207218      IF( nldf == 1 .OR. nldf == 3 ) THEN      ! rotation 
    208          IF( .NOT.lk_ldfslp )   CALL ctl_stop( '          the rotation of the diffusive tensor require key_ldfslp' ) 
    209 #if defined key_offline 
    210          l_traldf_rot = .TRUE.                 ! needed for trazdf_imp 
    211 #endif 
    212       ENDIF 
    213  
    214       IF( lk_esopa ) THEN 
    215          IF(lwp) WRITE(numout,*) '          esopa control: use all lateral physics options' 
    216          nldf = -1 
     219         IF( .NOT.l_ldfslp )   CALL ctl_stop( '          the rotation of the diffusive tensor require l_ldfslp' ) 
    217220      ENDIF 
    218221 
    219222      IF(lwp) THEN 
    220223         WRITE(numout,*) 
    221          IF( nldf == -2 )   WRITE(numout,*) '          NO lateral diffusion' 
    222          IF( nldf == -1 )   WRITE(numout,*) '          ESOPA test All scheme used' 
    223          IF( nldf ==  0 )   WRITE(numout,*) '          laplacian operator' 
    224          IF( nldf ==  1 )   WRITE(numout,*) '          Rotated laplacian operator' 
    225          IF( nldf ==  2 )   WRITE(numout,*) '          bilaplacian operator' 
    226          IF( nldf ==  3 )   WRITE(numout,*) '          Rotated bilaplacian' 
    227       ENDIF 
    228  
    229       IF( ln_trcldf_bilap ) THEN 
    230          IF(lwp) WRITE(numout,*) '          biharmonic tracer diffusion' 
    231          IF( rn_ahtrc_0 > 0 .AND. .NOT. lk_esopa )   CALL ctl_stop( 'The horizontal diffusivity coef. rn_ahtrc_0 must be negative' ) 
    232       ELSE 
    233          IF(lwp) WRITE(numout,*) '          harmonic tracer diffusion (default)' 
    234          IF( rn_ahtrc_0 < 0 .AND. .NOT. lk_esopa )   CALL ctl_stop('The horizontal diffusivity coef. rn_ahtrc_0 must be positive' ) 
    235       ENDIF 
    236  
    237       ! ratio between active and passive tracers diffusive coef. 
    238       IF (ABS(rn_aht_0) < 2._wp*TINY(1.e0)) THEN 
    239          IF (ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0)) THEN 
    240             rldf_rat = 1.0_wp 
    241          ELSE 
    242             CALL ctl_stop( 'STOP', 'ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
    243          END IF 
    244       ELSE 
    245          rldf_rat = rn_ahtrc_0 / rn_aht_0 
    246       END IF 
    247       IF( rldf_rat < 0 ) THEN 
    248          IF( .NOT.lk_offline ) THEN  
    249             CALL ctl_stop( 'Choose the same type of diffusive scheme both for active & passive tracers' ) 
    250          ELSE 
    251             CALL ctl_stop( 'Change the sign of rn_aht_0 in namelist to -/+1' ) 
    252          ENDIF  
     224         IF( nldf == n_no_ldf )   WRITE(numout,*) '          NO lateral diffusion' 
     225         IF( nldf == n_lap    )   WRITE(numout,*) '          laplacian iso-level operator' 
     226         IF( nldf == n_lap_i  )   WRITE(numout,*) '          Rotated laplacian operator (standard)' 
     227         IF( nldf == n_lap_it )   WRITE(numout,*) '          Rotated laplacian operator (triad)' 
     228         IF( nldf == n_blp    )   WRITE(numout,*) '          bilaplacian iso-level operator' 
     229         IF( nldf == n_blp_i  )   WRITE(numout,*) '          Rotated bilaplacian operator (standard)' 
     230         IF( nldf == n_blp_it )   WRITE(numout,*) '          Rotated bilaplacian operator (triad)' 
    253231      ENDIF 
    254232      ! 
Note: See TracChangeset for help on using the changeset viewer.