Changeset 6140 for trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
- Timestamp:
- 2015-12-21T12:35:23+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r5836 r6140 28 28 PUBLIC trc_zdf ! called by step.F90 29 29 PUBLIC trc_zdf_ini ! called by nemogcm.F90 30 PUBLIC trc_zdf_alloc ! called by nemogcm.F9031 30 32 31 ! !!** Vertical diffusion (nam_trczdf) ** … … 36 35 INTEGER :: nzdf = 0 ! type vertical diffusion algorithm used 37 36 ! ! defined from ln_zdf... namlist logicals) 38 REAL(wp) , ALLOCATABLE, SAVE, DIMENSION(:) :: r2dt ! vertical profile time-step, = 2 rdttra39 ! ! except at nittrc000 (=rdttra) if neuler=037 REAL(wp) :: r2dttrc ! vertical profile time-step, = 2 rdt 38 ! ! except at nittrc000 (=rdt) if neuler=0 40 39 41 40 !! * Substitutions 42 # include "domzgr_substitute.h90"43 41 # include "zdfddm_substitute.h90" 44 42 # include "vectopt_loop_substitute.h90" … … 49 47 !!---------------------------------------------------------------------- 50 48 CONTAINS 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_alloc61 62 49 63 50 SUBROUTINE trc_zdf( kt ) … … 77 64 ! 78 65 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) 80 67 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) 82 69 ENDIF 83 70 … … 88 75 89 76 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 scheme91 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt , trb, tra, jptra ) ! implicit scheme77 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 92 79 END SELECT 93 80 … … 95 82 DO jn = 1, jptra 96 83 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) 98 85 END DO 99 86 CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) )
Note: See TracChangeset
for help on using the changeset viewer.