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

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

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


Revision 1.20 - (hide 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 edhill 1.20 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 adcroft 1.12 C $Name: $
3 cnh 1.1
4 edhill 1.20 #include "PACKAGES_CONFIG.h"
5 cnh 1.1 #include "CPP_OPTIONS.h"
6 heimbach 1.19 #ifdef ALLOW_OBCS
7     # include "OBCS_OPTIONS.h"
8     #endif
9 cnh 1.1
10 cnh 1.13 CBOP
11     C !ROUTINE: EXTERNAL_FORCING_U
12     C !INTERFACE:
13 cnh 1.1 SUBROUTINE EXTERNAL_FORCING_U(
14     I iMin, iMax, jMin, jMax,bi,bj,kLev,
15     I myCurrentTime,myThid)
16 cnh 1.13 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 cnh 1.2 IMPLICIT NONE
28 cnh 1.1 C == Global data ==
29     #include "SIZE.h"
30     #include "EEPARAMS.h"
31     #include "PARAMS.h"
32     #include "GRID.h"
33     #include "DYNVARS.h"
34 cnh 1.2 #include "FFIELDS.h"
35 cnh 1.13
36     C !INPUT/OUTPUT PARAMETERS:
37 cnh 1.1 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 adcroft 1.4 _RL myCurrentTime
45     INTEGER myThid
46 cnh 1.1
47 cnh 1.13 C !LOCAL VARIABLES:
48 cnh 1.2 C == Local variables ==
49     C Loop counters
50     INTEGER I, J
51 mlosch 1.17 C number of surface interface layer
52     INTEGER kSurface
53 cnh 1.13 CEOP
54 cnh 1.2
55 mlosch 1.17 if ( buoyancyRelation .eq. 'OCEANICP' ) then
56     kSurface = Nr
57     else
58     kSurface = 1
59     endif
60    
61 cnh 1.2 C-- Forcing term
62     C Add windstress momentum impulse into the top-layer
63 mlosch 1.17 IF ( kLev .EQ. kSurface ) THEN
64 cnh 1.2 DO j=jMin,jMax
65     DO i=iMin,iMax
66     gU(i,j,kLev,bi,bj) = gU(i,j,kLev,bi,bj)
67 heimbach 1.7 & +foFacMom*surfaceTendencyU(i,j,bi,bj)
68 adcroft 1.3 & *_maskW(i,j,kLev,bi,bj)
69 cnh 1.2 ENDDO
70     ENDDO
71     ENDIF
72    
73 heimbach 1.16 #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 heimbach 1.14 #endif
80    
81 cnh 1.1 RETURN
82     END
83 cnh 1.13 CBOP
84     C !ROUTINE: EXTERNAL_FORCING_V
85     C !INTERFACE:
86 cnh 1.1 SUBROUTINE EXTERNAL_FORCING_V(
87     I iMin, iMax, jMin, jMax,bi,bj,kLev,
88     I myCurrentTime,myThid)
89 cnh 1.13 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 cnh 1.2 IMPLICIT NONE
101 cnh 1.1 C == Global data ==
102     #include "SIZE.h"
103     #include "EEPARAMS.h"
104     #include "PARAMS.h"
105     #include "GRID.h"
106     #include "DYNVARS.h"
107 cnh 1.2 #include "FFIELDS.h"
108    
109 cnh 1.13 C !INPUT/OUTPUT PARAMETERS:
110 cnh 1.1 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 adcroft 1.4 _RL myCurrentTime
118     INTEGER myThid
119 cnh 1.13
120     C !LOCAL VARIABLES:
121 cnh 1.2 C == Local variables ==
122     C Loop counters
123     INTEGER I, J
124 mlosch 1.17 C number of surface interface layer
125     INTEGER kSurface
126 cnh 1.13 CEOP
127 cnh 1.2
128 mlosch 1.17 if ( buoyancyRelation .eq. 'OCEANICP' ) then
129     kSurface = Nr
130     else
131     kSurface = 1
132     endif
133    
134 cnh 1.2 C-- Forcing term
135     C Add windstress momentum impulse into the top-layer
136 mlosch 1.17 IF ( kLev .EQ. kSurface ) THEN
137 cnh 1.2 DO j=jMin,jMax
138     DO i=iMin,iMax
139     gV(i,j,kLev,bi,bj) = gV(i,j,kLev,bi,bj)
140 heimbach 1.7 & +foFacMom*surfaceTendencyV(i,j,bi,bj)
141 adcroft 1.3 & *_maskS(i,j,kLev,bi,bj)
142 cnh 1.2 ENDDO
143     ENDDO
144     ENDIF
145 cnh 1.1
146 heimbach 1.16 #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 heimbach 1.14 #endif
153    
154 cnh 1.1 RETURN
155     END
156 cnh 1.13 CBOP
157     C !ROUTINE: EXTERNAL_FORCING_T
158     C !INTERFACE:
159 cnh 1.1 SUBROUTINE EXTERNAL_FORCING_T(
160     I iMin, iMax, jMin, jMax,bi,bj,kLev,
161     I myCurrentTime,myThid)
162 cnh 1.13 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 cnh 1.2 IMPLICIT NONE
174 cnh 1.1 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 heimbach 1.7 #ifdef SHORTWAVE_HEATING
182 heimbach 1.8 integer two
183     _RL minusone
184     parameter (two=2,minusone=-1.)
185     _RL swfracb(two)
186 heimbach 1.7 #endif
187    
188 cnh 1.13 C !INPUT/OUTPUT PARAMETERS:
189 cnh 1.1 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 adcroft 1.4 _RL myCurrentTime
197     INTEGER myThid
198 cnh 1.1 CEndOfInterface
199    
200 cnh 1.13 C !LOCAL VARIABLES:
201 cnh 1.2 C == Local variables ==
202     C Loop counters
203     INTEGER I, J
204 mlosch 1.17 C number of surface interface layer
205     INTEGER kSurface
206 cnh 1.13 CEOP
207 cnh 1.2
208 mlosch 1.17 if ( buoyancyRelation .eq. 'OCEANICP' ) then
209     kSurface = Nr
210     else
211     kSurface = 1
212     endif
213    
214 cnh 1.2 C-- Forcing term
215     C Add heat in top-layer
216 mlosch 1.17 IF ( kLev .EQ. kSurface ) THEN
217 cnh 1.2 DO j=jMin,jMax
218     DO i=iMin,iMax
219     gT(i,j,kLev,bi,bj)=gT(i,j,kLev,bi,bj)
220 adcroft 1.12 & +maskC(i,j,kLev,bi,bj)*surfaceTendencyT(i,j,bi,bj)
221 cnh 1.2 ENDDO
222     ENDDO
223     ENDIF
224 adcroft 1.5
225     #ifdef SHORTWAVE_HEATING
226     C Penetrating SW radiation
227 heimbach 1.8 swfracb(1)=abs(rF(klev))
228     swfracb(2)=abs(rF(klev+1))
229     call SWFRAC(
230     I two,minusone,
231     I myCurrentTime,myThid,
232 dimitri 1.18 U swfracb)
233 adcroft 1.5 DO j=jMin,jMax
234     DO i=iMin,iMax
235 adcroft 1.12 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 mlosch 1.17 & *recip_Cp*recip_rhoConst*recip_drF(klev)
238 adcroft 1.5 ENDDO
239     ENDDO
240     #endif
241 heimbach 1.14
242 heimbach 1.16 #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 heimbach 1.14 #endif
249    
250 cnh 1.1 RETURN
251     END
252 cnh 1.13 CBOP
253     C !ROUTINE: EXTERNAL_FORCING_S
254     C !INTERFACE:
255 cnh 1.1 SUBROUTINE EXTERNAL_FORCING_S(
256     I iMin, iMax, jMin, jMax,bi,bj,kLev,
257     I myCurrentTime,myThid)
258 cnh 1.13
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 cnh 1.2 IMPLICIT NONE
271 cnh 1.1 C == Global data ==
272     #include "SIZE.h"
273     #include "EEPARAMS.h"
274     #include "PARAMS.h"
275     #include "GRID.h"
276     #include "DYNVARS.h"
277 cnh 1.2 #include "FFIELDS.h"
278 cnh 1.1
279 cnh 1.13 C !INPUT/OUTPUT PARAMETERS:
280 cnh 1.1 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 adcroft 1.4 _RL myCurrentTime
288     INTEGER myThid
289 cnh 1.2
290 cnh 1.13 C !LOCAL VARIABLES:
291 cnh 1.2 C == Local variables ==
292     C Loop counters
293     INTEGER I, J
294 mlosch 1.17 C number of surface interface layer
295     INTEGER kSurface
296 cnh 1.13 CEOP
297 cnh 1.2
298 mlosch 1.17 if ( buoyancyRelation .eq. 'OCEANICP' ) then
299     kSurface = Nr
300     else
301     kSurface = 1
302     endif
303    
304    
305 cnh 1.2 C-- Forcing term
306     C Add fresh-water in top-layer
307 mlosch 1.17 IF ( kLev .EQ. kSurface ) THEN
308 cnh 1.2 DO j=jMin,jMax
309     DO i=iMin,iMax
310     gS(i,j,kLev,bi,bj)=gS(i,j,kLev,bi,bj)
311 adcroft 1.12 & +maskC(i,j,kLev,bi,bj)*surfaceTendencyS(i,j,bi,bj)
312 cnh 1.2 ENDDO
313     ENDDO
314     ENDIF
315 heimbach 1.14
316 heimbach 1.16 #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 heimbach 1.14 #endif
323 cnh 1.1
324     RETURN
325     END

  ViewVC Help
Powered by ViewVC 1.1.22