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 3101 for branches/2011/dev_NOC_UKMO_MERGE/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90 – NEMO

Ignore:
Timestamp:
2011-11-14T18:39:45+01:00 (13 years ago)
Author:
acc
Message:

Branch dev_NOC_UKMO_MERGE #890. Resolved conflicts (most arising from the tracer sub-timestepping)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NOC_UKMO_MERGE/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r3094 r3101  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  trcldf  *** 
    4    !! Ocean Passive tracers : lateral diffusive trends  
     4   !! Ocean Passive tracers : lateral diffusive trends 
    55   !!===================================================================== 
    66   !! History :  9.0  ! 2005-11 (G. Madec)  Original code 
    7    !!       NEMO 3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA  
     7   !!       NEMO 3.0  ! 2008-01  (C. Ethe, G. Madec)  merge TRC-TRA 
    88   !!---------------------------------------------------------------------- 
    99#if defined key_top 
     
    2323   USE traldf_bilap    ! lateral mixing            (tra_ldf_bilap routine) 
    2424   USE traldf_iso      ! lateral mixing            (tra_ldf_iso routine) 
     25   USE traldf_iso_grif ! lateral mixing          (tra_ldf_iso_grif routine) 
    2526   USE traldf_lap      ! lateral mixing            (tra_ldf_lap routine) 
    2627   USE trdmod_oce 
     
    3132   PRIVATE 
    3233 
    33    PUBLIC   trc_ldf    ! called by step.F90  
     34   PUBLIC   trc_ldf    ! called by step.F90 
    3435   !                                                 !!: ** lateral mixing namelist (nam_trcldf) ** 
    3536   INTEGER ::   nldf = 0   ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals) 
     
    3940   !!---------------------------------------------------------------------- 
    4041   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    41    !! $Id$  
     42   !! $Id$ 
    4243   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4344   !!---------------------------------------------------------------------- 
     
    4849      !!---------------------------------------------------------------------- 
    4950      !!                  ***  ROUTINE tra_ldf  *** 
    50       !!  
     51      !! 
    5152      !! ** Purpose :   compute the lateral ocean tracer physics. 
    5253      !! 
     
    6162      IF( kt == nittrc000 )   CALL ldf_ctl          ! initialisation & control of options 
    6263 
    63       IF( l_trdtrc )  THEN  
     64      IF( l_trdtrc )  THEN 
    6465         ALLOCATE( ztrtrd(jpi,jpj,jpk,jptra) )  ! temporary save of trends 
    6566         ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
     
    6869      SELECT CASE ( nldf )                       ! compute lateral mixing trend and add it to the general trend 
    6970      CASE ( 0 )   ;   CALL tra_ldf_lap   ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra            )  ! iso-level laplacian 
    70       CASE ( 1 )   ;   CALL tra_ldf_iso   ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 )  ! rotated laplacian  
     71      CASE ( 1 )                                                                                            ! rotated laplacian 
     72                       IF( ln_traldf_grif ) THEN 
     73                          CALL tra_ldf_iso_grif( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     74                       ELSE 
     75                          CALL tra_ldf_iso     ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     76                       ENDIF 
    7177      CASE ( 2 )   ;   CALL tra_ldf_bilap ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra            )  ! iso-level bilaplacian 
    7278      CASE ( 3 )   ;   CALL tra_ldf_bilapg( kt, nittrc000, 'TRC',             trb, tra, jptra            )  ! s-coord. horizontal bilaplacian 
     
    7682         WRITE(charout, FMT="('ldf0 ')") ;  CALL prt_ctl_trc_info(charout) 
    7783                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    78          CALL tra_ldf_iso   ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     84         IF( ln_traldf_grif ) THEN 
     85            CALL tra_ldf_iso_grif( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     86         ELSE 
     87            CALL tra_ldf_iso     ( kt, nittrc000, 'TRC', gtru, gtrv, trb, tra, jptra, rn_ahtb_0 ) 
     88         ENDIF 
    7989         WRITE(charout, FMT="('ldf1 ')") ;  CALL prt_ctl_trc_info(charout) 
    8090                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
     
    92102           CALL trd_tra( kt, 'TRC', jn, jptra_trd_ldf, ztrtrd(:,:,:,jn) ) 
    93103        END DO 
    94         DEALLOCATE( ztrtrd )  
     104        DEALLOCATE( ztrtrd ) 
    95105      ENDIF 
    96106      !                                          ! print mean trends (used for debugging) 
     
    106116      !!---------------------------------------------------------------------- 
    107117      !!                  ***  ROUTINE ldf_ctl  *** 
    108       !!  
     118      !! 
    109119      !! ** Purpose :   Choice of the operator for the lateral tracer diffusion 
    110120      !! 
    111121      !! ** Method  :   set nldf from the namtra_ldf logicals 
    112       !!      nldf == -2   No lateral diffusion   
     122      !!      nldf == -2   No lateral diffusion 
    113123      !!      nldf == -1   ESOPA test: ALL operators are used 
    114124      !!      nldf ==  0   laplacian operator 
     
    117127      !!      nldf ==  3   Rotated bilaplacian 
    118128      !!---------------------------------------------------------------------- 
    119       INTEGER ::   ioptio, ierr         ! temporary integers  
     129      INTEGER ::   ioptio, ierr         ! temporary integers 
    120130      !!---------------------------------------------------------------------- 
    121131 
    122132      !  Define the lateral mixing oparator for tracers 
    123133      ! =============================================== 
    124      
     134 
    125135      !                               ! control the input 
    126136      ioptio = 0 
     
    163173         ENDIF 
    164174         IF ( ln_zps ) THEN             ! z-coordinate 
    165             IF ( ln_trcldf_level )   ierr = 1      ! iso-level not allowed  
     175            IF ( ln_trcldf_level )   ierr = 1      ! iso-level not allowed 
    166176            IF ( ln_trcldf_hor   )   nldf = 2      ! horizontal (no rotation) 
    167177            IF ( ln_trcldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
Note: See TracChangeset for help on using the changeset viewer.