source: NEMO/trunk/src/OCE/DYN/dynspg_exp.F90 @ 12377

Last change on this file since 12377 was 12377, checked in by acc, 8 months ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge —ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The —ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1MODULE dynspg_exp
2   !!======================================================================
3   !!                   ***  MODULE  dynspg_exp  ***
4   !! Ocean dynamics:  surface pressure gradient trend, explicit scheme
5   !!======================================================================
6   !! History :  2.0  !  2005-11  (V. Garnier, G. Madec, L. Bessieres) Original code
7   !!            3.2  !  2009-06  (G. Madec, M. Leclair, R. Benshila) introduce sshwzv module
8   !!----------------------------------------------------------------------
9
10   !!----------------------------------------------------------------------
11   !!   dyn_spg_exp  : update the momentum trend with the surface
12   !!                      pressure gradient in the free surface constant 
13   !!                      volume case with vector optimization
14   !!----------------------------------------------------------------------
15   USE oce             ! ocean dynamics and tracers
16   USE dom_oce         ! ocean space and time domain
17   USE sbc_oce         ! surface boundary condition: ocean
18   USE phycst          ! physical constants
19   !
20   USE in_out_manager  ! I/O manager
21   USE lib_mpp         ! distributed memory computing library
22   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
23   USE prtctl          ! Print control
24   USE iom             ! I/O library
25
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC   dyn_spg_exp   ! called in dynspg.F90
30
31   !! * Substitutions
32#  include "do_loop_substitute.h90"
33   !!----------------------------------------------------------------------
34   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
35   !! $Id$
36   !! Software governed by the CeCILL license (see ./LICENSE)
37   !!----------------------------------------------------------------------
38CONTAINS
39
40   SUBROUTINE dyn_spg_exp( kt, Kmm, puu, pvv, Krhs )
41      !!----------------------------------------------------------------------
42      !!                  ***  routine dyn_spg_exp  ***
43      !!
44      !! ** Purpose :   Compute the now trend due to the surface pressure
45      !!              gradient in case of explicit free surface formulation and
46      !!              add it to the general trend of momentum equation.
47      !!
48      !! ** Method  :   Explicit free surface formulation. Add to the general
49      !!              momentum trend the surface pressure gradient :
50      !!                      (uu(rhs),vv(rhs)) = (uu(rhs),vv(rhs)) + (spgu,spgv)
51      !!              where spgu = -1/rau0 d/dx(ps) = -g/e1u di( ssh(now) )
52      !!                    spgv = -1/rau0 d/dy(ps) = -g/e2v dj( ssh(now) )
53      !!
54      !! ** Action :   (puu(:,:,:,Krhs),pvv(:,:,:,Krhs))   trend of horizontal velocity increased by
55      !!                         the surf. pressure gradient trend
56      !!---------------------------------------------------------------------
57      INTEGER                             , INTENT( in )  ::  kt        ! ocean time-step index
58      INTEGER                             , INTENT( in )  ::  Kmm, Krhs ! ocean time level indices
59      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv  ! ocean velocities and RHS of momentum equation
60      !!
61      INTEGER ::   ji, jj, jk   ! dummy loop indices
62      !!----------------------------------------------------------------------
63      !
64      IF( kt == nit000 ) THEN
65         IF(lwp) WRITE(numout,*)
66         IF(lwp) WRITE(numout,*) 'dyn_spg_exp : surface pressure gradient trend'
67         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   (explicit free surface)'
68         !
69         spgu(:,:) = 0._wp   ;   spgv(:,:) = 0._wp
70         !
71         IF( .NOT.ln_linssh .AND. lwp ) WRITE(numout,*) '      non linear free surface: spg is included in dynhpg'
72      ENDIF
73
74      IF( ln_linssh ) THEN          !* linear free surface : add the surface pressure gradient trend
75         !
76         DO_2D_00_00
77            spgu(ji,jj) = - grav * ( ssh(ji+1,jj,Kmm) - ssh(ji,jj,Kmm) ) * r1_e1u(ji,jj)
78            spgv(ji,jj) = - grav * ( ssh(ji,jj+1,Kmm) - ssh(ji,jj,Kmm) ) * r1_e2v(ji,jj)
79         END_2D
80         !
81         DO_3D_00_00( 1, jpkm1 )
82            puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + spgu(ji,jj)
83            pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) + spgv(ji,jj)
84         END_3D
85         !
86      ENDIF
87      !
88   END SUBROUTINE dyn_spg_exp
89
90   !!======================================================================
91END MODULE dynspg_exp
Note: See TracBrowser for help on using the repository browser.