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 6051 for branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90 – NEMO

Ignore:
Timestamp:
2015-12-15T10:46:14+01:00 (8 years ago)
Author:
lovato
Message:

Merge branches/2015/dev_r5056_CMCC4_simplification (see ticket #1456)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r5836 r6051  
    2828   PUBLIC   trc_zdf         ! called by step.F90  
    2929   PUBLIC   trc_zdf_ini     ! called by nemogcm.F90  
    30    PUBLIC   trc_zdf_alloc   ! called by nemogcm.F90  
    3130    
    3231   !                                        !!** Vertical diffusion (nam_trczdf) ** 
     
    3635   INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used 
    3736      !                                ! defined from ln_zdf...  namlist logicals) 
    38    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  r2dt   ! vertical profile time-step, = 2 rdttra 
    39       !                                                 ! except at nittrc000 (=rdttra) if neuler=0 
     37   REAL(wp) ::  r2dttrc   ! vertical profile time-step, = 2 rdt 
     38      !                   ! except at nittrc000 (=rdt) if neuler=0 
    4039 
    4140   !! * Substitutions 
     
    4948   !!---------------------------------------------------------------------- 
    5049CONTAINS 
    51     
    52    INTEGER FUNCTION trc_zdf_alloc() 
    53       !!---------------------------------------------------------------------- 
    54       !!                  ***  ROUTINE trc_zdf_alloc  *** 
    55       !!---------------------------------------------------------------------- 
    56       ALLOCATE( r2dt(jpk) , STAT=trc_zdf_alloc ) 
    57       ! 
    58       IF( trc_zdf_alloc /= 0 )   CALL ctl_warn('trc_zdf_alloc : failed to allocate array.') 
    59       ! 
    60    END FUNCTION trc_zdf_alloc 
    61  
    6250 
    6351   SUBROUTINE trc_zdf( kt ) 
     
    7765      ! 
    7866      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    79          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     67         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping) 
    8068      ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    81          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     69         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    8270      ENDIF 
    8371 
     
    8876 
    8977      SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend 
    90       CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
    91       CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra )    !   implicit scheme           
     78      CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
     79      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )    !   implicit scheme           
    9280      END SELECT 
    9381 
     
    9583         DO jn = 1, jptra 
    9684            DO jk = 1, jpkm1 
    97                ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dt(jk) ) - ztrtrd(:,:,jk,jn) 
     85               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dttrc ) - ztrtrd(:,:,jk,jn) 
    9886            END DO 
    9987            CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) 
Note: See TracChangeset for help on using the changeset viewer.