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.
dyncor_c1d.F90 in NEMO/trunk/src/OCE/C1D – NEMO

source: NEMO/trunk/src/OCE/C1D/dyncor_c1d.F90 @ 13286

Last change on this file since 13286 was 12377, checked in by acc, 4 years 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.8 KB
Line 
1MODULE dyncor_c1d
2   !!======================================================================
3   !!                     ***  MODULE  dyncor_c1d  ***
4   !! Ocean Dynamics :   Coriolis term in 1D configuration
5   !!=====================================================================
6   !! History :  2.0  !  2004-09  (C. Ethe)  Original code
7   !!            3.0  !  2008-04  (G. Madec)  style only
8   !!----------------------------------------------------------------------
9#if defined key_c1d
10   !!----------------------------------------------------------------------
11   !!   'key_c1d'                                          1D Configuration
12   !!----------------------------------------------------------------------
13   !!   cor_c1d       : Coriolis factor at T-point (1D configuration)
14   !!   dyn_cor_c1d   : vorticity trend due to Coriolis at T-point
15   !!----------------------------------------------------------------------
16   USE oce            ! ocean dynamics and tracers
17   USE dom_oce        ! ocean space and time domain
18   USE phycst         ! physical constants
19   !
20   USE in_out_manager ! I/O manager
21   USE prtctl         ! Print control
22
23   USE sbcwave        ! Surface Waves (add Stokes-Coriolis force)
24   USE sbc_oce , ONLY : ln_stcor    ! use Stoke-Coriolis force
25   
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC   cor_c1d      ! called by nemogcm.F90
30   PUBLIC   dyn_cor_c1d  ! called by step1d.F90
31
32   !! * Substitutions
33#  include "do_loop_substitute.h90"
34   !!----------------------------------------------------------------------
35   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
36   !! $Id$
37   !! Software governed by the CeCILL license (see ./LICENSE)
38   !!----------------------------------------------------------------------
39CONTAINS
40
41   SUBROUTINE cor_c1d
42      !!----------------------------------------------------------------------
43      !!                   ***  ROUTINE cor_c1d  ***
44      !!
45      !! ** Purpose : set the Coriolis factor at T-point
46      !!----------------------------------------------------------------------
47      REAL(wp) ::   zphi0, zbeta, zf0   ! local scalars
48      !!----------------------------------------------------------------------
49
50      IF(lwp) WRITE(numout,*)
51      IF(lwp) WRITE(numout,*) 'cor_c1d : Coriolis factor at T-point'
52      IF(lwp) WRITE(numout,*) '~~~~~~~'
53
54      !
55   END SUBROUTINE cor_c1d
56
57
58   SUBROUTINE dyn_cor_c1d( kt, Kmm, puu, pvv, Krhs )
59      !!----------------------------------------------------------------------
60      !!                   ***  ROUTINE dyn_cor_c1d  ***
61      !!
62      !! ** Purpose :   Compute the now Coriolis trend and add it to
63      !!               the general trend of the momentum equation in 1D case.
64      !!----------------------------------------------------------------------
65      INTEGER                             , INTENT(in   ) ::   kt        ! ocean time-step index
66      INTEGER                             , INTENT(in   ) ::   Kmm, Krhs ! ocean time level indices
67      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::   puu, pvv  ! ocean velocities and RHS of momentum equation
68      !!
69      INTEGER ::   ji, jj, jk   ! dummy loop indices
70      !!----------------------------------------------------------------------
71      !
72      IF( kt == nit000 ) THEN
73         IF(lwp) WRITE(numout,*)
74         IF(lwp) WRITE(numout,*) 'dyn_cor_c1d : total vorticity trend in 1D'
75         IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
76      ENDIF
77      !
78      IF( ln_stcor ) THEN
79         DO_3D_00_00( 1, jpkm1 )
80            puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + ff_t(ji,jj) * (pvv(ji,jj,jk,Kmm) + vsd(ji,jj,jk))
81            pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ff_t(ji,jj) * (puu(ji,jj,jk,Kmm) + usd(ji,jj,jk))
82         END_3D
83      ELSE
84         DO_3D_00_00( 1, jpkm1 )
85            puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + ff_t(ji,jj) * pvv(ji,jj,jk,Kmm)
86            pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ff_t(ji,jj) * puu(ji,jj,jk,Kmm)
87         END_3D
88      END IF
89     
90      !
91      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Krhs), clinfo1=' cor  - Ua: ', mask1=umask,  &
92         &                                  tab3d_2=pvv(:,:,:,Krhs), clinfo2=' Va: '       , mask2=vmask )
93      !
94   END SUBROUTINE dyn_cor_c1d
95
96#else
97   !!----------------------------------------------------------------------
98   !!   Default key                                     NO 1D Configuration
99   !!----------------------------------------------------------------------
100CONTAINS
101   SUBROUTINE cor_c1d              ! Empty routine
102       IMPLICIT NONE
103   END SUBROUTINE cor_c1d   
104   SUBROUTINE dyn_cor_c1d ( kt )      ! Empty routine
105      IMPLICIT NONE
106      INTEGER, INTENT( in ) :: kt
107      WRITE(*,*) 'dyn_cor_c1d: You should not have seen this print! error?', kt
108   END SUBROUTINE dyn_cor_c1d
109#endif
110
111   !!=====================================================================
112END MODULE dyncor_c1d
Note: See TracBrowser for help on using the repository browser.