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