/[MITgcm]/MITgcm/pkg/exf/exf_init.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_init.F

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


Revision 1.21 - (show annotations) (download)
Mon Feb 16 09:10:18 2009 UTC (15 years, 3 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62a, checkpoint62e, checkpoint62d, checkpoint62, checkpoint62b, checkpoint61n, checkpoint61q, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.20: +8 -1 lines
add capability to bypass interpolation for runoff
by setting yet another CPP-flag

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_init.F,v 1.20 2008/06/11 18:55:10 gforget Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5
6
7 subroutine exf_init( mythid )
8
9 c ==================================================================
10 c SUBROUTINE exf_init
11 c ==================================================================
12 c
13 c o This routine initialises the forcing
14 c
15 c started: Ralf.Giering@FastOpt.de 25-Mai-20000
16 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
17 c
18 c ==================================================================
19 c SUBROUTINE exf_init
20 c ==================================================================
21
22 implicit none
23
24 c == global variables ==
25
26 #include "EEPARAMS.h"
27 #include "SIZE.h"
28 #include "GRID.h"
29 #include "cal.h"
30 #include "EXF_PARAM.h"
31 #include "EXF_FIELDS.h"
32
33 c == routine arguments ==
34
35 integer mythid
36
37 c == local variables ==
38
39 integer interp_method
40 INTEGER i,j,bi,bj
41
42 c == end of interface ==
43
44 C-- Initialise to zero intermediate fields (in common block)
45 DO bj = myByLo(myThid), myByHi(myThid)
46 DO bi = myBxLo(myThid), myBxHi(myThid)
47 DO j=1-Oly,sNy+Oly
48 DO i=1-Olx,sNx+Olx
49 wStress(i,j,bi,bj) = 0.
50 cw(i,j,bi,bj) = 0.
51 sw(i,j,bi,bj) = 0.
52 sh(i,j,bi,bj) = 0.
53 #ifdef ALLOW_ATM_TEMP
54 hs(i,j,bi,bj) = 0.
55 hl(i,j,bi,bj) = 0.
56 #endif
57 ENDDO
58 ENDDO
59 ENDDO
60 ENDDO
61
62 if ( useCubedSphereExchange
63 & .and. ustressperiod .eq. 0
64 & .and. ustressfile .NE. ' ' ) then
65 stop 'CubedSphereExchange and ustressperiod=0 not supported'
66 endif
67 interp_method=12
68 call exf_init_gen (
69 & ustressfile, ustressperiod, exf_inscal_ustress, ustressmask,
70 & ustressconst, ustress, ustress0, ustress1,
71 #ifdef USE_EXF_INTERPOLATION
72 & ustress_lon0, ustress_lon_inc,
73 & ustress_lat0, ustress_lat_inc,
74 & ustress_nlon, ustress_nlat, xC, yC, interp_method,
75 #endif
76 & mythid )
77
78 if ( useCubedSphereExchange
79 & .and. vstressperiod .eq. 0
80 & .and. vstressfile .NE. ' ' ) then
81 stop 'CubedSphereExchange and vstressperiod=0 not supported'
82 endif
83 interp_method=22
84 call exf_init_gen (
85 & vstressfile, vstressperiod, exf_inscal_vstress, vstressmask,
86 & vstressconst, vstress, vstress0, vstress1,
87 #ifdef USE_EXF_INTERPOLATION
88 & vstress_lon0, vstress_lon_inc,
89 & vstress_lat0, vstress_lat_inc,
90 & vstress_nlon, vstress_nlat, xC, yC, interp_method,
91 #endif
92 & mythid )
93
94 #ifdef ALLOW_ATM_WIND
95
96 if ( useCubedSphereExchange
97 & .and. uwindperiod .eq. 0
98 & .and. uwindfile .NE. ' ' ) then
99 stop 'CubedSphereExchange and uwindperiod=0 not supported'
100 endif
101 interp_method=12
102 call exf_init_gen (
103 & uwindfile, uwindperiod, exf_inscal_uwind, uwindmask,
104 & uwindconst, uwind, uwind0, uwind1,
105 #ifdef USE_EXF_INTERPOLATION
106 & uwind_lon0, uwind_lon_inc,
107 & uwind_lat0, uwind_lat_inc,
108 & uwind_nlon, uwind_nlat, xC, yC, interp_method,
109 #endif
110 & mythid )
111
112 if ( useCubedSphereExchange
113 & .and. vwindperiod .eq. 0
114 & .and. vwindfile .NE. ' ' ) then
115 stop 'CubedSphereExchange and vwindperiod=0 not supported'
116 endif
117 interp_method=22
118 call exf_init_gen (
119 & vwindfile, vwindperiod, exf_inscal_vwind, vwindmask,
120 & vwindconst, vwind, vwind0, vwind1,
121 #ifdef USE_EXF_INTERPOLATION
122 & vwind_lon0, vwind_lon_inc,
123 & vwind_lat0, vwind_lat_inc,
124 & vwind_nlon, vwind_nlat, xC, yC, interp_method,
125 #endif
126 & mythid )
127
128 #endif /* ALLOW_ATM_WIND */
129
130 interp_method=1
131
132 call exf_init_gen (
133 & wspeedfile, wspeedperiod, exf_inscal_wspeed, wspeedmask,
134 & wspeedconst, wspeed, wspeed0, wspeed1,
135 #ifdef USE_EXF_INTERPOLATION
136 & wspeed_lon0, wspeed_lon_inc,
137 & wspeed_lat0, wspeed_lat_inc,
138 & wspeed_nlon, wspeed_nlat, xC, yC, interp_method,
139 #endif
140 & mythid )
141
142 call exf_init_gen (
143 & hfluxfile, hfluxperiod, exf_inscal_hflux, hfluxmask,
144 & hfluxconst, hflux, hflux0, hflux1,
145 #ifdef USE_EXF_INTERPOLATION
146 & hflux_lon0, hflux_lon_inc,
147 & hflux_lat0, hflux_lat_inc,
148 & hflux_nlon, hflux_nlat, xC, yC, interp_method,
149 #endif
150 & mythid )
151
152 call exf_init_gen (
153 & sfluxfile, sfluxperiod, exf_inscal_sflux, sfluxmask,
154 & sfluxconst, sflux, sflux0, sflux1,
155 #ifdef USE_EXF_INTERPOLATION
156 & sflux_lon0, sflux_lon_inc,
157 & sflux_lat0, sflux_lat_inc,
158 & sflux_nlon, sflux_nlat, xC, yC, interp_method,
159 #endif
160 & mythid )
161
162 #ifdef ALLOW_ATM_TEMP
163
164 call exf_init_gen (
165 & atempfile, atempperiod, exf_inscal_atemp, atempmask,
166 & atempconst, atemp, atemp0, atemp1,
167 #ifdef USE_EXF_INTERPOLATION
168 & atemp_lon0, atemp_lon_inc,
169 & atemp_lat0, atemp_lat_inc,
170 & atemp_nlon, atemp_nlat, xC, yC, interp_method,
171 #endif
172 & mythid )
173
174 call exf_init_gen (
175 & aqhfile, aqhperiod, exf_inscal_aqh, aqhmask,
176 & aqhconst, aqh, aqh0, aqh1,
177 #ifdef USE_EXF_INTERPOLATION
178 & aqh_lon0, aqh_lon_inc,
179 & aqh_lat0, aqh_lat_inc,
180 & aqh_nlon, aqh_nlat, xC, yC, interp_method,
181 #endif
182 & mythid )
183
184 call exf_init_gen (
185 & lwfluxfile, lwfluxperiod, exf_inscal_lwflux, lwfluxmask,
186 & lwfluxconst, lwflux, lwflux0, lwflux1,
187 #ifdef USE_EXF_INTERPOLATION
188 & lwflux_lon0, lwflux_lon_inc,
189 & lwflux_lat0, lwflux_lat_inc,
190 & lwflux_nlon, lwflux_nlat, xC, yC, interp_method,
191 #endif
192 & mythid )
193
194 call exf_init_gen (
195 & precipfile, precipperiod, exf_inscal_precip, precipmask,
196 & precipconst, precip, precip0, precip1,
197 #ifdef USE_EXF_INTERPOLATION
198 & precip_lon0, precip_lon_inc,
199 & precip_lat0, precip_lat_inc,
200 & precip_nlon, precip_nlat, xC, yC, interp_method,
201 #endif
202 & mythid )
203
204 call exf_init_gen (
205 & snowprecipfile, snowprecipperiod,
206 & exf_inscal_snowprecip, snowprecipmask,
207 & snowprecipconst, snowprecip, snowprecip0, snowprecip1,
208 #ifdef USE_EXF_INTERPOLATION
209 & snowprecip_lon0, snowprecip_lon_inc,
210 & snowprecip_lat0, snowprecip_lat_inc,
211 & snowprecip_nlon, snowprecip_nlat, xC, yC, interp_method,
212 #endif
213 & mythid )
214
215 #endif /* ALLOW_ATM_TEMP */
216
217 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
218 call exf_init_gen (
219 & swfluxfile, swfluxperiod, exf_inscal_swflux, swfluxmask,
220 & swfluxconst, swflux, swflux0, swflux1,
221 #ifdef USE_EXF_INTERPOLATION
222 & swflux_lon0, swflux_lon_inc,
223 & swflux_lat0, swflux_lat_inc,
224 & swflux_nlon, swflux_nlat, xC, yC, interp_method,
225 #endif
226 & mythid )
227 #endif /* defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) */
228
229 #if defined(ALLOW_ATM_TEMP) || defined(EXF_READ_EVAP)
230 call exf_init_gen (
231 & evapfile, evapperiod, exf_inscal_evap, evapmask,
232 & evapconst, evap, evap0, evap1,
233 #ifdef USE_EXF_INTERPOLATION
234 & evap_lon0, evap_lon_inc,
235 & evap_lat0, evap_lat_inc,
236 & evap_nlon, evap_nlat, xC, yC, interp_method,
237 #endif
238 & mythid )
239 #endif /* defined(ALLOW_ATM_TEMP) || defined(EXF_READ_EVAP) */
240
241 #ifdef ALLOW_DOWNWARD_RADIATION
242
243 call exf_init_gen (
244 & swdownfile, swdownperiod, exf_inscal_swdown, swdownmask,
245 & swdownconst, swdown, swdown0, swdown1,
246 #ifdef USE_EXF_INTERPOLATION
247 & swdown_lon0, swdown_lon_inc,
248 & swdown_lat0, swdown_lat_inc,
249 & swdown_nlon, swdown_nlat, xC, yC, interp_method,
250 #endif
251 & mythid )
252
253 call exf_init_gen (
254 & lwdownfile, lwdownperiod, exf_inscal_lwdown, lwdownmask,
255 & lwdownconst, lwdown, lwdown0, lwdown1,
256 #ifdef USE_EXF_INTERPOLATION
257 & lwdown_lon0, lwdown_lon_inc,
258 & lwdown_lat0, lwdown_lat_inc,
259 & lwdown_nlon, lwdown_nlat, xC, yC, interp_method,
260 #endif
261 & mythid )
262
263 #endif /* ALLOW_DOWNWARD_RADIATION */
264
265 #ifdef ATMOSPHERIC_LOADING
266 call exf_init_gen (
267 & apressurefile, apressureperiod,
268 & exf_inscal_apressure, apressuremask,
269 & apressureconst, apressure, apressure0, apressure1,
270 #ifdef USE_EXF_INTERPOLATION
271 & apressure_lon0, apressure_lon_inc,
272 & apressure_lat0, apressure_lat_inc,
273 & apressure_nlon, apressure_nlat, xC, yC, interp_method,
274 #endif
275 & mythid )
276 #endif /* ATMOSPHERIC_LOADING */
277
278 #ifdef ALLOW_ICE_AREAMASK
279 call exf_init_gen (
280 & areamaskfile, areamaskperiod,
281 & exf_inscal_areamask, areamaskmask,
282 & areamaskconst, areamask, areamask0, areamask1,
283 #ifdef USE_EXF_INTERPOLATION
284 & areamask_lon0, areamask_lon_inc,
285 & areamask_lat0, areamask_lat_inc,
286 & areamask_nlon, areamask_nlat, xC, yC, interp_method,
287 #endif
288 & mythid )
289 #endif /* ALLOW_ICE_AREAMASK */
290
291 #ifdef ALLOW_RUNOFF
292 #ifdef USE_NO_INTERP_RUNOFF
293 call exf_init_runoff (
294 & runofffile, runoffperiod, exf_inscal_runoff, runoffmask,
295 & runoffconst, runoff, runoff0, runoff1,
296 & mythid )
297 #else /* ndef USE_NO_INTERP_RUNOFF */
298 call exf_init_gen (
299 & runofffile, runoffperiod, exf_inscal_runoff, runoffmask,
300 & runoffconst, runoff, runoff0, runoff1,
301 #ifdef USE_EXF_INTERPOLATION
302 & runoff_lon0, runoff_lon_inc,
303 & runoff_lat0, runoff_lat_inc,
304 & runoff_nlon, runoff_nlat, xC, yC, interp_method,
305 #endif
306 & mythid )
307 #endif /* def USE_NO_INTERP_RUNOFF */
308 #endif /* ALLOW_RUNOFF */
309
310 #ifdef ALLOW_CLIMSST_RELAXATION
311 interp_method=2
312 call exf_init_gen (
313 & climsstfile, climsstperiod, exf_inscal_climsst, climsstmask,
314 & climsstconst, climsst, climsst0, climsst1,
315 #ifdef USE_EXF_INTERPOLATION
316 & climsst_lon0, climsst_lon_inc,
317 & climsst_lat0, climsst_lat_inc,
318 & climsst_nlon, climsst_nlat, xC, yC, interp_method,
319 #endif
320 & mythid )
321 #endif
322
323 #ifdef ALLOW_CLIMSSS_RELAXATION
324 interp_method=2
325 call exf_init_gen (
326 & climsssfile, climsssperiod, exf_inscal_climsss, climsssmask,
327 & climsssconst, climsss, climsss0, climsss1,
328 #ifdef USE_EXF_INTERPOLATION
329 & climsss_lon0, climsss_lon_inc,
330 & climsss_lat0, climsss_lat_inc,
331 & climsss_nlon, climsss_nlat, xC, yC, interp_method,
332 #endif
333 & mythid )
334 #endif
335
336 c Initialize climatological fields
337 cph call exf_clim_init ( mythid )
338
339 RETURN
340 END

  ViewVC Help
Powered by ViewVC 1.1.22