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 5983 for branches/2015/dev_r5936_INGV1_WAVE/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2015-12-02T17:12:45+01:00 (8 years ago)
Author:
emanuelaclementi
Message:

ticket #1643 Aligned branch INGV1-WAVE at trunk revision 5936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5936_INGV1_WAVE/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r5930 r5983  
    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 
     
    3839   USE wrk_nemo        ! Memory Allocation 
    3940   USE timing          ! Timing 
     41   USE sbcwave,  ONLY: usd2dt, vsd2dt,wsd3d 
    4042 
    4143   IMPLICIT NONE 
     
    160162      REAL(wp), POINTER, DIMENSION(:,:  ) ::  z2d 
    161163      REAL(wp), POINTER, DIMENSION(:,:,:) ::  z3d, zhdiv 
     164      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) ::  sshnu, sshnv, dsshnu, dsshnv 
    162165      !!---------------------------------------------------------------------- 
    163166      ! 
     
    206209         END DO 
    207210      ENDIF 
    208  
     211! 
     212!     In case ln_wave and ln_sdw the surface vertical velocity is modified 
     213!     accounting for Sokes Drift velocity 
     214      IF ( ln_wave .AND. ln_sdw )  THEN 
     215       ALLOCATE(sshnu(jpi,jpj),sshnv(jpi,jpj),dsshnu(jpi,jpj),dsshnv(jpi,jpj)) 
     216       sshnu (:,:) = 0._wp 
     217       sshnv (:,:) = 0._wp 
     218       dsshnu(:,:) = 0._wp 
     219       dsshnv(:,:) = 0._wp 
     220       ! sshn interpolated on U-V grid 
     221       !--------------------------------- 
     222       DO jj = 1 , jpjm1 
     223         DO ji = 1 , jpim1 
     224           sshnu(ji,jj) =  0.5 * ( 2. - umask(ji,jj,1) ) *               & 
     225                        &        ( sshn(ji  ,jj) * tmask(ji  ,jj,1)      & 
     226                        &        + sshn(ji+1,jj) * tmask(ji+1,jj,1) ) 
     227           sshnv(ji,jj) =  0.5 * ( 2. - vmask(ji,jj,1) ) *               & 
     228                        &        ( sshn(ji,jj  ) * tmask(ji,jj  ,1)      & 
     229                        &        + sshn(ji,jj+1) * tmask(ji,jj+1,1) ) 
     230         ENDDO 
     231       ENDDO 
     232       ! Compute d(ssh)/dx  and d(ssh)/dy   
     233       !--------------------------------- 
     234       DO jj = 1 , jpjm1 
     235         DO ji = 1 , jpim1 
     236           dsshnu(ji,jj) = ( sshnu(ji+1,jj) - sshnu(ji,jj) ) / e1u(ji,jj) 
     237           dsshnv(ji,jj) = ( sshnv(ji,jj+1) - sshnv(ji,jj) ) / e2v(ji,jj) 
     238         ENDDO 
     239       ENDDO 
     240       ! Compute the surface vertical velocity accounting for the Stokes Drift  
     241       !--------------------------------------------------------------------- 
     242       wn(:,:,1) = wn(:,:,1) + usd2dt(:,:) * dsshnu(:,:)     & 
     243                 &           + vsd2dt(:,:) * dsshnv(:,:)      & 
     244                 &           - ( wsd3d (:,:,1) ) * tmask(:,:,1) 
     245      ENDIF 
     246      ! 
    209247#if defined key_bdy 
    210248      IF( lk_bdy ) THEN 
Note: See TracChangeset for help on using the changeset viewer.