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 780 – NEMO

Changeset 780


Ignore:
Timestamp:
2007-12-22T18:05:57+01:00 (16 years ago)
Author:
rblod
Message:

Correct a critical bug in divergence computation for AGRIF case, see ticket #40

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DYN/divcur.F90

    r719 r780  
    2727   !!---------------------------------------------------------------------- 
    2828   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    29    !! $Header$  
     29   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/DYN/divcur.F90,v 1.7 2006/05/10 16:53:51 opalod Exp $  
    3030   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    3131   !!---------------------------------------------------------------------- 
     
    122122 
    123123#if defined key_obc 
     124#if defined key_agrif 
     125         IF (Agrif_Root() ) THEN 
     126#endif 
    124127         ! open boundaries (div must be zero behind the open boundary) 
    125128         !  mpp remark: The zeroing of hdivn can probably be extended to 1->jpi/jpj for the correct row/column 
     
    128131         IF( lp_obc_north )   hdivn(nin0  :nin1  ,njn0p1:njn1p1,jk) = 0.e0      ! north 
    129132         IF( lp_obc_south )   hdivn(nis0  :nis1  ,njs0  :njs1  ,jk) = 0.e0      ! south 
     133#if defined key_agrif 
     134         ENDIF 
     135#endif 
    130136#endif          
     137#if defined key_agrif 
     138         if ( .NOT. AGRIF_Root() ) then 
     139           IF ((nbondi ==  1).OR.(nbondi == 2)) hdivn(nlci-1 , :     ,jk) = 0.e0      ! east 
     140           IF ((nbondi == -1).OR.(nbondi == 2)) hdivn(2      , :     ,jk) = 0.e0      ! west 
     141           IF ((nbondj ==  1).OR.(nbondj == 2)) hdivn(:      ,nlcj-1 ,jk) = 0.e0      ! north 
     142           IF ((nbondj == -1).OR.(nbondj == 2)) hdivn(:      ,2      ,jk) = 0.e0      ! south 
     143         endif 
     144#endif     
    131145 
    132146         !                                             ! -------- 
     
    317331 
    318332#if defined key_obc 
     333#if defined key_agrif 
     334         IF ( Agrif_Root() ) THEN 
     335#endif 
    319336         ! open boundaries (div must be zero behind the open boundary) 
    320337         !  mpp remark: The zeroing of hdivn can probably be extended to 1->jpi/jpj for the correct row/column 
     
    323340         IF( lp_obc_north )   hdivn(nin0  :nin1  ,njn0p1:njn1p1,jk) = 0.e0      ! north 
    324341         IF( lp_obc_south )   hdivn(nis0  :nis1  ,njs0  :njs1  ,jk) = 0.e0      ! south 
     342#if defined key_agrif 
     343         ENDIF 
     344#endif 
    325345#endif          
     346#if defined key_agrif 
     347         if ( .NOT. AGRIF_Root() ) then 
     348            IF ((nbondi ==  1).OR.(nbondi == 2)) hdivn(nlci-1 , :     ,jk) = 0.e0      ! east 
     349            IF ((nbondi == -1).OR.(nbondi == 2)) hdivn(2      , :     ,jk) = 0.e0      ! west 
     350            IF ((nbondj ==  1).OR.(nbondj == 2)) hdivn(:      ,nlcj-1 ,jk) = 0.e0      ! north 
     351            IF ((nbondj == -1).OR.(nbondj == 2)) hdivn(:      ,2      ,jk) = 0.e0      ! south 
     352         endif 
     353#endif     
     354 
    326355         !                                             ! -------- 
    327356         ! relative vorticity                          !   rot  
Note: See TracChangeset for help on using the changeset viewer.