New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90

    • Property svn:executable deleted
    r1739 r2528  
    1111#if   defined key_bdy   &&   defined key_dynspg_flt 
    1212   !!---------------------------------------------------------------------- 
    13    !!   'key_bdy'            and      unstructured open boundary conditions 
     13   !!   'key_bdy'            AND      unstructured open boundary conditions 
    1414   !!   'key_dynspg_flt'                              filtered free surface 
    1515   !!---------------------------------------------------------------------- 
     
    3030#  include "domzgr_substitute.h90" 
    3131   !!---------------------------------------------------------------------- 
    32    !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008)  
     32   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3333   !! $Id$  
    34    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     34   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    3535   !!---------------------------------------------------------------------- 
    36  
    3736CONTAINS 
    3837 
     
    6261      !!            zero (z_cflxemp=0) to calculate the correction velocity. So 
    6362      !!            it will only balance the flux through open boundaries. 
    64       !!            (set volbdy to 0 in tne namelist for this option) 
     63      !!            (set nn_volctl to 0 in tne namelist for this option) 
    6564      !!         2/ The volume is constant even with E-P flux. In this case 
    6665      !!            the correction velocity must balance both the flux  
    6766      !!            through open boundaries and the ones through the free 
    6867      !!            surface.  
    69       !!            (set volbdy to 1 in tne namelist for this option) 
     68      !!            (set nn_volctl to 1 in tne namelist for this option) 
    7069      !!---------------------------------------------------------------------- 
    7170      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     
    7372      INTEGER  ::   ji, jj, jk, jb, jgrd 
    7473      INTEGER  ::   ii, ij 
    75       REAL(wp) ::   zubtpecor, z_cflxemp, ztranst, zraur 
     74      REAL(wp) ::   zubtpecor, z_cflxemp, ztranst 
    7675      !!----------------------------------------------------------------------------- 
     76 
     77      IF( ln_vol ) THEN 
    7778 
    7879      IF( kt == nit000 ) THEN  
     
    8485      ! Calculate the cumulate surface Flux z_cflxemp (m3/s) over all the domain 
    8586      ! ----------------------------------------------------------------------- 
    86       z_cflxemp = 0.e0 
    87       zraur = 1.e0 / rau0 
    88       z_cflxemp = SUM ( emp(:,:) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) * zraur ) 
    89       IF( lk_mpp )   CALL mpp_sum( z_cflxemp )   ! sum over the global domain 
     87      z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:) ) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) ) / rau0 
     88      IF( lk_mpp )   CALL mpp_sum( z_cflxemp )     ! sum over the global domain 
    9089 
    91       ! Barotropic velocity through the unstructured open boundary 
    92       ! ---------------------------------------------------------- 
     90      ! Transport through the unstructured open boundary 
     91      ! ------------------------------------------------ 
    9392      zubtpecor = 0.e0 
    9493      jgrd = 2                               ! cumulate u component contribution first  
     
    112111      ! The normal velocity correction 
    113112      ! ------------------------------ 
    114       IF (volbdy==1) THEN   ;   zubtpecor = ( zubtpecor - z_cflxemp) / bdysurftot  
    115       ELSE                  ;   zubtpecor =   zubtpecor             / bdysurftot 
     113      IF( nn_volctl==1 ) THEN   ;   zubtpecor = ( zubtpecor - z_cflxemp) / bdysurftot  
     114      ELSE                   ;   zubtpecor =   zubtpecor             / bdysurftot 
    116115      END IF 
    117116 
     
    141140      ! Check the cumulated transport through unstructured OBC once barotropic velocities corrected 
    142141      ! ------------------------------------------------------ 
    143  
    144142      IF( lwp .AND. MOD( kt, nwrite ) == 0) THEN 
    145143         IF(lwp) WRITE(numout,*) 
     
    152150      END IF  
    153151      ! 
     152      END IF ! ln_vol 
     153 
    154154   END SUBROUTINE bdy_vol 
    155155 
Note: See TracChangeset for help on using the changeset viewer.