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 trunk/NEMOGCM/NEMO/OPA_SRC/C1D – NEMO

source: trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dyncor_c1d.F90 @ 6140

Last change on this file since 6140 was 6140, checked in by timgraham, 8 years ago

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

  • Property svn:keywords set to Id
File size: 5.9 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   IMPLICIT NONE
24   PRIVATE
25
26   PUBLIC   cor_c1d      ! called by nemogcm.F90
27   PUBLIC   dyn_cor_c1d  ! called by step1d.F90
28
29   !! * Substitutions
30#  include "vectopt_loop_substitute.h90"
31   !!----------------------------------------------------------------------
32   !! NEMO/C1D 3.7 , NEMO Consortium (2015)
33   !! $Id$
34   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE cor_c1d
39      !!----------------------------------------------------------------------
40      !!                   ***  ROUTINE cor_c1d  ***
41      !!
42      !! ** Purpose : set the Coriolis factor at T-point
43      !!----------------------------------------------------------------------
44      REAL(wp) ::   zphi0, zbeta, zf0   ! local scalars
45      !!----------------------------------------------------------------------
46
47      IF(lwp) WRITE(numout,*)
48      IF(lwp) WRITE(numout,*) 'cor_c1d : Coriolis factor at T-point'
49      IF(lwp) WRITE(numout,*) '~~~~~~~'
50
51      SELECT CASE( jphgr_msh )   ! type of horizontal mesh
52      !
53      CASE ( 0, 1, 4 )               ! mesh on the sphere
54         ff(:,:) = 2. * omega * SIN( rad * gphit(:,:) ) 
55         !
56      CASE ( 2 )                     ! f-plane at ppgphi0
57         ff(:,:) = 2. * omega * SIN( rad * ppgphi0 )
58         IF(lwp) WRITE(numout,*) '          f-plane: Coriolis parameter = constant = ', ff(1,1)
59         !
60      CASE ( 3 )                     ! beta-plane
61         zbeta   = 2. * omega * COS( rad * ppgphi0 ) / ra                     ! beta at latitude ppgphi0
62         zphi0   = ppgphi0 - FLOAT( jpjglo/2) * ppe2_m *1.e-3  / ( ra * rad ) ! latitude of the first row F-points
63         zf0     = 2. * omega * SIN( rad * zphi0 )                            ! compute f0 1st point south
64         ff(:,:) = ( zf0  + zbeta * gphit(:,:) * 1.e+3 )                      ! f = f0 +beta* y ( y=0 at south)
65         IF(lwp) WRITE(numout,*) '          Beta-plane: Beta parameter = constant = ', ff(1,1)
66         IF(lwp) WRITE(numout,*) '                      Coriolis parameter varies from ', ff(1,1),' to ', ff(1,jpj)
67         !
68      CASE ( 5 )                     ! beta-plane and rotated domain
69         zbeta = 2. * omega * COS( rad * ppgphi0 ) / ra                     ! beta at latitude ppgphi0
70         zphi0 = 15.e0                                                      ! latitude of the first row F-points
71         zf0   = 2. * omega * SIN( rad * zphi0 )                            ! compute f0 1st point south
72         ff(:,:) = ( zf0 + zbeta * ABS( gphit(:,:) - zphi0 ) * rad * ra )   ! f = f0 +beta* y ( y=0 at south)
73         IF(lwp) WRITE(numout,*) '          Beta-plane: Beta parameter = constant = ', ff(1,1)
74         IF(lwp) WRITE(numout,*) '                      Coriolis parameter varies from ', ff(1,1),' to ', ff(1,jpj)
75         !
76      END SELECT
77      !
78   END SUBROUTINE cor_c1d
79
80
81   SUBROUTINE dyn_cor_c1d( kt )
82      !!----------------------------------------------------------------------
83      !!                   ***  ROUTINE dyn_cor_c1d  ***
84      !!
85      !! ** Purpose :   Compute the now Coriolis trend and add it to
86      !!               the general trend of the momentum equation in 1D case.
87      !!----------------------------------------------------------------------
88      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
89      !!
90      INTEGER ::   ji, jj, jk   ! dummy loop indices
91      !!----------------------------------------------------------------------
92      !
93      IF( kt == nit000 ) THEN
94         IF(lwp) WRITE(numout,*)
95         IF(lwp) WRITE(numout,*) 'dyn_cor_c1d : total vorticity trend in 1D'
96         IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
97      ENDIF
98      !
99      DO jk = 1, jpkm1
100         DO jj = 2, jpjm1
101            DO ji = fs_2, fs_jpim1   ! vector opt.
102               ua(ji,jj,jk) = ua(ji,jj,jk) + ff(ji,jj) * vn(ji,jj,jk)
103               va(ji,jj,jk) = va(ji,jj,jk) - ff(ji,jj) * un(ji,jj,jk)
104            END DO
105         END DO
106      END DO   
107      !
108      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' cor  - Ua: ', mask1=umask,  &
109         &                       tab3d_2=va, clinfo2=' Va: '       , mask2=vmask )
110      !
111   END SUBROUTINE dyn_cor_c1d
112
113#else
114   !!----------------------------------------------------------------------
115   !!   Default key                                     NO 1D Configuration
116   !!----------------------------------------------------------------------
117CONTAINS
118   SUBROUTINE cor_c1d              ! Empty routine
119   END SUBROUTINE cor_c1d   
120   SUBROUTINE dyn_cor_c1d ( kt )      ! Empty routine
121      WRITE(*,*) 'dyn_cor_c1d: You should not have seen this print! error?', kt
122   END SUBROUTINE dyn_cor_c1d
123#endif
124
125   !!=====================================================================
126END MODULE dyncor_c1d
Note: See TracBrowser for help on using the repository browser.