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 2128 for branches/devukmo2010/NEMO/OPA_SRC/DYN/divcur.F90 – NEMO

Ignore:
Timestamp:
2010-09-28T14:29:51+02:00 (14 years ago)
Author:
rfurner
Message:

merged branches OBS, ASM, Rivers, BDY & mixed_dynldf ready for vn3.3 merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devukmo2010/NEMO/OPA_SRC/DYN/divcur.F90

    r1792 r2128  
    1414   USE in_out_manager  ! I/O manager 
    1515   USE obc_oce         ! ocean lateral open boundary condition 
    16    USE bdy_oce        ! Unstructured open boundaries variables 
    1716   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     17   USE sbcrnf, ONLY  : rnf_dep, rnf_mod_dep  ! River runoff 
     18   USE phycst,  ONLY : rau0                  ! physical constant 
     19   USE sbc_oce, ONLY : ln_rnf, rnf           ! surface boundary condition: ocean 
    1820 
    1921   IMPLICIT NONE 
     
    7981      !!   9.0  !  03-08  (G. Madec)  merged of cur and div, free form, F90 
    8082      !!        !  05-01  (J. Chanut, A. Sellar) unstructured open boundaries 
     83      !! NEMO 3.3  !  2010-09  (D.Storkey and E.O'Dea) bug fixes for BDY module 
    8184      !!---------------------------------------------------------------------- 
    8285      !! * Arguments 
     
    8992      REAL(wp), DIMENSION(   jpi  ,1:jpj+2) ::   zwu   ! workspace 
    9093      REAL(wp), DIMENSION(-1:jpi+2,  jpj  ) ::   zwv   ! workspace 
     94      REAL(wp) ::  zraur,  zdep   ! temporary scalar 
    9195      !!---------------------------------------------------------------------- 
    9296 
     
    131135            IF( lp_obc_south )   hdivn(nis0  :nis1  ,njs0  :njs1  ,jk) = 0.e0      ! south 
    132136         ENDIF 
    133 #endif          
    134 #if defined key_bdy 
    135          ! unstructured open boundaries (div must be zero behind the open boundary) 
    136          DO jj = 1, jpj 
    137             DO ji = 1, jpi 
    138                hdivn(ji,jj,jk)=hdivn(ji,jj,jk)*bdytmask(ji,jj) 
    139             END DO 
    140          END DO 
    141137#endif          
    142138         IF( .NOT. AGRIF_Root() ) THEN 
     
    244240      END DO                                           !   End of slab 
    245241      !                                                ! =============== 
     242 
     243      IF ( ln_rnf ) THEN 
     244      zraur = 1. / rau0 
     245        DO ji=1,jpi 
     246          DO jj=1,jpj 
     247            zdep = 1. / rnf_dep(ji,jj) 
     248            DO jk=1,rnf_mod_dep(ji,jj) 
     249              hdivn(ji,jj,jk) = hdivn(ji,jj,jk) - rnf(ji,jj)*zraur*zdep 
     250            ENDDO 
     251          ENDDO 
     252        ENDDO 
     253      ENDIF 
    246254       
    247255      ! 4. Lateral boundary conditions on hdivn and rotn 
     
    301309      !! * Local declarations 
    302310      INTEGER  ::   ji, jj, jk          ! dummy loop indices 
     311      REAL(wp) ::  zraur,  zdep   ! temporary scalar 
    303312      !!---------------------------------------------------------------------- 
    304313 
     
    344353         ENDIF 
    345354#endif          
    346 #if defined key_bdy 
    347          ! unstructured open boundaries (div must be zero behind the open boundary) 
    348          DO jj = 1, jpj 
    349            DO ji = 1, jpi 
    350              hdivn(ji,jj,jk)=hdivn(ji,jj,jk)*bdytmask(ji,jj) 
    351            END DO 
    352          END DO 
    353 #endif         
    354355         IF( .NOT. AGRIF_Root() ) THEN 
    355356            IF ((nbondi ==  1).OR.(nbondi == 2)) hdivn(nlci-1 , :     ,jk) = 0.e0      ! east 
     
    372373      END DO                                           !   End of slab 
    373374      !                                                ! =============== 
    374        
     375 
     376      IF ( ln_rnf ) THEN 
     377      zraur = 1. / rau0 
     378        DO ji=1,jpi 
     379          DO jj=1,jpj 
     380            zdep = 1. / rnf_dep(ji,jj) 
     381            DO jk=1,rnf_mod_dep(ji,jj) 
     382              hdivn(ji,jj,jk) = hdivn(ji,jj,jk) - rnf(ji,jj)*zraur*zdep 
     383            ENDDO 
     384          ENDDO 
     385        ENDDO 
     386      ENDIF 
     387 
    375388      ! 4. Lateral boundary conditions on hdivn and rotn 
    376389      ! ---------------------------------=======---====== 
Note: See TracChangeset for help on using the changeset viewer.