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 7158 for branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90 – NEMO

Ignore:
Timestamp:
2016-10-29T01:21:05+02:00 (7 years ago)
Author:
clem
Message:

debug branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r5385 r7158  
    2727 
    2828   PUBLIC   trc_zdf          ! called by step.F90  
    29    PUBLIC   trc_zdf_alloc    ! called by nemogcm.F90  
    3029 
    3130   INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used 
    3231      !                                ! defined from ln_zdf...  namlist logicals) 
    33    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  r2dt   ! vertical profile time-step, = 2 rdttra 
    34       !                                                 ! except at nittrc000 (=rdttra) if neuler=0 
     32   REAL(wp) ::  r2dttrc   ! vertical profile time-step, = 2 rdt 
     33      !                   ! except at nittrc000 (=rdt) if neuler=0 
    3534 
    3635   !! * Substitutions 
     
    4544CONTAINS 
    4645    
    47    INTEGER FUNCTION trc_zdf_alloc() 
    48       !!---------------------------------------------------------------------- 
    49       !!                  ***  ROUTINE trc_zdf_alloc  *** 
    50       !!---------------------------------------------------------------------- 
    51       ALLOCATE( r2dt(jpk) , STAT=trc_zdf_alloc ) 
    52       ! 
    53       IF( trc_zdf_alloc /= 0 )   CALL ctl_warn('trc_zdf_alloc : failed to allocate array.') 
    54       ! 
    55    END FUNCTION trc_zdf_alloc 
    56  
    5746 
    5847   SUBROUTINE trc_zdf( kt ) 
     
    7463 
    7564      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    76          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     65         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping) 
    7766      ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    78          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     67         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    7968      ENDIF 
    8069 
     
    8675      SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend 
    8776      CASE ( -1 )                                       ! esopa: test all possibility with control print 
    88          CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra )  
     77         CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra )  
    8978         WRITE(charout, FMT="('zdf1 ')") ;  CALL prt_ctl_trc_info(charout) 
    9079                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    91          CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra )  
     80         CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )  
    9281         WRITE(charout, FMT="('zdf2 ')") ;  CALL prt_ctl_trc_info(charout) 
    9382                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    94       CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
    95       CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra )    !   implicit scheme           
     83      CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
     84      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )    !   implicit scheme           
    9685 
    9786      END SELECT 
     
    10089         DO jn = 1, jptra 
    10190            DO jk = 1, jpkm1 
    102                ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dt(jk) ) - ztrtrd(:,:,jk,jn) 
     91               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dttrc ) - ztrtrd(:,:,jk,jn) 
    10392            END DO 
    10493            CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) 
Note: See TracChangeset for help on using the changeset viewer.