Changeset 97
 Timestamp:
 20040625T10:20:25+02:00 (20 years ago)
 Location:
 trunk/NEMO/OPA_SRC/TRA
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/NEMO/OPA_SRC/TRA/traadv_muscl.F90
r67 r97 79 79 REAL(wp) :: zu, zv, zw, zeu, zev, zew, zbtr, zstep, zta, zsa 80 80 REAL(wp) :: z0u, z0v, z0w 81 REAL(wp) :: z1u, z1v, z1w82 81 REAL(wp) :: zzt1, zzt2, zalpha 83 82 REAL(wp) :: zzs1, zzs2 … … 138 137 DO jk = 1, jpkm1 139 138 DO jj = 2, jpj 140 DO ji = fs_2, fs_jpim1 ! vector opt. 141 z0u = zt1(ji,jj,jk) * zt1(ji1,jj,jk) 142 IF( z0u > 0. ) THEN 143 ztp1(ji,jj,jk) = 0.5 * ( zt1(ji,jj,jk)+zt1(ji1,jj,jk) ) 144 ELSE 145 ztp1(ji,jj,jk) = 0.e0 146 ENDIF 147 z1u = zs1(ji,jj,jk) * zs1(ji1,jj,jk) 148 IF( z1u > 0. ) THEN 149 zsp1(ji,jj,jk) = 0.5 * ( zs1(ji,jj,jk)+zs1(ji1,jj,jk) ) 150 ELSE 151 zsp1(ji,jj,jk) = 0.e0 152 ENDIF 153 154 z0v = zt2(ji,jj,jk) * zt2(ji,jj1,jk) 155 IF( z0v > 0. ) THEN 156 ztp2(ji,jj,jk) = 0.5 * ( zt2(ji,jj,jk)+zt2(ji,jj1,jk) ) 157 ELSE 158 ztp2(ji,jj,jk) = 0.e0 159 ENDIF 160 z1v = zs2(ji,jj,jk) * zs2(ji,jj1,jk) 161 IF( z1v > 0. ) THEN 162 zsp2(ji,jj,jk) = 0.5 * ( zs2(ji,jj,jk)+zs2(ji,jj1,jk) ) 163 ELSE 164 zsp2(ji,jj,jk) = 0.e0 165 ENDIF 139 DO ji = fs_2, jpi ! vector opt. 140 ztp1(ji,jj,jk) = ( zt1(ji,jj,jk) + zt1(ji1,jj ,jk) ) & 141 & * ( 0.25 + SIGN( 0.25, zt1(ji,jj,jk) * zt1(ji1,jj ,jk) ) ) 142 zsp1(ji,jj,jk) = ( zs1(ji,jj,jk) + zs1(ji1,jj ,jk) ) & 143 & * ( 0.25 + SIGN( 0.25, zs1(ji,jj,jk) * zs1(ji1,jj ,jk) ) ) 144 ztp2(ji,jj,jk) = ( zt2(ji,jj,jk) + zt2(ji ,jj1,jk) ) & 145 & * ( 0.25 + SIGN( 0.25, zt2(ji,jj,jk) * zt2(ji ,jj1,jk) ) ) 146 zsp2(ji,jj,jk) = ( zs2(ji,jj,jk) + zs2(ji ,jj1,jk) ) & 147 & * ( 0.25 + SIGN( 0.25, zs2(ji,jj,jk) * zs2(ji ,jj1,jk) ) ) 166 148 END DO 167 149 END DO … … 171 153 zsp1(:,:,jpk) = 0.e0 ; zsp2(:,:,jpk) = 0.e0 172 154 173 ! Slopes limitation155 ! Slopes limitation 174 156 DO jk = 1, jpkm1 175 157 DO jj = 2, jpj 176 DO ji = fs_2, fs_jpim1! vector opt.158 DO ji = fs_2, jpi ! vector opt. 177 159 ztp1(ji,jj,jk) = SIGN( 1., ztp1(ji,jj,jk) ) & 178 160 & * MIN( ABS( ztp1(ji ,jj,jk) ), & … … 285 267 END DO 286 268 269 IF(l_ctl) THEN 270 zta = SUM( ta(2:jpim1,2:jpjm1,1:jpkm1) * tmask(2:jpim1,2:jpjm1,1:jpkm1) ) 271 zsa = SUM( sa(2:jpim1,2:jpjm1,1:jpkm1) * tmask(2:jpim1,2:jpjm1,1:jpkm1) ) 272 WRITE(numout,*) ' had  Ta: ', ztat_ctl, ' Sa: ', zsas_ctl, ' muscl' 273 t_ctl = zta ; s_ctl = zsa 274 ENDIF 275 287 276 #if defined key_diaptr 288 277 ! "zonal" mean advective heat and salt transport … … 324 313 DO jj = 1, jpj 325 314 DO ji = 1, jpi 326 z0w = zt1(ji,jj,jk) * zt1(ji,jj,jk+1) 327 IF( z0w > 0. ) THEN 328 ztp1(ji,jj,jk) = 0.5 * ( zt1(ji,jj,jk) + zt1(ji,jj,jk+1) ) 329 ELSE 330 ztp1(ji,jj,jk) = 0.e0 331 ENDIF 332 z1w = zs1(ji,jj,jk) * zs1(ji,jj,jk+1) 333 IF( z1w > 0. ) THEN 334 zsp1(ji,jj,jk) = 0.5 * ( zs1(ji,jj,jk) + zs1(ji,jj,jk+1) ) 335 ELSE 336 zsp1(ji,jj,jk) = 0.e0 337 ENDIF 315 ztp1(ji,jj,jk) = ( zt1(ji,jj,jk) + zt1(ji,jj,jk+1) ) & 316 & * ( 0.25 + SIGN( 0.25, zt1(ji,jj,jk) * zt1(ji,jj,jk+1) ) ) 317 zsp1(ji,jj,jk) = ( zs1(ji,jj,jk) + zs1(ji,jj,jk+1) ) & 318 & * ( 0.25 + SIGN( 0.25, zs1(ji,jj,jk) * zs1(ji,jj,jk+1) ) ) 338 319 END DO 339 320 END DO … … 357 338 END DO 358 339 ! surface values 359 ztp1(:,:,1) = 0. 360 zsp1(:,:,1) = 0. 340 ztp1(:,:,1) = 0.e0 341 zsp1(:,:,1) = 0.e0 361 342 362 343 ! vertical advective flux 
trunk/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
r67 r97 80 80 REAL(wp) :: zu, zv, zw, zeu, zev, zew, zbtr, zstep, zta, zsa 81 81 REAL(wp) :: z0u, z0v, z0w 82 REAL(wp) :: z1u, z1v, z1w83 82 REAL(wp) :: zzt1, zzt2, zalpha 84 83 REAL(wp) :: zzs1, zzs2 … … 139 138 DO jk = 1, jpkm1 140 139 DO jj = 2, jpj 141 DO ji = fs_2, fs_jpim1 ! vector opt. 142 z0u = zt1(ji,jj,jk) * zt1(ji1,jj,jk) 143 IF( z0u > 0. ) THEN 144 ztp1(ji,jj,jk) = 0.5 * ( zt1(ji,jj,jk)+zt1(ji1,jj,jk) ) 145 ELSE 146 ztp1(ji,jj,jk) = 0.e0 147 ENDIF 148 z1u = zs1(ji,jj,jk) * zs1(ji1,jj,jk) 149 IF( z1u > 0. ) THEN 150 zsp1(ji,jj,jk) = 0.5 * ( zs1(ji,jj,jk)+zs1(ji1,jj,jk) ) 151 ELSE 152 zsp1(ji,jj,jk) = 0.e0 153 ENDIF 154 155 z0v = zt2(ji,jj,jk) * zt2(ji,jj1,jk) 156 IF( z0v > 0. ) THEN 157 ztp2(ji,jj,jk) = 0.5 * ( zt2(ji,jj,jk)+zt2(ji,jj1,jk) ) 158 ELSE 159 ztp2(ji,jj,jk) = 0.e0 160 ENDIF 161 z1v = zs2(ji,jj,jk) * zs2(ji,jj1,jk) 162 IF( z1v > 0. ) THEN 163 zsp2(ji,jj,jk) = 0.5 * ( zs2(ji,jj,jk)+zs2(ji,jj1,jk) ) 164 ELSE 165 zsp2(ji,jj,jk) = 0.e0 166 ENDIF 140 DO ji = fs_2, jpi ! vector opt. 141 ztp1(ji,jj,jk) = ( zt1(ji,jj,jk) + zt1(ji1,jj ,jk) ) & 142 & * ( 0.25 + SIGN( 0.25, zt1(ji,jj,jk) * zt1(ji1,jj ,jk) ) ) 143 zsp1(ji,jj,jk) = ( zs1(ji,jj,jk) + zs1(ji1,jj ,jk) ) & 144 & * ( 0.25 + SIGN( 0.25, zs1(ji,jj,jk) * zs1(ji1,jj ,jk) ) ) 145 ztp2(ji,jj,jk) = ( zt2(ji,jj,jk) + zt2(ji ,jj1,jk) ) & 146 & * ( 0.25 + SIGN( 0.25, zt2(ji,jj,jk) * zt2(ji ,jj1,jk) ) ) 147 zsp2(ji,jj,jk) = ( zs2(ji,jj,jk) + zs2(ji ,jj1,jk) ) & 148 & * ( 0.25 + SIGN( 0.25, zs2(ji,jj,jk) * zs2(ji ,jj1,jk) ) ) 167 149 END DO 168 150 END DO … … 172 154 zsp1(:,:,jpk) = 0.e0 ; zsp2(:,:,jpk) = 0.e0 173 155 174 ! Slopes limitation156 ! Slopes limitation 175 157 DO jk = 1, jpkm1 176 158 DO jj = 2, jpj 177 DO ji = fs_2, fs_jpim1! vector opt.159 DO ji = fs_2, jpi ! vector opt. 178 160 ztp1(ji,jj,jk) = SIGN( 1., ztp1(ji,jj,jk) ) & 179 161 & * MIN( ABS( ztp1(ji ,jj,jk) ), & … … 346 328 END DO 347 329 330 IF(l_ctl) THEN 331 zta = SUM( ta(2:jpim1,2:jpjm1,1:jpkm1) * tmask(2:jpim1,2:jpjm1,1:jpkm1) ) 332 zsa = SUM( sa(2:jpim1,2:jpjm1,1:jpkm1) * tmask(2:jpim1,2:jpjm1,1:jpkm1) ) 333 WRITE(numout,*) ' had  Ta: ', ztat_ctl, ' Sa: ', zsas_ctl, ' muscl' 334 t_ctl = zta ; s_ctl = zsa 335 ENDIF 336 348 337 #if defined key_diaptr 349 338 ! "zonal" mean advective heat and salt transport … … 384 373 DO jj = 1, jpj 385 374 DO ji = 1, jpi 386 z0w = zt1(ji,jj,jk) * zt1(ji,jj,jk+1) 387 IF( z0w > 0. ) THEN 388 ztp1(ji,jj,jk) = 0.5 * ( zt1(ji,jj,jk) + zt1(ji,jj,jk+1) ) 389 ELSE 390 ztp1(ji,jj,jk) = 0.e0 391 ENDIF 392 z1w = zs1(ji,jj,jk) * zs1(ji,jj,jk+1) 393 IF( z1w > 0. ) THEN 394 zsp1(ji,jj,jk) = 0.5 * ( zs1(ji,jj,jk) + zs1(ji,jj,jk+1) ) 395 ELSE 396 zsp1(ji,jj,jk) = 0.e0 397 ENDIF 375 ztp1(ji,jj,jk) = ( zt1(ji,jj,jk) + zt1(ji,jj,jk+1) ) & 376 & * ( 0.25 + SIGN( 0.25, zt1(ji,jj,jk) * zt1(ji,jj,jk+1) ) ) 377 zsp1(ji,jj,jk) = ( zs1(ji,jj,jk) + zs1(ji,jj,jk+1) ) & 378 & * ( 0.25 + SIGN( 0.25, zs1(ji,jj,jk) * zs1(ji,jj,jk+1) ) ) 398 379 END DO 399 380 END DO … … 417 398 END DO 418 399 ! surface values 419 ztp1(:,:,1) = 0. 420 zsp1(:,:,1) = 0. 400 ztp1(:,:,1) = 0.e0 401 zsp1(:,:,1) = 0.e0 421 402 422 403 ! vertical advective flux
Note: See TracChangeset
for help on using the changeset viewer.