/[MITgcm]/MITgcm/model/src/external_forcing.F
ViewVC logotype

Contents of /MITgcm/model/src/external_forcing.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.20 - (show annotations) (download)
Thu Oct 9 04:19:18 2003 UTC (20 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51l_post, checkpoint52, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51r_post, checkpoint51i_post, checkpoint52a_pre, branch-netcdf, checkpoint51o_post, checkpoint52a_post, ecco_c52_e35, checkpoint51m_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.19: +2 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 C $Header: /u/u3/gcmpack/MITgcm/model/src/external_forcing.F,v 1.19.2.1 2003/10/02 18:10:45 edhill Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6 #ifdef ALLOW_OBCS
7 # include "OBCS_OPTIONS.h"
8 #endif
9
10 CBOP
11 C !ROUTINE: EXTERNAL_FORCING_U
12 C !INTERFACE:
13 SUBROUTINE EXTERNAL_FORCING_U(
14 I iMin, iMax, jMin, jMax,bi,bj,kLev,
15 I myCurrentTime,myThid)
16 C !DESCRIPTION: \bv
17 C *==========================================================*
18 C | S/R EXTERNAL_FORCING_U
19 C | o Contains problem specific forcing for zonal velocity.
20 C *==========================================================*
21 C | Adds terms to gU for forcing by external sources
22 C | e.g. wind stress, bottom friction etc..................
23 C *==========================================================*
24 C \ev
25
26 C !USES:
27 IMPLICIT NONE
28 C == Global data ==
29 #include "SIZE.h"
30 #include "EEPARAMS.h"
31 #include "PARAMS.h"
32 #include "GRID.h"
33 #include "DYNVARS.h"
34 #include "FFIELDS.h"
35
36 C !INPUT/OUTPUT PARAMETERS:
37 C == Routine arguments ==
38 C iMin - Working range of tile for applying forcing.
39 C iMax
40 C jMin
41 C jMax
42 C kLev
43 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
44 _RL myCurrentTime
45 INTEGER myThid
46
47 C !LOCAL VARIABLES:
48 C == Local variables ==
49 C Loop counters
50 INTEGER I, J
51 C number of surface interface layer
52 INTEGER kSurface
53 CEOP
54
55 if ( buoyancyRelation .eq. 'OCEANICP' ) then
56 kSurface = Nr
57 else
58 kSurface = 1
59 endif
60
61 C-- Forcing term
62 C Add windstress momentum impulse into the top-layer
63 IF ( kLev .EQ. kSurface ) THEN
64 DO j=jMin,jMax
65 DO i=iMin,iMax
66 gU(i,j,kLev,bi,bj) = gU(i,j,kLev,bi,bj)
67 & +foFacMom*surfaceTendencyU(i,j,bi,bj)
68 & *_maskW(i,j,kLev,bi,bj)
69 ENDDO
70 ENDDO
71 ENDIF
72
73 #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_SPONGE))
74 IF (useOBCS) THEN
75 CALL OBCS_SPONGE_U(
76 I iMin, iMax, jMin, jMax,bi,bj,kLev,
77 I myCurrentTime,myThid)
78 ENDIF
79 #endif
80
81 RETURN
82 END
83 CBOP
84 C !ROUTINE: EXTERNAL_FORCING_V
85 C !INTERFACE:
86 SUBROUTINE EXTERNAL_FORCING_V(
87 I iMin, iMax, jMin, jMax,bi,bj,kLev,
88 I myCurrentTime,myThid)
89 C !DESCRIPTION: \bv
90 C *==========================================================*
91 C | S/R EXTERNAL_FORCING_V
92 C | o Contains problem specific forcing for merid velocity.
93 C *==========================================================*
94 C | Adds terms to gV for forcing by external sources
95 C | e.g. wind stress, bottom friction etc..................
96 C *==========================================================*
97 C \ev
98
99 C !USES:
100 IMPLICIT NONE
101 C == Global data ==
102 #include "SIZE.h"
103 #include "EEPARAMS.h"
104 #include "PARAMS.h"
105 #include "GRID.h"
106 #include "DYNVARS.h"
107 #include "FFIELDS.h"
108
109 C !INPUT/OUTPUT PARAMETERS:
110 C == Routine arguments ==
111 C iMin - Working range of tile for applying forcing.
112 C iMax
113 C jMin
114 C jMax
115 C kLev
116 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
117 _RL myCurrentTime
118 INTEGER myThid
119
120 C !LOCAL VARIABLES:
121 C == Local variables ==
122 C Loop counters
123 INTEGER I, J
124 C number of surface interface layer
125 INTEGER kSurface
126 CEOP
127
128 if ( buoyancyRelation .eq. 'OCEANICP' ) then
129 kSurface = Nr
130 else
131 kSurface = 1
132 endif
133
134 C-- Forcing term
135 C Add windstress momentum impulse into the top-layer
136 IF ( kLev .EQ. kSurface ) THEN
137 DO j=jMin,jMax
138 DO i=iMin,iMax
139 gV(i,j,kLev,bi,bj) = gV(i,j,kLev,bi,bj)
140 & +foFacMom*surfaceTendencyV(i,j,bi,bj)
141 & *_maskS(i,j,kLev,bi,bj)
142 ENDDO
143 ENDDO
144 ENDIF
145
146 #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_SPONGE))
147 IF (useOBCS) THEN
148 CALL OBCS_SPONGE_V(
149 I iMin, iMax, jMin, jMax,bi,bj,kLev,
150 I myCurrentTime,myThid)
151 ENDIF
152 #endif
153
154 RETURN
155 END
156 CBOP
157 C !ROUTINE: EXTERNAL_FORCING_T
158 C !INTERFACE:
159 SUBROUTINE EXTERNAL_FORCING_T(
160 I iMin, iMax, jMin, jMax,bi,bj,kLev,
161 I myCurrentTime,myThid)
162 C !DESCRIPTION: \bv
163 C *==========================================================*
164 C | S/R EXTERNAL_FORCING_T
165 C | o Contains problem specific forcing for temperature.
166 C *==========================================================*
167 C | Adds terms to gT for forcing by external sources
168 C | e.g. heat flux, climatalogical relaxation..............
169 C *==========================================================*
170 C \ev
171
172 C !USES:
173 IMPLICIT NONE
174 C == Global data ==
175 #include "SIZE.h"
176 #include "EEPARAMS.h"
177 #include "PARAMS.h"
178 #include "GRID.h"
179 #include "DYNVARS.h"
180 #include "FFIELDS.h"
181 #ifdef SHORTWAVE_HEATING
182 integer two
183 _RL minusone
184 parameter (two=2,minusone=-1.)
185 _RL swfracb(two)
186 #endif
187
188 C !INPUT/OUTPUT PARAMETERS:
189 C == Routine arguments ==
190 C iMin - Working range of tile for applying forcing.
191 C iMax
192 C jMin
193 C jMax
194 C kLev
195 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
196 _RL myCurrentTime
197 INTEGER myThid
198 CEndOfInterface
199
200 C !LOCAL VARIABLES:
201 C == Local variables ==
202 C Loop counters
203 INTEGER I, J
204 C number of surface interface layer
205 INTEGER kSurface
206 CEOP
207
208 if ( buoyancyRelation .eq. 'OCEANICP' ) then
209 kSurface = Nr
210 else
211 kSurface = 1
212 endif
213
214 C-- Forcing term
215 C Add heat in top-layer
216 IF ( kLev .EQ. kSurface ) THEN
217 DO j=jMin,jMax
218 DO i=iMin,iMax
219 gT(i,j,kLev,bi,bj)=gT(i,j,kLev,bi,bj)
220 & +maskC(i,j,kLev,bi,bj)*surfaceTendencyT(i,j,bi,bj)
221 ENDDO
222 ENDDO
223 ENDIF
224
225 #ifdef SHORTWAVE_HEATING
226 C Penetrating SW radiation
227 swfracb(1)=abs(rF(klev))
228 swfracb(2)=abs(rF(klev+1))
229 call SWFRAC(
230 I two,minusone,
231 I myCurrentTime,myThid,
232 U swfracb)
233 DO j=jMin,jMax
234 DO i=iMin,iMax
235 gT(i,j,klev,bi,bj) = gT(i,j,klev,bi,bj)
236 & -maskC(i,j,klev,bi,bj)*Qsw(i,j,bi,bj)*(swfracb(1)-swfracb(2))
237 & *recip_Cp*recip_rhoConst*recip_drF(klev)
238 ENDDO
239 ENDDO
240 #endif
241
242 #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_SPONGE))
243 IF (useOBCS) THEN
244 CALL OBCS_SPONGE_T(
245 I iMin, iMax, jMin, jMax,bi,bj,kLev,
246 I myCurrentTime,myThid)
247 ENDIF
248 #endif
249
250 RETURN
251 END
252 CBOP
253 C !ROUTINE: EXTERNAL_FORCING_S
254 C !INTERFACE:
255 SUBROUTINE EXTERNAL_FORCING_S(
256 I iMin, iMax, jMin, jMax,bi,bj,kLev,
257 I myCurrentTime,myThid)
258
259 C !DESCRIPTION: \bv
260 C *==========================================================*
261 C | S/R EXTERNAL_FORCING_S
262 C | o Contains problem specific forcing for merid velocity.
263 C *==========================================================*
264 C | Adds terms to gS for forcing by external sources
265 C | e.g. fresh-water flux, climatalogical relaxation.......
266 C *==========================================================*
267 C \ev
268
269 C !USES:
270 IMPLICIT NONE
271 C == Global data ==
272 #include "SIZE.h"
273 #include "EEPARAMS.h"
274 #include "PARAMS.h"
275 #include "GRID.h"
276 #include "DYNVARS.h"
277 #include "FFIELDS.h"
278
279 C !INPUT/OUTPUT PARAMETERS:
280 C == Routine arguments ==
281 C iMin - Working range of tile for applying forcing.
282 C iMax
283 C jMin
284 C jMax
285 C kLev
286 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
287 _RL myCurrentTime
288 INTEGER myThid
289
290 C !LOCAL VARIABLES:
291 C == Local variables ==
292 C Loop counters
293 INTEGER I, J
294 C number of surface interface layer
295 INTEGER kSurface
296 CEOP
297
298 if ( buoyancyRelation .eq. 'OCEANICP' ) then
299 kSurface = Nr
300 else
301 kSurface = 1
302 endif
303
304
305 C-- Forcing term
306 C Add fresh-water in top-layer
307 IF ( kLev .EQ. kSurface ) THEN
308 DO j=jMin,jMax
309 DO i=iMin,iMax
310 gS(i,j,kLev,bi,bj)=gS(i,j,kLev,bi,bj)
311 & +maskC(i,j,kLev,bi,bj)*surfaceTendencyS(i,j,bi,bj)
312 ENDDO
313 ENDDO
314 ENDIF
315
316 #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_SPONGE))
317 IF (useOBCS) THEN
318 CALL OBCS_SPONGE_S(
319 I iMin, iMax, jMin, jMax,bi,bj,kLev,
320 I myCurrentTime,myThid)
321 ENDIF
322 #endif
323
324 RETURN
325 END

  ViewVC Help
Powered by ViewVC 1.1.22