Changeset 6060 for branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP
- Timestamp:
- 2015-12-16T10:25:22+01:00 (8 years ago)
- Location:
- branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
r5836 r6060 62 62 63 63 !! * Substitutions 64 # include "domzgr_substitute.h90"65 64 # include "vectopt_loop_substitute.h90" 66 65 !!---------------------------------------------------------------------- … … 109 108 ! !== effective transport ==! 110 109 DO jk = 1, jpkm1 111 zun(:,:,jk) = e2u (:,:) * fse3u(:,:,jk) * un(:,:,jk) ! eulerian transport112 zvn(:,:,jk) = e1v (:,:) * fse3v(:,:,jk) * vn(:,:,jk)110 zun(:,:,jk) = e2u (:,:) * e3u_n(:,:,jk) * un(:,:,jk) ! eulerian transport 111 zvn(:,:,jk) = e1v (:,:) * e3v_n(:,:,jk) * vn(:,:,jk) 113 112 zwn(:,:,jk) = e1e2t(:,:) * wn(:,:,jk) 114 113 END DO … … 231 230 CALL ctl_stop( 'trc_adv_init: force 2nd order FCT scheme, 4th order does not exist with sub-timestepping' ) 232 231 ENDIF 233 IF( lk_vvl) THEN232 IF( .NOT.ln_linssh ) THEN 234 233 CALL ctl_stop( 'trc_adv_init: vertical sub-timestepping not allow in non-linear free surface' ) 235 234 ENDIF -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
r5836 r6060 43 43 44 44 !! * Substitutions 45 # include "domzgr_substitute.h90"46 45 # include "vectopt_loop_substitute.h90" 47 46 !!---------------------------------------------------------------------- … … 82 81 !! - save the trends ('key_trdmxl_trc') 83 82 !!---------------------------------------------------------------------- 84 !! 85 INTEGER, INTENT( in ) :: kt ! ocean time-step index 86 !! 87 INTEGER :: ji, jj, jk, jn, jl ! dummy loop indices 88 REAL(wp) :: ztra ! temporary scalars 89 CHARACTER (len=22) :: charout 83 INTEGER, INTENT(in) :: kt ! ocean time-step index 84 ! 85 INTEGER :: ji, jj, jk, jn, jl ! dummy loop indices 86 CHARACTER (len=22) :: charout 90 87 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrtrd 91 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrcdta ! 3D workspace88 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrcdta ! 3D workspace 92 89 !!---------------------------------------------------------------------- 93 90 ! … … 105 102 ! 106 103 IF( ln_trc_ini(jn) ) THEN ! update passive tracers arrays with input data read from file 107 104 ! 108 105 jl = n_trc_index(jn) 109 106 CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) ) ! read tracer data at nit000 110 107 ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 111 108 ! 112 109 SELECT CASE ( nn_zdmp_tr ) 113 110 ! … … 116 113 DO jj = 2, jpjm1 117 114 DO ji = fs_2, fs_jpim1 ! vector opt. 118 ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 119 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 115 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 120 116 END DO 121 117 END DO 122 118 END DO 123 !119 ! 124 120 CASE ( 1 ) !== no damping in the turbocline (avt > 5 cm2/s) ==! 125 121 DO jk = 1, jpkm1 … … 127 123 DO ji = fs_2, fs_jpim1 ! vector opt. 128 124 IF( avt(ji,jj,jk) <= 5.e-4_wp ) THEN 129 ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 130 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 125 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 131 126 ENDIF 132 127 END DO 133 128 END DO 134 129 END DO 135 !130 ! 136 131 CASE ( 2 ) !== no damping in the mixed layer ==! 137 132 DO jk = 1, jpkm1 138 133 DO jj = 2, jpjm1 139 134 DO ji = fs_2, fs_jpim1 ! vector opt. 140 IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN 141 ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 142 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 135 IF( gdept_n(ji,jj,jk) >= hmlp (ji,jj) ) THEN 136 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 143 137 END IF 144 138 END DO 145 139 END DO 146 140 END DO 147 !141 ! 148 142 END SELECT 149 143 ! … … 162 156 IF( l_trdtrc ) CALL wrk_dealloc( jpi, jpj, jpk, ztrtrd ) 163 157 ! ! print mean trends (used for debugging) 164 IF( ln_ctl ) THEN 165 WRITE(charout, FMT="('dmp ')") ; CALL prt_ctl_trc_info(charout) 166 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 158 IF( ln_ctl ) THEN 159 WRITE(charout, FMT="('dmp ')") 160 CALL prt_ctl_trc_info(charout) 161 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 167 162 ENDIF 168 163 ! … … 170 165 ! 171 166 END SUBROUTINE trc_dmp 167 172 168 173 169 SUBROUTINE trc_dmp_ini … … 180 176 !! called by trc_dmp at the first timestep (nittrc000) 181 177 !!---------------------------------------------------------------------- 182 ! 183 INTEGER :: ios ! Local integer output status for namelist read 184 INTEGER :: imask !local file handle 185 ! 178 INTEGER :: ios, imask ! local integers 179 !! 186 180 NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr 187 181 !!---------------------------------------------------------------------- 188 182 ! 189 183 IF( nn_timing == 1 ) CALL timing_start('trc_dmp_init') 190 184 ! 191 192 185 REWIND( numnat_ref ) ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 193 186 READ ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) … … 233 226 END SUBROUTINE trc_dmp_ini 234 227 228 235 229 SUBROUTINE trc_dmp_clo( kt ) 236 230 !!--------------------------------------------------------------------- … … 245 239 !! nctsi2(), nctsj2() : north-east Closed sea limits (i,j) 246 240 !!---------------------------------------------------------------------- 247 INTEGER, INTENT( in ) :: kt ! ocean time-step index 248 ! 249 INTEGER :: ji , jj, jk, jn, jl, jc ! dummy loop indicesa 250 INTEGER :: isrow ! local index 251 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrcdta ! 3D workspace 252 253 !!---------------------------------------------------------------------- 254 241 INTEGER, INTENT( in ) :: kt ! ocean time-step index 242 ! 243 INTEGER :: ji , jj, jk, jn, jl, jc ! dummy loop indicesa 244 INTEGER :: isrow ! local index 245 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrcdta ! 3D workspace 246 !!---------------------------------------------------------------------- 247 ! 255 248 IF( kt == nit000 ) THEN 256 249 ! initial values … … 364 357 END SUBROUTINE trc_dmp_clo 365 358 366 367 359 #else 368 360 !!---------------------------------------------------------------------- … … 376 368 #endif 377 369 378 379 370 !!====================================================================== 380 371 END MODULE trcdmp -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90
r5836 r6060 12 12 !! 'key_top' TOP models 13 13 !!---------------------------------------------------------------------- 14 !! trc_ldf : update the tracer trend with the lateral diffusion 15 !! trc_ldf_ini : initialization, namelist read, and parameters control 16 !!---------------------------------------------------------------------- 17 USE trc ! ocean passive tracers variables 18 USE oce_trc ! ocean dynamics and active tracers 19 USE ldfslp ! lateral diffusion: iso-neutral slope 20 USE traldf_lap ! lateral diffusion: laplacian iso-level operator (tra_ldf_lap routine) 21 USE traldf_iso ! lateral diffusion: laplacian iso-neutral standard operator (tra_ldf_iso routine) 22 USE traldf_triad ! lateral diffusion: laplacian iso-neutral triad operator (tra_ldf_triad routine) 23 USE traldf_blp ! lateral diffusion (iso-level lap/blp) (tra_ldf_lap routine) 24 USE trd_oce ! trends: ocean variables 25 USE trdtra ! trends manager: tracers 14 !! trc_ldf : update the tracer trend with the lateral diffusion 15 !! trc_ldf_ini : initialization, namelist read, and parameters control 16 !!---------------------------------------------------------------------- 17 USE trc ! ocean passive tracers variables 18 USE oce_trc ! ocean dynamics and active tracers 19 USE ldfslp ! lateral diffusion: iso-neutral slope 20 USE traldf_lap_blp ! lateral diffusion: lap/bilaplacian iso-level operator (tra_ldf_lap/_blp routine) 21 USE traldf_iso ! lateral diffusion: laplacian iso-neutral standard operator (tra_ldf_iso routine) 22 USE traldf_triad ! lateral diffusion: laplacian iso-neutral triad operator (tra_ldf_ triad routine) 23 USE trd_oce ! trends: ocean variables 24 USE trdtra ! trends manager: tracers 26 25 ! 27 USE prtctl_trc 26 USE prtctl_trc ! Print control 28 27 29 28 IMPLICIT NONE … … 42 41 REAL(wp), PUBLIC :: rn_bhtrc_0 !: bilaplacian - -- - - [m4/s] 43 42 ! 44 !!: ** lateral mixing namelist (nam_trcldf) ** 45 REAL(wp) :: rldf ! ratio between active and passive tracers diffusive coefficient 43 ! !!: ** lateral mixing namelist (nam_trcldf) ** 44 REAL(wp) :: rldf ! ratio between active and passive tracers diffusive coefficient 45 46 46 INTEGER :: nldf = 0 ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals) 47 47 48 48 !! * Substitutions 49 # include "domzgr_substitute.h90"50 49 # include "vectopt_loop_substitute.h90" 51 50 !!---------------------------------------------------------------------- … … 64 63 !!---------------------------------------------------------------------- 65 64 INTEGER, INTENT( in ) :: kt ! ocean time-step index 66 ! !65 ! 67 66 INTEGER :: jn 68 67 CHARACTER (len=22) :: charout … … 99 98 END SELECT 100 99 ! 101 IF( l_trdtrc ) THEN ! s ave the horizontal diffusive trends for further diagnostics100 IF( l_trdtrc ) THEN ! send the trends for further diagnostics 102 101 DO jn = 1, jptra 103 102 ztrtrd(:,:,:,jn) = tra(:,:,:,jn) - ztrtrd(:,:,:,jn) … … 106 105 CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) 107 106 ENDIF 108 ! ! print mean trends (used for debugging) 109 IF( ln_ctl ) THEN 110 WRITE(charout, FMT="('ldf ')") ; CALL prt_ctl_trc_info(charout) 111 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 107 ! 108 IF( ln_ctl ) THEN ! print mean trends (used for debugging) 109 WRITE(charout, FMT="('ldf ')") 110 CALL prt_ctl_trc_info(charout) 111 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 112 112 ENDIF 113 113 ! … … 133 133 INTEGER :: ioptio, ierr ! temporary integers 134 134 INTEGER :: ios ! Local integer output status for namelist read 135 ! 135 !! 136 136 NAMELIST/namtrc_ldf/ ln_trcldf_lap, ln_trcldf_blp, & 137 137 & ln_trcldf_lev, ln_trcldf_hor, ln_trcldf_iso, ln_trcldf_triad, & 138 138 & rn_ahtrc_0 , rn_bhtrc_0 139 139 !!---------------------------------------------------------------------- 140 REWIND( numnat_ref ) ! namtrc_ldf in reference namelist 140 ! 141 REWIND( numnat_ref ) ! namtrc_ldf in reference namelist 141 142 READ ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903) 142 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp )143 144 REWIND( numnat_cfg ) 143 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp ) 144 ! 145 REWIND( numnat_cfg ) ! namtrc_ldf in configuration namelist 145 146 READ ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 ) 146 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp )147 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp ) 147 148 IF(lwm) WRITE ( numont, namtrc_ldf ) 148 149 IF(lwp) THEN ! Namelist print149 ! 150 IF(lwp) THEN ! Namelist print 150 151 WRITE(numout,*) 151 152 WRITE(numout,*) 'trc_ldf_ini : lateral tracer diffusive operator' … … 174 175 IF( ln_trcldf_lap .AND. ln_trcldf_blp ) CALL ctl_stop( 'trc_ldf_ctl: bilaplacian should be used on both TRC and TRA' ) 175 176 IF( ln_trcldf_blp .AND. ln_trcldf_lap ) CALL ctl_stop( 'trc_ldf_ctl: laplacian should be used on both TRC and TRA' ) 176 177 ! 177 178 ioptio = 0 178 179 IF( ln_trcldf_lev ) ioptio = ioptio + 1 … … 180 181 IF( ln_trcldf_iso ) ioptio = ioptio + 1 181 182 IF( ioptio /= 1 ) CALL ctl_stop( 'trc_ldf_ctl: use only ONE direction (level/hor/iso)' ) 182 183 ! 183 184 ! defined the type of lateral diffusion from ln_trcldf_... logicals 184 185 ! CAUTION : nldf = 1 is used in trazdf_imp, change it carefully … … 204 205 ENDIF 205 206 ! ! diffusivity ratio: passive / active tracers 206 IF( ABS(rn_aht_0) < 2._wp*TINY(1. e0) ) THEN207 IF( ABS(rn_ahtrc_0) < 2._wp*TINY(1. e0) ) THEN207 IF( ABS(rn_aht_0) < 2._wp*TINY(1._wp) ) THEN 208 IF( ABS(rn_ahtrc_0) < 2._wp*TINY(1._wp) ) THEN 208 209 rldf = 1.0_wp 209 210 ELSE 210 CALL ctl_stop( ' STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' )211 CALL ctl_stop( 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' ) 211 212 ENDIF 212 213 ELSE … … 235 236 ENDIF 236 237 ! ! diffusivity ratio: passive / active tracers 237 IF( ABS(rn_bht_0) < 2._wp*TINY(1. e0) ) THEN238 IF( ABS(rn_bhtrc_0) < 2._wp*TINY(1. e0) ) THEN238 IF( ABS(rn_bht_0) < 2._wp*TINY(1._wp) ) THEN 239 IF( ABS(rn_bhtrc_0) < 2._wp*TINY(1._wp) ) THEN 239 240 rldf = 1.0_wp 240 241 ELSE 241 CALL ctl_stop( ' STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' )242 CALL ctl_stop( 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' ) 242 243 ENDIF 243 244 ELSE … … 246 247 ENDIF 247 248 ! 248 IF( ierr == 1 ) CALL ctl_stop( ' iso-level in z-coordinate - partial step, not allowed' ) 249 IF( ln_ldfeiv .AND. .NOT.ln_trcldf_iso ) & 250 CALL ctl_stop( ' eddy induced velocity on tracers', & 251 & ' the eddy induced velocity on tracers requires isopycnal laplacian diffusion' ) 252 IF( nldf == 1 .OR. nldf == 3 ) THEN ! rotation 253 IF( .NOT.l_ldfslp ) CALL ctl_stop( ' the rotation of the diffusive tensor require l_ldfslp' ) 254 ENDIF 249 IF( ierr == 1 ) CALL ctl_stop( 'trc_ldf_ctl: iso-level in z-partial step, not allowed' ) 250 IF( ln_ldfeiv .AND. .NOT.ln_trcldf_iso ) CALL ctl_stop( 'trc_ldf_ctl: eiv requires isopycnal laplacian diffusion' ) 251 IF( nldf == 1 .OR. nldf == 3 ) l_ldfslp = .TRUE. ! slope of neutral surfaces required 255 252 ! 256 253 IF(lwp) THEN 257 254 WRITE(numout,*) 258 IF( nldf == np_no_ldf ) WRITE(numout,*) ' NO lateral diffusion' 259 IF( nldf == np_lap ) WRITE(numout,*) ' laplacian iso-level operator' 260 IF( nldf == np_lap_i ) WRITE(numout,*) ' Rotated laplacian operator (standard)' 261 IF( nldf == np_lap_it ) WRITE(numout,*) ' Rotated laplacian operator (triad)' 262 IF( nldf == np_blp ) WRITE(numout,*) ' bilaplacian iso-level operator' 263 IF( nldf == np_blp_i ) WRITE(numout,*) ' Rotated bilaplacian operator (standard)' 264 IF( nldf == np_blp_it ) WRITE(numout,*) ' Rotated bilaplacian operator (triad)' 255 SELECT CASE( nldf ) 256 CASE( np_no_ldf ) ; WRITE(numout,*) ' NO lateral diffusion' 257 CASE( np_lap ) ; WRITE(numout,*) ' laplacian iso-level operator' 258 CASE( np_lap_i ) ; WRITE(numout,*) ' Rotated laplacian operator (standard)' 259 CASE( np_lap_it ) ; WRITE(numout,*) ' Rotated laplacian operator (triad)' 260 CASE( np_blp ) ; WRITE(numout,*) ' bilaplacian iso-level operator' 261 CASE( np_blp_i ) ; WRITE(numout,*) ' Rotated bilaplacian operator (standard)' 262 CASE( np_blp_it ) ; WRITE(numout,*) ' Rotated bilaplacian operator (triad)' 263 END SELECT 265 264 ENDIF 266 265 ! -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r5656 r6060 101 101 WRITE(numout,*) 'trc_nxt : time stepping on passive tracers' 102 102 ENDIF 103 103 ! 104 104 #if defined key_agrif 105 105 CALL Agrif_trc ! AGRIF zoom boundaries 106 106 #endif 107 ! Update after tracer on domain lateral boundaries 108 DO jn = 1, jptra 107 DO jn = 1, jptra ! Update after tracer on domain lateral boundaries 109 108 CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) 110 109 END DO 111 112 113 110 #if defined key_bdy 114 !! CALL bdy_trc( kt ) 111 !! CALL bdy_trc( kt ) ! BDY open boundaries 115 112 #endif 116 113 117 118 ! set time step size (Euler/Leapfrog) 114 ! ! set time step size (Euler/Leapfrog) 119 115 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ; r2dt(:) = rdttrc(:) ! at nittrc000 (Euler) 120 116 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ; r2dt(:) = 2.* rdttrc(:) ! at nit000 or nit000+1 (Leapfrog) 121 117 ENDIF 122 118 123 ! trends computation initialisation 124 IF( l_trdtrc ) THEN 125 CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrdt ) !* store now fields before applying the Asselin filter 119 IF( l_trdtrc ) THEN ! trends: store now fields before the Asselin filter application 120 CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrdt ) 126 121 ztrdt(:,:,:,:) = trn(:,:,:,:) 127 122 ENDIF 128 ! Leap-Frog + Asselin filter time stepping 129 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! Euler time-stepping at first time-step 130 ! ! (only swap) 123 ! ! Leap-Frog + Asselin filter time stepping 124 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! Euler time-stepping at first time-step (only swap) 131 125 DO jn = 1, jptra 132 126 DO jk = 1, jpkm1 … … 134 128 END DO 135 129 END DO 136 ! 137 ELSE 138 ! Leap-Frog + Asselin filter time stepping 139 IF( lk_vvl ) THEN ; CALL tra_nxt_vvl( kt, nittrc000, rdttrc, 'TRC', trb, trn, tra, & 140 & sbc_trc, sbc_trc_b, jptra ) ! variable volume level (vvl) 141 ELSE ; CALL tra_nxt_fix( kt, nittrc000, 'TRC', trb, trn, tra, jptra ) ! fixed volume level 130 ELSE ! Asselin filter + swap 131 IF( ln_linssh ) THEN ; CALL tra_nxt_fix( kt, nittrc000, 'TRC', trb, trn, tra, jptra ) ! linear ssh 132 ELSE ; CALL tra_nxt_vvl( kt, nittrc000, rdttrc, 'TRC', trb, trn, tra, & 133 & sbc_trc, sbc_trc_b, jptra ) ! non-linear ssh 142 134 ENDIF 135 ! 136 DO jn = 1, jptra 137 CALL lbc_lnk( trb(:,:,:,jn), 'T', 1._wp ) 138 CALL lbc_lnk( trn(:,:,:,jn), 'T', 1._wp ) 139 CALL lbc_lnk( tra(:,:,:,jn), 'T', 1._wp ) 140 END DO 143 141 ENDIF 144 145 ! trends computation 146 IF( l_trdtrc ) THEN ! trends 142 ! 143 IF( l_trdtrc ) THEN ! trends: send Asselin filter trends to trdtra manager for further diagnostics 147 144 DO jn = 1, jptra 148 145 DO jk = 1, jpkm1 149 zfact = 1. e0/ r2dt(jk)146 zfact = 1._wp / r2dt(jk) 150 147 ztrdt(:,:,jk,jn) = ( trb(:,:,jk,jn) - ztrdt(:,:,jk,jn) ) * zfact 151 148 CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt ) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r5836 r6060 31 31 32 32 !! * Substitutions 33 # include "domzgr_substitute.h90"34 33 # include "vectopt_loop_substitute.h90" 35 34 !!---------------------------------------------------------------------- … … 76 75 ! 77 76 ! Allocate temporary workspace 78 CALL wrk_alloc( jpi, jpj,zsfx )79 IF( l_trdtrc ) CALL wrk_alloc( jpi, jpj, jpk,ztrtrd )77 CALL wrk_alloc( jpi,jpj, zsfx ) 78 IF( l_trdtrc ) CALL wrk_alloc( jpi,jpj,jpk, ztrtrd ) 80 79 ! 81 80 zrtrn = 1.e-15_wp … … 129 128 ! Coupling offline : runoff are in emp which contains E-P-R 130 129 ! 131 IF( .NOT. lk_offline .AND. lk_vvl) THEN ! online coupling with vvl130 IF( .NOT. lk_offline .AND. .NOT.ln_linssh ) THEN ! online coupling with vvl 132 131 zsfx(:,:) = 0._wp 133 132 ELSE ! online coupling free surface or offline with free surface … … 138 137 DO jn = 1, jptra 139 138 ! 140 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends 141 ! ! add the trend to the general tracer trend 139 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends 142 140 143 141 IF ( nn_ice_tr == -1 ) THEN ! No tracers in sea ice (null concentration in sea ice) … … 153 151 DO jj = 2, jpj 154 152 DO ji = fs_2, fs_jpim1 ! vector opt. 155 zse3t = 1. / fse3t(ji,jj,1)153 zse3t = 1. / e3t_n(ji,jj,1) 156 154 ! tracer flux at the ice/ocean interface (tracer/m2/s) 157 155 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice … … 174 172 DO jj = 2, jpj 175 173 DO ji = fs_2, fs_jpim1 ! vector opt. 176 zse3t = zfact / fse3t(ji,jj,1)174 zse3t = zfact / e3t_n(ji,jj,1) 177 175 tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 178 176 END DO … … 203 201 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 204 202 ENDIF 205 CALL wrk_dealloc( jpi, jpj,zsfx )206 IF( l_trdtrc ) CALL wrk_dealloc( jpi, jpj, jpk,ztrtrd )203 CALL wrk_dealloc( jpi,jpj, zsfx ) 204 IF( l_trdtrc ) CALL wrk_dealloc( jpi,jpj,jpk, ztrtrd ) 207 205 ! 208 206 IF( nn_timing == 1 ) CALL timing_stop('trc_sbc') -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r5836 r6060 40 40 41 41 !! * Substitutions 42 # include "domzgr_substitute.h90"43 42 # include "zdfddm_substitute.h90" 44 43 # include "vectopt_loop_substitute.h90" -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
r5836 r6060 66 66 67 67 !! * Substitutions 68 # include "domzgr_substitute.h90"69 68 # include "zdfddm_substitute.h90" 70 69 !!---------------------------------------------------------------------- … … 175 174 DO jj = 1, jpj 176 175 DO ji = 1, jpi 177 IF( jk - nmld_trc(ji,jj) < 0 ) wkx_trc(ji,jj,jk) = fse3t(ji,jj,jk) * tmask(ji,jj,jk)176 IF( jk - nmld_trc(ji,jj) < 0 ) wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk) 178 177 END DO 179 178 END DO … … 293 292 DO jj = 1,jpj 294 293 DO ji = 1,jpi 295 IF( jk - nmld_trc(ji,jj) < 0. ) wkx_trc(ji,jj,jk) = fse3t(ji,jj,jk) * tmask(ji,jj,jk)294 IF( jk - nmld_trc(ji,jj) < 0. ) wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk) 296 295 END DO 297 296 END DO … … 417 416 DO jn = 1, jptra 418 417 IF( ln_trdtrc(jn) ) & 419 tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - zavt / fse3w(ji,jj,ik) * tmask(ji,jj,ik) &418 tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - zavt / e3w_n(ji,jj,ik) * tmask(ji,jj,ik) & 420 419 & * ( trn(ji,jj,ik-1,jn) - trn(ji,jj,ik,jn) ) & 421 420 & / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1) -
branches/2015/dev_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
r5341 r6060 21 21 22 22 INTEGER :: nummldw_trc ! logical unit for mld restart 23 23 24 !!--------------------------------------------------------------------------------- 24 25 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 26 27 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 27 28 !!--------------------------------------------------------------------------------- 28 29 29 CONTAINS 30 31 30 32 31 SUBROUTINE trd_mxl_trc_rst_write( kt )
Note: See TracChangeset
for help on using the changeset viewer.