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 7099 for branches/UKMO/r5518_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2016-10-25T18:15:30+02:00 (7 years ago)
Author:
jcastill
Message:

Changes as in r7078 of the original ING branch: branches/2015/dev_r5936_INGV1_WAVE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r5518_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r5467 r7099  
    99   !!             -   !  2010-09  (D.Storkey and E.O'Dea) bug fixes for BDY module 
    1010   !!            3.3  !  2011-10  (M. Leclair) split former ssh_wzv routine and remove all vvl related work 
     11   !!            3.6  !  2014-10  (E. Clementi, P. Oddo) add wave contribution to surface vertical velocity 
    1112   !!---------------------------------------------------------------------- 
    1213 
     
    3940   USE wrk_nemo        ! Memory Allocation 
    4041   USE timing          ! Timing 
     42   USE sbcwave,  ONLY:  zusd2dt, zvsd2dt,wsd3d 
    4143 
    4244   IMPLICIT NONE 
     
    164166      REAL(wp), POINTER, DIMENSION(:,:  ) ::  z2d 
    165167      REAL(wp), POINTER, DIMENSION(:,:,:) ::  z3d, zhdiv 
     168      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) ::  sshnu, sshnv, dsshnu, dsshnv 
    166169      ! 
    167170      INTEGER             ::   ji, jj, jk   ! dummy loop indices 
     
    216219      ENDIF 
    217220 
     221!  
     222!     In case ln_wave and ln_sdw the surface vertical velocity is modified  
     223!     accounting for Sokes Drift velocity  
     224      IF ( ln_wave .AND. ln_sdw )  THEN  
     225        ALLOCATE(sshnu(jpi,jpj),sshnv(jpi,jpj),dsshnu(jpi,jpj),dsshnv(jpi,jpj))  
     226        sshnu (:,:) = 0._wp  
     227        sshnv (:,:) = 0._wp  
     228        dsshnu(:,:) = 0._wp  
     229        dsshnv(:,:) = 0._wp  
     230        ! sshn interpolated on U-V grid  
     231        !---------------------------------  
     232        DO jj = 1 , jpjm1  
     233          DO ji = 1 , jpim1  
     234            sshnu(ji,jj) =  0.5 * ( 2. - umask(ji,jj,1) ) * &  
     235                         &        ( sshn(ji  ,jj) * tmask(ji  ,jj,1)      &  
     236                         &        + sshn(ji+1,jj) * tmask(ji+1,jj,1) )  
     237            sshnv(ji,jj) =  0.5 * ( 2. - vmask(ji,jj,1) ) * &  
     238                         &        ( sshn(ji,jj  ) * tmask(ji,jji ,1)      &  
     239                         &        + sshn(ji,jj+1) * tmask(ji,jj+1,1) )  
     240          ENDDO  
     241        ENDDO  
     242        ! Compute d(ssh)/dx  and d(ssh)/dy    
     243        !---------------------------------  
     244        DO jj = 1 , jpjm1  
     245          DO ji = 1 , jpim1  
     246            dsshnu(ji,jj) = ( sshnu(ji+1,jj) - sshnu(ji,jj) ) / e1u(ji,jj)  
     247            dsshnv(ji,jj) = ( sshnv(ji,jj+1) - sshnv(ji,jj) ) / e2v(ji,jj)  
     248          ENDDO  
     249        ENDDO  
     250        ! Compute the surface vertical velocity accounting for the Stokes Drift   
     251        !---------------------------------------------------------------------  
     252        wn(:,:,1) = wn(:,:,1) + zusd2dt(:,:) * dsshnu(:,:)     &  
     253                  &           + zvsd2dt(:,:) * dsshnv(:,:)      &  
     254                  &           - ( wsd3d (:,:,1) ) * tmask(:,:,1)  
     255      ENDIF  
     256      !  
    218257#if defined key_bdy 
    219258      IF (lk_bdy) THEN 
Note: See TracChangeset for help on using the changeset viewer.