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.
2009WP/2009Stream3/VVL (diff) – NEMO

Changes between Version 12 and Version 13 of 2009WP/2009Stream3/VVL


Ignore:
Timestamp:
2009-06-21T12:56:54+02:00 (15 years ago)
Author:
gm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2009WP/2009Stream3/VVL

    v12 v13  
    7979            time derivative of e3 should not be not included in the left hand side of the momentum equation [[BR]] 
    8080            solve dU/dt = ...  and not d( e3 U)/dt = ... ). [[BR]] 
    81             Change to be done in both dynnxt AND dynspg (_ts and flt) 
     81            Change to be done in both dynnxt AND dynspg (_ts ; _flt ; _exp) 
    8282 
    8383            '''In dynnxt.F90'''   perform the thickness weighted time leap-frog and  Asselin filter only in ln_dynadv_vec=FALSE and lk_vvl=TRUE., in other word unweighted operation if  n_dynadv_vec=T and NOT lk_vvl. So replace the 2 two [[BR]] 
     
    101101 
    102102    In addition : (1) the masking of ua, va can be moved inside the key_bdy case ; (2) all the comment have been updated. The resulting subroutine can be found in attachment (https://forge.ipsl.jussieu.fr/nemo/attachment/wiki/2009WP/2009Stream3/VVL/dynnxt.F90). 
     103 
     104   '''In dynspg_flt.F90''', the time stepping of (ua,va) has to be modified as follows: [[BR]] 
     105 
     106{{{ 
     107      IF( lk_vvl ) THEN          ! variable volume  
     108 
     109         ! Evaluate the masked next velocity (effect of the additional force not included) 
     110         ! -------------------   (thickness weighted velocity, surface pressure gradient already included in dyn_hpg) 
     111         DO jk = 1, jpkm1 
     112            DO jj = 2, jpjm1 
     113               DO ji = fs_2, fs_jpim1   ! vector opt. 
     114                  ua(ji,jj,jk) = (        ub(ji,jj,jk) * fse3u_b(ji,jj,jk)      & 
     115                     &           + z2dt * ua(ji,jj,jk) * fse3u_n(ji,jj,jk)  )   & 
     116                     &         / fse3u_a(ji,jj,jk) * umask(ji,jj,jk) 
     117                  va(ji,jj,jk) = (        vb(ji,jj,jk) * fse3v_b(ji,jj,jk)      & 
     118                     &           + z2dt * va(ji,jj,jk) * fse3v_n(ji,jj,jk)  )   & 
     119                     &         / fse3v_a(ji,jj,jk) * vmask(ji,jj,jk) 
     120               END DO 
     121            END DO 
     122         END DO 
     123 
     124      ELSE                       ! fixed volume  
     125 
     126         ! Surface pressure gradient (now) 
     127         DO jj = 2, jpjm1 
     128            DO ji = fs_2, fs_jpim1   ! vector opt. 
     129               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) 
     130               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) 
     131            END DO  
     132         END DO  
     133         ! 
     134         ! add the surface pressure trend to the general trend and 
     135         ! evaluate the masked next velocity (effect of the additional force not included) 
     136         DO jk = 1, jpkm1 
     137            DO jj = 2, jpjm1 
     138               DO ji = fs_2, fs_jpim1   ! vector opt. 
     139                  ua(ji,jj,jk) = (  ub(ji,jj,jk) + z2dt * ( ua(ji,jj,jk) + spgu(ji,jj) )  ) * umask(ji,jj,jk) 
     140                  va(ji,jj,jk) = (  vb(ji,jj,jk) + z2dt * ( va(ji,jj,jk) + spgv(ji,jj) )  ) * vmask(ji,jj,jk) 
     141               END DO 
     142            END DO 
     143         END DO 
     144         ! 
     145      ENDIF 
     146}}} 
     147   becomes 
     148 
     149{{{ 
     150      ! Next velocity :   Leap-frog time stepping  (effect of the additional force not included) 
     151      ! ------------- 
     152      IF( lk_vvl ) THEN          !* variable volume : surface pressure gradient already included in dyn_hpg 
     153         ! 
     154         IF( ln_dynadv_vec ) THEN       ! vector invariant advection form: Leap-Frog applied on velocity 
     155            DO jk = 1, jpkm1 
     156               ua(:,:,jk) = ( ub(:,:,jk) + z2dt * ua(:,:,jk) ) * umask(:,:,jk) 
     157               va(:,:,jk) = ( vb(:,:,jk) + z2dt * va(:,:,jk) ) * vmask(:,:,jk) 
     158            END DO 
     159         ELSE                           ! flux advection form: Leap-Frog applied on thickness weighted velocity 
     160            DO jk = 1, jpkm1 
     161               ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)     & 
     162                  &           + z2dt * ua(:,:,jk) * fse3u_n(:,:,jk) )   & 
     163                  &         / fse3u_a(:,:,jk) * umask(:,:,jk) 
     164               va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)     & 
     165                  &           + z2dt * va(:,:,jk) * fse3v_n(:,:,jk) )   & 
     166                  &         / fse3v_a(:,:,jk) * vmask(:,:,jk)             
     167            END DO 
     168         ENDIF 
     169         ! 
     170      ELSE                       !* fixed volume : add the surface pressure gradient trend 
     171         ! 
     172         DO jj = 2, jpjm1               ! now surface pressure gradient 
     173            DO ji = fs_2, fs_jpim1   ! vector opt. 
     174               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) 
     175               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) 
     176            END DO  
     177         END DO  
     178         DO jk = 1, jpkm1               ! Leap-Frog applied on velocity 
     179            DO jj = 2, jpjm1 
     180               DO ji = fs_2, fs_jpim1   ! vector opt. 
     181                  ua(ji,jj,jk) = (  ub(ji,jj,jk) + z2dt * ( ua(ji,jj,jk) + spgu(ji,jj) )  ) * umask(ji,jj,jk) 
     182                  va(ji,jj,jk) = (  vb(ji,jj,jk) + z2dt * ( va(ji,jj,jk) + spgv(ji,jj) )  ) * vmask(ji,jj,jk) 
     183               END DO 
     184            END DO 
     185         END DO 
     186         ! 
     187      ENDIF 
     188}}} 
     189 
     190    In addition, all the comment have been updated. The resulting subroutine can be found in attachment (https://forge.ipsl.jussieu.fr/nemo/attachment/wiki/2009WP/2009Stream3/VVL/dynspg_flt.F90). 
     191 
     192   '''In dynspg_exp.F90'''   the whole module have to be modified to solve a velocity equation, not a thickness weighted velocity equation. Then in the specific case of ln_dynadv_vec=FALSE and lk_vvl=TRUE, an term associated with the time derivative of the ssh must be added to the equation solved. [[BR]] 
    103193 
    104194   '''In dynspg_ts.F90'''   the whole module have to be modified to solve a velocity equation, not a thickness weighted velocity equation. Then in the specific case of ln_dynadv_vec=FALSE and lk_vvl=TRUE, an term associated with the time derivative of the ssh must be added to the equation solved. [[BR]]