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.
taumod.F90 in trunk/NEMO/OPA_SRC/SBC – NEMO

source: trunk/NEMO/OPA_SRC/SBC/taumod.F90 @ 443

Last change on this file since 443 was 434, checked in by opalod, 18 years ago

nemo_v1_update_044 : CT : update the passive tracers TOP component and the standard GYRE configuration

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.7 KB
Line 
1MODULE taumod
2   !!======================================================================
3   !!                       ***  MODULE  taumod  ***
4   !! Ocean forcing : stress at the the ocean surface
5   !!=====================================================================
6
7   !!----------------------------------------------------------------------
8   !!   tau          : define the surface stress for the ocean
9   !!----------------------------------------------------------------------
10   !! * Modules used
11   USE dom_oce         ! ocean space and time domain
12   USE phycst          ! physical constants
13   USE in_out_manager  ! I/O manager
14   USE daymod          ! calendar
15   USE lbclnk          !
16
17   IMPLICIT NONE
18   PRIVATE
19
20   !! * Routine accessibility
21   PUBLIC tau                ! routine called by step.F90
22
23   !! * Share modules variables
24   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &
25      taux, tauy,      &  !: surface stress components in (i,j) referential
26      tauxg, tauyg        !: surface stress components in geographical
27      !                   !  referential (used in output)
28   !!----------------------------------------------------------------------
29   !!   OPA 9.0 , LOCEAN-IPSL (2005)
30   !! $Header$
31   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
32   !!----------------------------------------------------------------------
33
34#if defined key_tau_monthly
35   ! Monthly climatology in (i,j) referential  (i-comp. at U-pt and j-comp. at V-pt)
36   !!----------------------------------------------------------------------
37   !!   'key_tau_monthly'                        MONTHLY climatology stress
38   !!   default case                                   NetCDF files
39   !!----------------------------------------------------------------------
40#   include "tau_forced_monthly.h90"
41
42# elif defined key_tau_daily
43   !!----------------------------------------------------------------------
44   !!   'key_tau_daily'                                 DAILY stress
45   !!                                                   NetCDF files
46   !!----------------------------------------------------------------------
47   ! Daily climatology/interannual in (i,j) referential  (i-comp. at U-pt and j-comp. at V-pt)
48#   include "tau_forced_daily.h90"
49
50#elif defined key_coupled
51   ! Coupled case : stress at the coupling frequency
52# if defined key_ice_lim
53   !!----------------------------------------------------------------------
54   !!   'key_coupled'                              Coupled Ocean/Atmosphere
55   !!   'key_ice_lim'                                   LIM sea-ice
56   !!----------------------------------------------------------------------
57   ! New way: 3D referential link to the earth (avoid north pole pb)
58   ! (3 component stress defined at U- and V-points)
59#  include "tau_coupled_ice.h90"
60# else
61   !!----------------------------------------------------------------------
62   !!   'key_coupled'                              Coupled Ocean/Atmosphere
63   !!   Default case                                  NO sea-ice
64   !!----------------------------------------------------------------------
65   ! old fashion: geographical referential
66   ! (zonal and meridional stress defined at U- and V-points)
67#  include "tau_coupled.h90"
68# endif
69#else
70   !!----------------------------------------------------------------------
71   !!   Default option                                     constant forcing
72   !!----------------------------------------------------------------------
73   !! * local modules variables
74   INTEGER  ::       & !!! * Namelist numtau *
75      ntau000 = 1       ! nb of time-step during which the surface stress
76      !                 ! increase from 0 to its nominal value (taudta) (>0)
77   REAL(wp) ::       & !!! * Namelist numtau *
78      tau0x = 0.e0 , &  ! constant wind stress value in i-direction
79      tau0y = 0.e0      ! constant wind stress value in j-direction
80   !!----------------------------------------------------------------------
81
82CONTAINS
83
84   SUBROUTINE tau( kt )
85      !!---------------------------------------------------------------------
86      !!                    ***  ROUTINE tau  ***
87      !!
88      !! ** Purpose :   provide the ocean surface stress at each time step
89      !!
90      !! ** Method  :   Constant surface stress increasing from 0 to taudta
91      !!      value during the first ntau000 time-step (namelist)
92      !!        CAUTION: never mask the surface stress field !
93      !!
94      !! ** Action  : - update taux , tauy the stress in (i,j) ref.
95      !!              - update tauxg, tauyg the stress in geographic ref.
96      !!
97      !! History :
98      !!   4.0  !  91-03  (G. Madec)  Original code
99      !!   8.5  !  02-11  (G. Madec)  F90: Free form and module
100      !!----------------------------------------------------------------------
101      !! * Arguments
102      INTEGER, INTENT( in  ) ::   kt    ! ocean time step
103      REAL(wp) ::   ztau, ztau_sais, &  ! wind intensity and of the seasonal cycle
104         ztime,                      &  ! time in hour
105         ztimemax, ztimemin,         &  ! 21th June, and 21th decem. if date0 = 1st january
106         ztaun                          ! intensity
107      INTEGER  ::   ji, jj              ! dummy loop indices
108
109      INTEGER  ::           &
110         zyear0,            &           ! initial year
111         zmonth0,           &           ! initial month
112         zday0,             &           ! initial day
113         zday_year0                    ! initial day since january 1st
114       
115
116      !! * Local declarations
117      REAL(wp) ::   zfacto              !
118
119      NAMELIST/namtau/ ntau000, tau0x, tau0y
120      !!---------------------------------------------------------------------
121
122      IF( cp_cfg == 'gyre' ) THEN
123
124         zyear0  = ndate0 / 10000                             ! initial year
125         zmonth0 = ( ndate0 - zyear0 * 10000 ) / 100          ! initial month
126         zday0   = ndate0 - zyear0 * 10000 - zmonth0 * 100    ! initial day betwen 1 and 30
127
128         zday_year0 = (zmonth0-1)*30.+zday0                   ! initial day betwen 1 and 360
129
130         ! current day (in hours) since january the 1st of the current year
131          ztime = FLOAT( kt ) * rdt / (rmmss * rhhmm)  &    !  total incrementation (in hours)
132             &     - (nyear  - 1) * rjjhh * raajj           !  minus years since beginning of experiment (in hours)
133
134
135        ! 21th june at 24h in hours
136         ztimemax = ((5.*30.)+21.)* 24.
137         ! 21th december day in hours
138         ! rjjhh * raajj / 4 = 1 seasonal cycle in hours
139         ztimemin = ztimemax + rjjhh * raajj / 2 
140
141         ! mean intensity at 0.105/srqt(2) because projected with 45deg angle
142         ztau = 0.105 / SQRT(2.)           
143         ! seasonal oscillation intensity
144         ztau_sais = 0.015                 
145         ztaun = ztau - ztau_sais * COS( (ztime - ztimemax) / (ztimemin - ztimemax) * rpi )
146         DO jj = 1, jpj
147            DO ji = 1, jpi
148              ! domain from 15deg to 50deg and 1/2 period along 14deg
149              ! so 5/4 of half period with seasonal cycle
150              taux (ji,jj) = - ztaun * SIN( rpi * (gphiu(ji,jj) - 15.) / (29.-15.) )
151              tauy (ji,jj) =   ztaun * SIN( rpi * (gphiv(ji,jj) - 15.) / (29.-15.) )
152            END DO
153         END DO
154   
155         IF( kt == nit000 .AND. lwp ) THEN
156            WRITE(numout,*)' tau    : analytical formulation for gyre'
157            WRITE(numout,*)' ~~~~~~~ '
158            WRITE(numout,*)'          nyear      = ', nyear
159            WRITE(numout,*)'          nmonth     = ', nmonth
160            WRITE(numout,*)'          nday       = ', nday
161            WRITE(numout,*)'          nday_year  = ',nday_year
162            WRITE(numout,*)'          ndastp     = ',ndastp
163            WRITE(numout,*)'          adatrj     = ',adatrj
164            WRITE(numout,*)'          ztime      = ',ztime
165            WRITE(numout,*)'          ztimemax   = ',ztimemax
166            WRITE(numout,*)'          ztimemin   = ',ztimemin
167            WRITE(numout,*)'          zyear0     = ', zyear0
168            WRITE(numout,*)'          zmonth0    = ', zmonth0
169            WRITE(numout,*)'          zday0      = ', zday0
170            WRITE(numout,*)'          zday_year0 = ',zday_year0
171            WRITE(numout,*)'          raajj      = ', raajj
172            WRITE(numout,*)'          ztau       = ', ztau
173            WRITE(numout,*)'          ztau_sais  = ', ztau_sais
174            WRITE(numout,*)'          ztaun      = ', ztaun
175         ENDIF
176   
177      ELSE
178
179         IF( kt == nit000 ) THEN
180   
181            ! Read Namelist namtau : surface wind stress
182            ! --------------------
183            REWIND ( numnam )
184            READ   ( numnam, namtau )
185   
186            IF(lwp) WRITE(numout,*)' '
187            IF(lwp) WRITE(numout,*)' tau     : Constant surface wind stress read in namelist'
188            IF(lwp) WRITE(numout,*)' ~~~~~~~ '
189            IF(lwp) WRITE(numout,*)'           Namelist namtau: set the constant stress values'
190            IF(lwp) WRITE(numout,*)'              spin up of the stress  ntau000 = ', ntau000, ' time-steps'
191            IF(lwp) WRITE(numout,*)'              constant i-stress      tau0x   = ', tau0x  , ' N/m2'
192            IF(lwp) WRITE(numout,*)'              constant j-stress      tau0y   = ', tau0y  , ' N/m2'
193   
194            ntau000 = MAX( ntau000, 1 )   ! must be >= 1
195   
196         ENDIF
197   
198         ! Increase the surface stress to its nominal value in ntau000 time-step
199         
200         IF( kt <= ntau000 ) THEN
201            zfacto = 0.5 * (  1. - COS( rpi * FLOAT( kt ) / FLOAT( ntau000 ) )  )
202            taux (:,:) = zfacto * tau0x
203            tauy (:,:) = zfacto * tau0y
204            tauxg(:,:) = zfacto * tau0x
205            tauyg(:,:) = zfacto * tau0y
206         ENDIF
207
208      ENDIF
209     
210   END SUBROUTINE tau
211#endif
212   !!======================================================================
213END MODULE taumod
Note: See TracBrowser for help on using the repository browser.