- Timestamp:
- 2015-12-16T10:25:22+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
r5930 r6060 9 9 10 10 !!---------------------------------------------------------------------- 11 !! tra_zdf : Update the tracer trend with the vertical diffusion12 !! tra_zdf_init : initialisation of the computation11 !! tra_zdf : Update the tracer trend with the vertical diffusion 12 !! tra_zdf_init : initialisation of the computation 13 13 !!---------------------------------------------------------------------- 14 USE oce ! ocean dynamics and tracers variables 15 USE dom_oce ! ocean space and time domain variables 16 USE domvvl ! variable volume 17 USE phycst ! physical constant 18 USE zdf_oce ! ocean vertical physics variables 19 USE sbc_oce ! surface boundary condition: ocean 14 USE oce ! ocean dynamics and tracers variables 15 USE dom_oce ! ocean space and time domain variables 16 USE domvvl ! variable volume 17 USE phycst ! physical constant 18 USE zdf_oce ! ocean vertical physics variables 19 USE sbc_oce ! surface boundary condition: ocean 20 USE ldftra ! lateral diffusion: eddy diffusivity 21 USE ldfslp ! lateral diffusion: iso-neutral slope 22 USE trazdf_exp ! vertical diffusion: explicit (tra_zdf_exp routine) 23 USE trazdf_imp ! vertical diffusion: implicit (tra_zdf_imp routine) 24 USE trd_oce ! trends: ocean variables 25 USE trdtra ! trends: tracer trend manager 20 26 ! 21 USE ldftra ! lateral diffusion: eddy diffusivity 22 USE ldfslp ! lateral diffusion: iso-neutral slope 23 USE trazdf_exp ! vertical diffusion: explicit (tra_zdf_exp routine) 24 USE trazdf_imp ! vertical diffusion: implicit (tra_zdf_imp routine) 25 ! 26 USE trd_oce ! trends: ocean variables 27 USE trdtra ! trends manager: tracers 28 ! 29 USE in_out_manager ! I/O manager 30 USE prtctl ! Print control 31 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 32 USE lib_mpp ! MPP library 33 USE wrk_nemo ! Memory allocation 34 USE timing ! Timing 27 USE in_out_manager ! I/O manager 28 USE prtctl ! Print control 29 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 30 USE lib_mpp ! MPP library 31 USE wrk_nemo ! Memory allocation 32 USE timing ! Timing 35 33 36 34 IMPLICIT NONE … … 43 41 44 42 !! * Substitutions 45 # include "domzgr_substitute.h90"46 43 # include "zdfddm_substitute.h90" 47 44 # include "vectopt_loop_substitute.h90" … … 60 57 !!--------------------------------------------------------------------- 61 58 INTEGER, INTENT( in ) :: kt ! ocean time-step index 62 ! !59 ! 63 60 INTEGER :: jk ! Dummy loop indices 64 61 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdt, ztrds ! 3D workspace … … 72 69 r2dtra(:) = 2. * rdttra(:) ! = 2 rdttra (leapfrog) 73 70 ENDIF 74 71 ! 75 72 IF( l_trdtra ) THEN !* Save ta and sa trends 76 73 CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) … … 78 75 ztrds(:,:,:) = tsa(:,:,:,jp_sal) 79 76 ENDIF 80 77 ! 81 78 SELECT CASE ( nzdf ) ! compute lateral mixing trend and add it to the general trend 82 79 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts ) ! explicit scheme … … 87 84 ! JMM avoid negative salinities near river outlet ! Ugly fix 88 85 ! JMM : restore negative salinities to small salinities: 89 WHERE 86 WHERE( tsa(:,:,:,jp_sal) < 0._wp ) tsa(:,:,:,jp_sal) = 0.1_wp 90 87 !!gm 91 88 … … 103 100 CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) 104 101 ENDIF 105 106 102 ! ! print mean trends (used for debugging) 107 103 IF(ln_ctl) CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf - Ta: ', mask1=tmask, & … … 128 124 USE zdfgls 129 125 !!---------------------------------------------------------------------- 130 126 ! 131 127 ! Choice from ln_zdfexp already read in namelist in zdfini module 132 128 IF( ln_zdfexp ) THEN ; nzdf = 0 ! use explicit scheme 133 129 ELSE ; nzdf = 1 ! use implicit scheme 134 130 ENDIF 135 131 ! 136 132 ! Force implicit schemes 137 133 IF( lk_zdftke .OR. lk_zdfgls ) nzdf = 1 ! TKE, or GLS physics … … 140 136 IF( ln_zdfexp .AND. nzdf == 1 ) CALL ctl_stop( 'tra_zdf : If using the rotation of lateral mixing operator', & 141 137 & ' GLS or TKE scheme, the implicit scheme is required, set ln_zdfexp = .false.' ) 142 138 ! 143 139 IF(lwp) THEN 144 140 WRITE(numout,*)
Note: See TracChangeset
for help on using the changeset viewer.