Changeset 2149
- Timestamp:
- 2010-10-04T15:53:47+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/OBC/obcini.F90
r2065 r2149 375 375 END IF 376 376 377 IF ( ln_vol_cst .OR. lk_dynspg_flt ) THEN 378 ! ... Initialize obcumask and obcvmask for the Force filtering 379 ! boundary condition in dynspg_flt 380 obcumask(:,:) = umask(:,:,1) 381 obcvmask(:,:) = vmask(:,:,1) 382 383 ! ... Initialize obctmsk on overlap region and obcs. This mask 384 ! is used in obcvol.F90 to calculate cumulate flux E-P. 385 ! obc Tracer point are outside the domain ( U/V obc points) ==> masked by obctmsk 386 ! - no flux E-P on obcs and overlap region (jpreci = jprecj = 1) 387 obctmsk(:,:) = tmask_i(:,:) 388 389 IF( lp_obc_east ) THEN 390 ! ... East obc Force filtering mask for the grad D 391 obcumask(nie0 :nie1 ,nje0p1:nje1m1) = 0.e0 392 obcvmask(nie0p1:nie1p1,nje0p1:nje1m1) = 0.e0 393 ! ... set to 0 on East OBC 394 obctmsk(nie0p1:nie1p1,nje0:nje1) = 0.e0 395 END IF 396 397 IF( lp_obc_west ) THEN 398 ! ... West obc Force filtering mask for the grad D 399 obcumask(niw0:niw1,njw0:njw1) = 0.e0 400 obcvmask(niw0:niw1,njw0:njw1) = 0.e0 401 ! ... set to 0 on West OBC 402 obctmsk(niw0:niw1,njw0:njw1) = 0.e0 403 END IF 404 405 IF( lp_obc_north ) THEN 406 ! ... North obc Force filtering mask for the grad D 407 obcumask(nin0p1:nin1m1,njn0p1:njn1p1) = 0.e0 408 obcvmask(nin0p1:nin1m1,njn0 :njn1 ) = 0.e0 409 ! ... set to 0 on North OBC 410 obctmsk(nin0:nin1,njn0p1:njn1p1) = 0.e0 411 END IF 412 413 IF( lp_obc_south ) THEN 414 ! ... South obc Force filtering mask for the grad D 415 obcumask(nis0p1:nis1m1,njs0:njs1) = 0.e0 416 obcvmask(nis0p1:nis1m1,njs0:njs1) = 0.e0 417 ! ... set to 0 on South OBC 418 obctmsk(nis0:nis1,njs0:njs1) = 0.e0 419 END IF 420 ENDIF 421 422 IF ( ln_vol_cst .OR. lk_dynspg_flt ) THEN 423 424 ! 3.1 Total lateral surface 425 ! ------------------------- 426 obcsurftot = 0.e0 427 428 IF( lp_obc_east ) THEN ! ... East open boundary lateral surface 429 DO ji = nie0, nie1 430 DO jj = 1, jpj 431 obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uemsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 432 END DO 377 ! ... Initialize obcumask and obcvmask for the Force filtering 378 ! boundary condition in dynspg_flt 379 obcumask(:,:) = umask(:,:,1) 380 obcvmask(:,:) = vmask(:,:,1) 381 382 ! ... Initialize obctmsk on overlap region and obcs. This mask 383 ! is used in obcvol.F90 to calculate cumulate flux E-P. 384 ! obc Tracer point are outside the domain ( U/V obc points) ==> masked by obctmsk 385 ! - no flux E-P on obcs and overlap region (jpreci = jprecj = 1) 386 obctmsk(:,:) = tmask_i(:,:) 387 388 IF( lp_obc_east ) THEN 389 ! ... East obc Force filtering mask for the grad D 390 obcumask(nie0 :nie1 ,nje0p1:nje1m1) = 0.e0 391 obcvmask(nie0p1:nie1p1,nje0p1:nje1m1) = 0.e0 392 ! ... set to 0 on East OBC 393 obctmsk(nie0p1:nie1p1,nje0:nje1) = 0.e0 394 END IF 395 396 IF( lp_obc_west ) THEN 397 ! ... West obc Force filtering mask for the grad D 398 obcumask(niw0:niw1,njw0:njw1) = 0.e0 399 obcvmask(niw0:niw1,njw0:njw1) = 0.e0 400 ! ... set to 0 on West OBC 401 obctmsk(niw0:niw1,njw0:njw1) = 0.e0 402 END IF 403 404 IF( lp_obc_north ) THEN 405 ! ... North obc Force filtering mask for the grad D 406 obcumask(nin0p1:nin1m1,njn0p1:njn1p1) = 0.e0 407 obcvmask(nin0p1:nin1m1,njn0 :njn1 ) = 0.e0 408 ! ... set to 0 on North OBC 409 obctmsk(nin0:nin1,njn0p1:njn1p1) = 0.e0 410 END IF 411 412 IF( lp_obc_south ) THEN 413 ! ... South obc Force filtering mask for the grad D 414 obcumask(nis0p1:nis1m1,njs0:njs1) = 0.e0 415 obcvmask(nis0p1:nis1m1,njs0:njs1) = 0.e0 416 ! ... set to 0 on South OBC 417 obctmsk(nis0:nis1,njs0:njs1) = 0.e0 418 END IF 419 420 ! 3.1 Total lateral surface 421 ! ------------------------- 422 obcsurftot = 0.e0 423 424 IF( lp_obc_east ) THEN ! ... East open boundary lateral surface 425 DO ji = nie0, nie1 426 DO jj = 1, jpj 427 obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uemsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 433 428 END DO 434 END IF435 436 IF( lp_obc_west ) THEN ! ... West open boundary lateral surface 437 DO ji = niw0, niw1438 DO jj = 1, jpj439 obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uwmsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )440 END DO429 END DO 430 END IF 431 432 IF( lp_obc_west ) THEN ! ... West open boundary lateral surface 433 DO ji = niw0, niw1 434 DO jj = 1, jpj 435 obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uwmsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 441 436 END DO 442 END IF443 IF( lp_obc_north ) THEN ! ... North open boundary lateral surface444 DO jj = njn0, njn1445 DO ji = 1, jpi446 obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vnmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )447 END DO437 END DO 438 END IF 439 IF( lp_obc_north ) THEN ! ... North open boundary lateral surface 440 DO jj = njn0, njn1 441 DO ji = 1, jpi 442 obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vnmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) ) 448 443 END DO 449 END IF450 451 IF( lp_obc_south ) THEN ! ... South open boundary lateral surface 452 DO jj = njs0, njs1453 DO ji = 1, jpi454 obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vsmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )455 END DO444 END DO 445 END IF 446 447 IF( lp_obc_south ) THEN ! ... South open boundary lateral surface 448 DO jj = njs0, njs1 449 DO ji = 1, jpi 450 obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vsmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) ) 456 451 END DO 457 END IF458 459 IF( lk_mpp ) CALL mpp_sum( obcsurftot ) ! sum over the global domain 460 ENDIF452 END DO 453 END IF 454 455 IF( lk_mpp ) CALL mpp_sum( obcsurftot ) ! sum over the global domain 461 456 462 457 ! 5. Control print on mask
Note: See TracChangeset
for help on using the changeset viewer.