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 911 for trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90 – NEMO

Ignore:
Timestamp:
2008-04-28T11:31:32+02:00 (16 years ago)
Author:
ctlod
Message:

Implementation of the BDY package, see ticket: #126

File:
1 edited

Legend:

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

    r888 r911  
    77   !!             " "  !  05-11  (V. Garnier, G. Madec)  optimization 
    88   !!             9.0  !  06-08  (S. Masson)  distributed restart using iom 
    9    !!             9.0  !  08-01  (R. Benshila)  change averaging method 
     9   !!              "   !  08-01  (R. Benshila)  change averaging method 
     10   !!              "   !  07-07  (D. Storkey) calls to BDY routines 
    1011   !!--------------------------------------------------------------------- 
    1112#if defined key_dynspg_ts   ||   defined key_esopa 
     
    3031   USE obc_oce         ! Lateral open boundary condition 
    3132   USE obc_par         ! open boundary condition parameters 
     33   USE bdy_oce         ! unstructured open boundaries 
     34   USE bdy_par         ! unstructured open boundaries 
     35   USE bdydta          ! unstructured open boundaries 
     36   USE bdydyn          ! unstructured open boundaries 
     37   USE bdytides        ! tidal forcing at unstructured open boundaries. 
    3238   USE lib_mpp         ! distributed memory computing library 
    3339   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     
    102108         zua, zva, zub, zvb,                &  !     "        " 
    103109         zssha_b, zua_b, zva_b,             &  !     "        " 
    104          zsshb_e, zub_e, zvb_e,             &  !     "        " 
     110         zub_e, zvb_e,                      &  !     "        " 
    105111         zun_e, zvn_e                          !     "        " 
    106112      !! Variable volume 
    107113      REAL(wp), DIMENSION(jpi,jpj)     ::   & 
    108          zspgu_1, zspgv_1, zsshun_e, zsshvn_e, hu_e, hv_e         ! 2D workspace 
     114         zspgu_1, zspgv_1, zsshun_e, zsshvn_e                     ! 2D workspace 
    109115      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zfse3un_e, zfse3vn_e  ! 3D workspace 
    110116      !!---------------------------------------------------------------------- 
     
    130136         ua_e(:,:)   = un_b(:,:) 
    131137         va_e(:,:)   = vn_b(:,:) 
     138         hu_e(:,:)   = hu(:,:) 
     139         hv_e(:,:)   = hv(:,:) 
    132140 
    133141         IF( ln_dynvor_een ) THEN 
     
    300308 
    301309      ! variables for the barotropic equations 
    302       zsshb_e(:,:) = sshn_b(:,:)       ! (barotropic) sea surface height (before and now) 
     310      sshb_e (:,:) = sshn_b(:,:)       ! (barotropic) sea surface height (before and now) 
    303311      sshn_e (:,:) = sshn_b(:,:) 
    304312      zub_e  (:,:) = un_b  (:,:)       ! barotropic transports issued from the barotropic equations (before and now) 
     
    309317      zua_b  (:,:) = 0.e0 
    310318      zva_b  (:,:) = 0.e0 
     319      hu_e   (:,:) = hu   (:,:)     ! (barotropic) ocean depth at u-point 
     320      hv_e   (:,:) = hv   (:,:)     ! (barotropic) ocean depth at v-point 
    311321      IF( lk_vvl ) THEN 
    312322         zsshun_e(:,:)    = sshu (:,:)     ! (barotropic) sea surface height (now) at u-point 
    313323         zsshvn_e(:,:)    = sshv (:,:)     ! (barotropic) sea surface height (now) at v-point 
    314          hu_e(:,:)        = hu   (:,:)     ! (barotropic) ocean depth at u-point 
    315          hv_e(:,:)        = hv   (:,:)     ! (barotropic) ocean depth at v-point 
    316324         zfse3un_e(:,:,:) = fse3u(:,:,:)   ! (barotropic) scale factors  at u-point 
    317325         zfse3un_e(:,:,:) = fse3v(:,:,:)   ! (barotropic) scale factors  at v-point 
     
    338346         ! Time interpolation of open boundary condition data 
    339347         IF( lk_obc )   CALL obc_dta_bt( kt, jit ) 
     348         IF( lk_bdy .or. lk_bdy_tides)   CALL bdy_dta_bt( kt, jit+1 ) 
    340349 
    341350         ! Horizontal divergence of barotropic transports 
    342351         !-------------------------------------------------- 
     352         zhdiv(:,:) = 0.e0 
    343353         DO jj = 2, jpjm1 
    344354            DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    360370#endif 
    361371 
     372         IF( lk_bdy .or. lk_bdy_tides ) THEN 
     373            DO jj = 1, jpj 
     374               DO ji = 1, jpi 
     375                  zhdiv(ji,jj) = zhdiv(ji,jj)*bdytmask(ji,jj) 
     376               END DO 
     377            END DO 
     378         ENDIF 
     379 
    362380         ! Sea surface height from the barotropic system 
    363381         !---------------------------------------------- 
    364382         DO jj = 2, jpjm1 
    365383            DO ji = fs_2, fs_jpim1   ! vector opt. 
    366                ssha_e(ji,jj) = ( zsshb_e(ji,jj) - z2dt_e *  ( zraur * emp(ji,jj)  & 
     384               ssha_e(ji,jj) = ( sshb_e(ji,jj) - z2dt_e *  ( zraur * emp(ji,jj)  & 
    367385            &            +  zhdiv(ji,jj) ) ) * tmask(ji,jj,1) 
    368386            END DO 
     
    457475         !         - Correct the barotropic transports 
    458476         IF( lk_obc )   CALL obc_fla_ts 
    459  
     477         IF( lk_bdy .or. lk_bdy_tides )   CALL bdy_dyn_fla 
    460478 
    461479         ! ... Boundary conditions on ua_e, va_e, ssha_e 
     
    475493         ! --------------------------------------- 
    476494         IF( neuler == 0 .AND. jit == 1 ) THEN   ! Euler (forward) time stepping 
    477             zsshb_e(:,:) = sshn_e(:,:) 
     495            sshb_e (:,:) = sshn_e(:,:) 
    478496            zub_e  (:,:) = zun_e (:,:) 
    479497            zvb_e  (:,:) = zvn_e (:,:) 
     
    482500            zvn_e  (:,:) = va_e  (:,:) 
    483501         ELSE                                        ! Asselin filtering 
    484             zsshb_e(:,:) = atfp * ( zsshb_e(:,:) + ssha_e(:,:) ) + atfp1 * sshn_e(:,:) 
     502            sshb_e (:,:) = atfp * ( sshb_e(:,:) + ssha_e(:,:) ) + atfp1 * sshn_e(:,:) 
    485503            zub_e  (:,:) = atfp * ( zub_e  (:,:) + ua_e  (:,:) ) + atfp1 * zun_e  (:,:) 
    486504            zvb_e  (:,:) = atfp * ( zvb_e  (:,:) + va_e  (:,:) ) + atfp1 * zvn_e  (:,:) 
     
    571589      IF( lp_obc_south )   zhdiv(nis0  :nis1  ,njs0  :njs1)   = 0.e0    ! south 
    572590#endif 
     591 
     592      IF ( lk_bdy .or. lk_bdy_tides ) THEN 
     593         DO jj = 1, jpj 
     594           DO ji = 1, jpi 
     595             zhdiv(ji,jj) = zhdiv(ji,jj)*bdytmask(ji,jj) 
     596           END DO 
     597         END DO 
     598      ENDIF 
    573599 
    574600      ! sea surface height 
Note: See TracChangeset for help on using the changeset viewer.