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 6140 for trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90 – NEMO

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (8 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r5836 r6140  
    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 
    42 #  include "domzgr_substitute.h90" 
    4341#  include "zdfddm_substitute.h90" 
    4442#  include "vectopt_loop_substitute.h90" 
     
    4947   !!---------------------------------------------------------------------- 
    5048CONTAINS 
    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  
    6249 
    6350   SUBROUTINE trc_zdf( kt ) 
     
    7764      ! 
    7865      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    79          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     66         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping) 
    8067      ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    81          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     68         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    8269      ENDIF 
    8370 
     
    8875 
    8976      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           
     77      CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
     78      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )    !   implicit scheme           
    9279      END SELECT 
    9380 
     
    9582         DO jn = 1, jptra 
    9683            DO jk = 1, jpkm1 
    97                ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dt(jk) ) - ztrtrd(:,:,jk,jn) 
     84               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dttrc ) - ztrtrd(:,:,jk,jn) 
    9885            END DO 
    9986            CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) 
Note: See TracChangeset for help on using the changeset viewer.