Ignore:
Timestamp:
02/13/12 19:45:12 (12 years ago)
Author:
rblod
Message:

Add possibility to choose where to apply the barotropic correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcini.F90

    r18 r23  
    423423      ! 3.1 Total lateral surface  
    424424      ! ------------------------- 
     425      obcsurfeast  = 0.e0       ;       obcsurfwest  = 0.e0    
     426      obcsurfnorth = 0.e0       ;       obcsurfsouth = 0.e0    
    425427      obcsurftot = 0.e0 
    426428 
    427       IF( lp_obc_east ) THEN ! ... East open boundary lateral surface 
     429      IF( lp_obc_east .AND. lp_obc_east_barotp_corr ) THEN ! ... East open boundary lateral surface 
    428430         DO ji = nie0, nie1 
    429431            DO jj = 1, jpj  
    430                obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uemsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 
     432               obcsurfeast = obcsurfeast+hu(ji,jj)*e2u(ji,jj)*uemsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 
    431433            END DO 
    432434         END DO 
    433       END IF 
    434  
    435       IF( lp_obc_west ) THEN ! ... West open boundary lateral surface 
     435         obcsurftot = obcsurftot + obcsurfeast 
     436      END IF 
     437 
     438      IF( lp_obc_west .AND. lp_obc_west_barotp_corr ) THEN ! ... West open boundary lateral surface 
    436439         DO ji = niw0, niw1 
    437440            DO jj = 1, jpj  
    438                obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uwmsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 
     441               obcsurfwest = obcsurfwest+hu(ji,jj)*e2u(ji,jj)*uwmsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) ) 
    439442            END DO 
    440443         END DO 
    441       END IF 
    442  
    443       IF( lp_obc_north ) THEN ! ... North open boundary lateral surface 
     444         obcsurftot = obcsurftot + obcsurfwest 
     445      END IF 
     446 
     447      IF( lp_obc_north .AND. lp_obc_north_barotp_corr ) THEN ! ... North open boundary lateral surface 
    444448         DO jj = njn0, njn1 
    445449            DO ji = 1, jpi 
    446                obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vnmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) ) 
     450               obcsurfnorth = obcsurfnorth+hv(ji,jj)*e1v(ji,jj)*vnmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) ) 
    447451            END DO 
    448452         END DO 
    449       END IF 
    450  
    451       IF( lp_obc_south ) THEN ! ... South open boundary lateral surface 
     453         obcsurftot = obcsurftot + obcsurfnorth 
     454      END IF 
     455 
     456      IF( lp_obc_south .AND. lp_obc_south_barotp_corr ) THEN ! ... South open boundary lateral surface 
    452457         DO jj = njs0, njs1 
    453458            DO ji = 1, jpi 
    454                obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vsmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) ) 
     459               obcsurfsouth = obcsurfsouth+hv(ji,jj)*e1v(ji,jj)*vsmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) ) 
    455460            END DO 
    456461         END DO 
     462         obcsurftot = obcsurftot + obcsurfsouth 
    457463      END IF 
    458464 
Note: See TracChangeset for help on using the changeset viewer.