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 branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC – NEMO

source: branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dyncor_c1d.F90 @ 2287

Last change on this file since 2287 was 2287, checked in by smasson, 14 years ago

update licence of all NEMO files...

  • Property svn:keywords set to Id
File size: 6.0 KB
RevLine 
[900]1MODULE dyncor_c1d
[253]2   !!======================================================================
[900]3   !!                     ***  MODULE  dyncor_c1d  ***
4   !! Ocean Dynamics :   Coriolis term in 1D configuration
[253]5   !!=====================================================================
[900]6   !! History :  2.0  !  2004-09  (C. Ethe)  Original code
7   !!            3.0  !  2008-04  (G. Madec)  style only
8   !!----------------------------------------------------------------------
[899]9#if defined key_c1d
[253]10   !!----------------------------------------------------------------------
[900]11   !!   'key_c1d'                                          1D Configuration
[253]12   !!----------------------------------------------------------------------
[900]13   !!   cor_c1d      : Coriolis factor at T-point (1D configuration)
14   !!   dyn_cor_c1d  : vorticity trend due to Coriolis at T-point
[253]15   !!----------------------------------------------------------------------
[900]16   USE oce               ! ocean dynamics and tracers
17   USE dom_oce           ! ocean space and time domain
18   USE phycst            ! physical constants
19   USE in_out_manager    ! I/O manager
20   USE prtctl            ! Print control
[253]21
22   IMPLICIT NONE
23   PRIVATE
24
[900]25   PUBLIC   cor_c1d      ! routine called by OPA.F90
26   PUBLIC   dyn_cor_c1d  ! routine called by step1d.F90
[253]27
28   !! * Substitutions
29#  include "vectopt_loop_substitute.h90"
30   !!----------------------------------------------------------------------
[2287]31   !! NEMO/C1D 3.3 , NEMO Consortium (2010)
[1152]32   !! $Id$
[2287]33   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
[253]34   !!----------------------------------------------------------------------
35
36CONTAINS
37
[900]38   SUBROUTINE cor_c1d
[253]39      !!----------------------------------------------------------------------
[900]40      !!                   ***  ROUTINE cor_c1d  ***
[253]41      !!
42      !! ** Purpose : Compute the Coriolis factor at T-point
43      !!----------------------------------------------------------------------
[900]44      REAL(wp) ::   zphi0, zbeta, zf0         !  temporary scalars
[253]45      !!----------------------------------------------------------------------
46
47      IF(lwp) WRITE(numout,*)
[900]48      IF(lwp) WRITE(numout,*) 'cor_c1d : Coriolis factor at T-point'
49      IF(lwp) WRITE(numout,*) '~~~~~~~'
[253]50
51      SELECT CASE( jphgr_msh )   ! type of horizontal mesh
[900]52      !
[253]53      CASE ( 0, 1, 4 )               ! mesh on the sphere
54         ff(:,:) = 2. * omega * SIN( rad * gphit(:,:) ) 
[900]55         !
[253]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)
[900]59         !
[253]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)
[900]67         !
[253]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)
[900]75         !
[253]76      END SELECT
[900]77      !
78   END SUBROUTINE cor_c1d
[253]79
80
[900]81   SUBROUTINE dyn_cor_c1d( kt )
[253]82      !!----------------------------------------------------------------------
[900]83      !!                   ***  ROUTINE dyn_cor_c1d  ***
[253]84      !!
85      !! ** Purpose :   Compute the now total vorticity trend and add it to
86      !!               the general trend of the momentum equation
87      !!
88      !! ** Method  :
89      !!
90      !! History :
91      !!   9.0  !  04-09  (C. Ethe) 1D configuration
92      !!----------------------------------------------------------------------
[900]93      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
94      !!
95      INTEGER ::   ji, jj, jk         ! dummy loop indices
[253]96      !!----------------------------------------------------------------------
[900]97      !
[253]98      IF( kt == nit000 ) THEN
99         IF(lwp) WRITE(numout,*)
[900]100         IF(lwp) WRITE(numout,*) 'dyn_cor_c1d : total vorticity trend in 1D'
[253]101         IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
102      ENDIF
[900]103      !
[253]104      DO jk = 1, jpkm1
105         DO jj = 2, jpjm1
106            DO ji = fs_2, fs_jpim1   ! vector opt.
[900]107               ua(ji,jj,jk) = ua(ji,jj,jk) + ff(ji,jj) * vn(ji,jj,jk)
108               va(ji,jj,jk) = va(ji,jj,jk) - ff(ji,jj) * un(ji,jj,jk)
[253]109            END DO
110         END DO
111      END DO   
[900]112      !
113      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' cor  - Ua: ', mask1=umask,  &
114         &                       tab3d_2=va, clinfo2=' Va: '       , mask2=vmask )
115      !
116   END SUBROUTINE dyn_cor_c1d
[321]117
[253]118#else
119   !!----------------------------------------------------------------------
[900]120   !!   Default key                                     NO 1D Configuration
[253]121   !!----------------------------------------------------------------------
122CONTAINS
[900]123   SUBROUTINE cor_c1d              ! Empty routine
124   END SUBROUTINE cor_c1d   
125   SUBROUTINE dyn_cor_c1d ( kt )      ! Empty routine
126      WRITE(*,*) 'dyn_cor_c1d: You should not have seen this print! error?', kt
127   END SUBROUTINE dyn_cor_c1d
[253]128#endif
129
130   !!=====================================================================
[900]131END MODULE dyncor_c1d
Note: See TracBrowser for help on using the repository browser.