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

Annotation of /MITgcm/pkg/exf/exf_readparms.F

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


Revision 1.71 - (hide annotations) (download)
Thu Jan 5 23:41:51 2012 UTC (12 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63l, checkpoint63i, checkpoint63j, checkpoint63k
Changes since 1.70: +24 -19 lines
remove run-time parameter exf_yftype

1 jmc 1.71 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.70 2011/12/21 22:05:11 jmc Exp $
2 jmc 1.11 C $Name: $
3 heimbach 1.1
4 edhill 1.12 #include "EXF_OPTIONS.h"
5 jmc 1.68 #ifdef ALLOW_EXCH2
6     # include "W2_OPTIONS.h"
7     #endif /* ALLOW_EXCH2 */
8 heimbach 1.1
9 jmc 1.48 SUBROUTINE EXF_READPARMS( myThid )
10 heimbach 1.1
11     c ==================================================================
12     c SUBROUTINE exf_readparms
13     c ==================================================================
14     c
15     c o This routine initialises the package that calculates external
16     c forcing fields for a given timestep of the MITgcmUV. Parameters
17     c for this package are set in "data.externalforcing". Some additional
18 edhill 1.12 c precompiler switches have to be specified in "EXF_OPTIONS.h".
19 heimbach 1.1 c
20     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
21     c
22     c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
23     c - Restructured the code in order to create a package
24     c for the MITgcmUV.
25     c Christian Eckert eckert@mit.edu 12-Feb-2000
26     c - Changed Routine names (package prefix: exf_)
27 heimbach 1.2 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
28 heimbach 1.1 c - changed the handling of precip and sflux with respect
29     c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
30     c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
31 heimbach 1.2 c - moved relaxation and climatology to extra routines
32 heimbach 1.1 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
33     c - added obcs parameters
34 heimbach 1.2 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
35 jmc 1.53 c - added new obcs parameters (for each boundaries)
36 heimbach 1.3 c included runoff D. Stammer, Nov. 25, 2001
37     c included pressure forcing. heimbach@mit.edu 05-Nov-2002
38 dimitri 1.5 c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
39 dimitri 1.6 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
40 heimbach 1.1 c
41     c ==================================================================
42     c SUBROUTINE exf_readparms
43     c ==================================================================
44    
45     implicit none
46    
47     c == global variables ==
48    
49     #include "EEPARAMS.h"
50     #include "SIZE.h"
51 heimbach 1.15 #include "PARAMS.h"
52 jmc 1.68 #ifdef USE_EXF_INTERPOLATION
53     # ifdef ALLOW_EXCH2
54     # include "W2_EXCH2_SIZE.h"
55     # include "W2_EXCH2_TOPOLOGY.h"
56     # endif /* ALLOW_EXCH2 */
57     # include "SET_GRID.h"
58     #endif /* USE_EXF_INTERPOLATION */
59 jmc 1.48 c#include "cal.h"
60 jmc 1.40 #include "EXF_PARAM.h"
61     #include "EXF_CONSTANTS.h"
62 heimbach 1.1
63     c == routine arguments ==
64    
65 jmc 1.71 INTEGER myThid
66 heimbach 1.1
67     c == local variables ==
68    
69 jmc 1.55 #ifdef USE_EXF_INTERPOLATION
70 jmc 1.68 INTEGER gridNx, gridNy
71 jmc 1.70 INTEGER j
72     _RL inp_lon0, inp_lat0, inp_dLon, inp_dLat
73 jmc 1.68 #endif /* USE_EXF_INTERPOLATION */
74 jmc 1.71 INTEGER iUnit
75     CHARACTER*(2) exf_yftype
76     CHARACTER*(MAX_LEN_MBUF) msgBuf
77 heimbach 1.1
78     c == end of interface ==
79    
80     c Surface flux data.
81 heimbach 1.43 NAMELIST /EXF_NML_01/
82 jmc 1.47 & windstressmax, repeatPeriod, exf_albedo,
83 mlosch 1.31 & ocean_emissivity, ice_emissivity, snow_emissivity,
84 jmc 1.47 & exf_iceCd, exf_iceCe, exf_iceCh,
85 heimbach 1.43 & exf_scal_BulkCdn, climtempfreeze,
86 jmc 1.63 & exf_iprec, exf_iprec_obcs, exf_yftype,
87     & exf_verbose, useExfCheckRange, exf_monFreq,
88     & useExfYearlyFields, twoDigitYear,
89 jmc 1.48 & useStabilityFct_overIce, readStressOnAgrid, readStressOnCgrid,
90 gforget 1.58 & useRelativeWind, noNegativeEvap,
91 gforget 1.59 & select_ZenAlbedo, useExfZenIncoming,
92 jmc 1.47 & hu, ht, umin, atmrho, atmcp, cen2kel, gravity_mks,
93 heimbach 1.46 & cdrag_1, cdrag_2, cdrag_3, cstanton_1, cstanton_2, cdalton,
94     & flamb, flami, zolmin, zref,
95     & cvapor_fac, cvapor_exp, cvapor_fac_ice, cvapor_exp_ice,
96 jmc 1.52 & humid_fac, gamma_blk, saltsat, sstExtrapol, psim_fac
97 heimbach 1.43
98     NAMELIST /EXF_NML_02/
99     & hfluxfile, atempfile, aqhfile,
100     & sfluxfile, precipfile, runofffile,
101     & ustressfile, vstressfile, evapfile,
102     & snowprecipfile, uwindfile, vwindfile,
103     & wspeedfile, swfluxfile, lwfluxfile,
104     & apressurefile, swdownfile, lwdownfile,
105 jmc 1.53 & areamaskfile, climsstfile, climsssfile,
106 heimbach 1.60 & climustrfile, climvstrfile,
107 heimbach 1.1 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
108     & atempstartdate1, atempstartdate2, atempperiod,
109     & aqhstartdate1, aqhstartdate2, aqhperiod,
110     & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
111 dimitri 1.5 & evapstartdate1, evapstartdate2, evapperiod,
112 heimbach 1.1 & precipstartdate1, precipstartdate2, precipperiod,
113 heimbach 1.30 & snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod,
114 heimbach 1.3 & runoffstartdate1, runoffstartdate2, runoffperiod,
115 heimbach 1.1 & ustressstartdate1, ustressstartdate2, ustressperiod,
116     & vstressstartdate1, vstressstartdate2, vstressperiod,
117     & uwindstartdate1, uwindstartdate2, uwindperiod,
118     & vwindstartdate1, vwindstartdate2, vwindperiod,
119 heimbach 1.30 & wspeedstartdate1, wspeedstartdate2, wspeedperiod,
120 heimbach 1.1 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
121     & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
122 dimitri 1.6 & swdownstartdate1, swdownstartdate2, swdownperiod,
123     & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
124 heimbach 1.3 &apressurestartdate1,apressurestartdate2,apressureperiod,
125 gforget 1.51 & areamaskstartdate1,areamaskstartdate2,areamaskperiod,
126     & climsststartdate1, climsststartdate2, climsstperiod,
127 gforget 1.56 & climsssstartdate1, climsssstartdate2, climsssperiod,
128 heimbach 1.60 & climustrstartdate1, climustrstartdate2,climustrperiod,
129     & climvstrstartdate1, climvstrstartdate2,climvstrperiod,
130     & areamaskTauRelax, climsstTauRelax, climsssTauRelax,
131     & climustrTauRelax,climvstrTauRelax
132 heimbach 1.43
133     NAMELIST /EXF_NML_03/
134 heimbach 1.30 & exf_inscal_hflux, exf_inscal_sflux, exf_inscal_evap,
135 dimitri 1.14 & exf_inscal_ustress, exf_inscal_vstress,
136 heimbach 1.30 & exf_inscal_uwind, exf_inscal_vwind, exf_inscal_wspeed,
137     & exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh,
138 dimitri 1.14 & exf_inscal_sst, exf_inscal_sss,
139     & exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip,
140 heimbach 1.30 & exf_inscal_runoff, exf_inscal_apressure, exf_inscal_snowprecip,
141 heimbach 1.8 & exf_inscal_swdown, exf_inscal_lwdown,
142 heimbach 1.43 & exf_inscal_climsst, exf_inscal_climsss,
143 heimbach 1.60 & exf_inscal_climustr, exf_inscal_climvstr,
144 heimbach 1.8 & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
145 dimitri 1.14 & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
146 heimbach 1.8 & exf_outscal_sflux, exf_outscal_apressure,
147 jmc 1.53 & hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
148 jmc 1.32 & precipconst, snowprecipconst, runoffconst, ustressconst,
149     & vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
150     & lwfluxconst, swdownconst, lwdownconst, apressureconst,
151 gforget 1.51 & areamaskconst, climsstconst, climsssconst,
152 heimbach 1.60 & climustrconst, climvstrconst,
153 heimbach 1.29 & hflux_exfremo_intercept, hflux_exfremo_slope,
154 heimbach 1.28 & atemp_exfremo_intercept, atemp_exfremo_slope,
155     & aqh_exfremo_intercept, aqh_exfremo_slope,
156     & sflux_exfremo_intercept, sflux_exfremo_slope,
157     & evap_exfremo_intercept, evap_exfremo_slope,
158     & precip_exfremo_intercept, precip_exfremo_slope,
159 heimbach 1.30 & snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
160 heimbach 1.28 & runoff_exfremo_intercept, runoff_exfremo_slope,
161     & ustress_exfremo_intercept, ustress_exfremo_slope,
162     & vstress_exfremo_intercept, vstress_exfremo_slope,
163     & uwind_exfremo_intercept, uwind_exfremo_slope,
164     & vwind_exfremo_intercept, vwind_exfremo_slope,
165 heimbach 1.30 & wspeed_exfremo_intercept, wspeed_exfremo_slope,
166 heimbach 1.28 & swflux_exfremo_intercept, swflux_exfremo_slope,
167     & lwflux_exfremo_intercept, lwflux_exfremo_slope,
168     & swdown_exfremo_intercept, swdown_exfremo_slope,
169     & lwdown_exfremo_intercept, lwdown_exfremo_slope,
170 heimbach 1.43 & apressure_exfremo_intercept, apressure_exfremo_slope,
171 jmc 1.55 & areamask_exfremo_intercept, areamask_exfremo_slope,
172 heimbach 1.43 & climsst_exfremo_intercept, climsst_exfremo_slope,
173 heimbach 1.60 & climsss_exfremo_intercept, climsss_exfremo_slope,
174     & climustr_exfremo_intercept, climustr_exfremo_slope,
175     & climvstr_exfremo_intercept, climvstr_exfremo_slope
176 heimbach 1.43
177 mlosch 1.66 #ifdef USE_EXF_INTERPOLATION
178 heimbach 1.43 NAMELIST /EXF_NML_04/
179 mlosch 1.66 & ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
180 jmc 1.69 & ustress_nlon, ustress_nlat, ustress_interpMethod,
181 jmc 1.11 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
182 jmc 1.69 & vstress_nlon, vstress_nlat, vstress_interpMethod,
183 jmc 1.11 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
184 jmc 1.69 & hflux_nlon, hflux_nlat, hflux_interpMethod,
185 jmc 1.11 & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
186 jmc 1.69 & sflux_nlon, sflux_nlat, sflux_interpMethod,
187 jmc 1.11 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
188 jmc 1.69 & swflux_nlon, swflux_nlat, swflux_interpMethod,
189 heimbach 1.35 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
190 jmc 1.69 & lwflux_nlon, lwflux_nlat, lwflux_interpMethod,
191 jmc 1.11 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
192 jmc 1.69 & atemp_nlon, atemp_nlat, atemp_interpMethod,
193     & aqh_lon0, aqh_lon_inc, aqh_lat0,aqh_lat_inc,
194     & aqh_nlon, aqh_nlat, aqh_interpMethod,
195     & evap_lon0, evap_lon_inc, evap_lat0, evap_lat_inc,
196     & evap_nlon, evap_nlat, evap_interpMethod,
197 jmc 1.32 & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
198 jmc 1.69 & precip_nlon, precip_nlat, precip_interpMethod,
199 heimbach 1.35 & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
200 jmc 1.69 & runoff_nlon, runoff_nlat, runoff_interpMethod,
201     & snowprecip_lon0, snowprecip_lon_inc,
202     & snowprecip_lat0, snowprecip_lat_inc,
203     & snowprecip_nlon, snowprecip_nlat, snowprecip_interpMethod,
204 jmc 1.11 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
205 jmc 1.69 & uwind_nlon, uwind_nlat, uwind_interpMethod,
206 jmc 1.11 & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
207 jmc 1.69 & vwind_nlon, vwind_nlat, vwind_interpMethod,
208 heimbach 1.30 & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
209 jmc 1.69 & wspeed_nlon, wspeed_nlat, wspeed_interpMethod,
210 jmc 1.11 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
211 jmc 1.69 & swdown_nlon, swdown_nlat, swdown_interpMethod,
212 jmc 1.11 & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
213 jmc 1.69 & lwdown_nlon, lwdown_nlat, lwdown_interpMethod,
214     & apressure_lon0,apressure_lon_inc,apressure_lat0,apressure_lat_inc
215     & , apressure_nlon, apressure_nlat, apressure_interpMethod,
216     & areamask_lon0, areamask_lon_inc, areamask_lat0, areamask_lat_inc,
217     & areamask_nlon, areamask_nlat, areamask_interpMethod,
218     & climsst_lon0, climsst_lon_inc, climsst_lat0, climsst_lat_inc,
219     & climsst_nlon, climsst_nlat, climsst_interpMethod,
220     & climsss_lon0, climsss_lon_inc,climsss_lat0, climsss_lat_inc,
221     & climsss_nlon, climsss_nlat, climsss_interpMethod,
222     & climustr_lon0, climustr_lon_inc, climustr_lat0, climustr_lat_inc,
223     & climustr_nlon, climustr_nlat, climustr_interpMethod,
224     & climvstr_lon0, climvstr_lon_inc, climvstr_lat0, climvstr_lat_inc,
225     & climvstr_nlon, climvstr_nlat, climvstr_interpMethod
226 mlosch 1.66 #endif /* USE_EXF_INTERPOLATION */
227 heimbach 1.1
228 mlosch 1.66 #ifdef ALLOW_ICEFRONT
229 dimitri 1.61 NAMELIST /EXF_NML_SGRUNOFF/
230     & sgrunoffstartdate1, sgrunoffstartdate2,
231     & sgrunoffstartdate, sgrunoffperiod,
232     & sgrunoffconst, sgrunoff_exfremo_intercept,
233     & sgrunoff_exfremo_slope, exf_inscal_sgrunoff
234 mlosch 1.66 #endif /* ALLOW_ICEFRONT */
235 dimitri 1.61
236 mlosch 1.66 #ifdef ALLOW_OBCS
237 heimbach 1.43 NAMELIST /EXF_NML_OBCS/
238 jmc 1.65 & useOBCSYearlyFields,
239 heimbach 1.43 & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
240     & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
241     & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
242 dimitri 1.50 & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
243     & siobNstartdate1, siobNstartdate2, siobNperiod,
244     & siobSstartdate1, siobSstartdate2, siobSperiod,
245     & siobEstartdate1, siobEstartdate2, siobEperiod,
246     & siobWstartdate1, siobWstartdate2, siobWperiod
247 mlosch 1.66 #endif /* ALLOW_OBCS */
248 heimbach 1.43
249 jmc 1.68 #ifdef USE_EXF_INTERPOLATION
250     # ifdef ALLOW_EXCH2
251     gridNx = exch2_mydNx(1)
252     gridNy = exch2_mydNy(1)
253     # else /* ALLOW_EXCH2 */
254     gridNx = Nx
255     gridNy = Ny
256     # endif /* ALLOW_EXCH2 */
257     #endif /* USE_EXF_INTERPOLATION */
258    
259 heimbach 1.1 _BEGIN_MASTER(mythid)
260    
261     c Set default values.
262    
263 heimbach 1.21 year2sec = 365.*86400.
264 jmc 1.63 exf_verbose = debugMode
265 jmc 1.33 exf_monFreq = monitorFreq
266 jmc 1.48 useExfCheckRange = .TRUE.
267 gforget 1.58 useExfZenAlbedo = .FALSE.
268 gforget 1.59 select_ZenAlbedo = 0
269 gforget 1.58 useExfZenIncoming = .FALSE.
270 jmc 1.48 readStressOnAgrid = .FALSE.
271     readStressOnCgrid = .FALSE.
272 dimitri 1.49 useRelativeWind = .FALSE.
273 jmc 1.52 noNegativeEvap = .FALSE.
274 heimbach 1.21
275 jmc 1.47 C- default value should be set to main model parameter:
276     c cen2kel = celsius2K
277 jmc 1.48 c gravity_mks = gravity
278 jmc 1.47 c atmcp = atm_Cp
279     c humid_fac = atm_Rq <- default is zero !!!
280    
281     cen2kel = 273.150 _d 0
282     gravity_mks = 9.81 _d 0
283     atmrho = 1.200 _d 0
284     atmcp = 1005.000 _d 0
285     flamb = 2500000.000 _d 0
286     flami = 334000.000 _d 0
287     cvapor_fac = 640380.000 _d 0
288     cvapor_exp = 5107.400 _d 0
289     cvapor_fac_ice = 11637800.000 _d 0
290     cvapor_exp_ice = 5897.800 _d 0
291     humid_fac = 0.606 _d 0
292     gamma_blk = 0.010 _d 0
293     saltsat = 0.980 _d 0
294 jmc 1.52 sstExtrapol = 0.0 _d 0
295 jmc 1.47 cdrag_1 = 0.0027000 _d 0
296     cdrag_2 = 0.0001420 _d 0
297     cdrag_3 = 0.0000764 _d 0
298     cstanton_1 = 0.0327 _d 0
299     cstanton_2 = 0.0180 _d 0
300     cdalton = 0.0346 _d 0
301     zolmin = -100.000 _d 0
302     psim_fac = 5.000 _d 0
303     zref = 10.000 _d 0
304     hu = 10.000 _d 0
305     ht = 2.000 _d 0
306     umin = 0.5 _d 0
307     useStabilityFct_overIce = .FALSE.
308     exf_iceCd = 1.63 _d -3
309     exf_iceCe = 1.63 _d -3
310     exf_iceCh = 1.63 _d -3
311     exf_albedo = 0.1 _d 0
312     c-- this default is chosen to be backward compatible with
313     c-- an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
314     ocean_emissivity = 5.50 _d-8 / 5.670 _d-8
315     ice_emissivity = 0.95 _d 0
316     snow_emissivity = 0.95 _d 0
317 heimbach 1.46
318 heimbach 1.1 c Calendar data.
319     hfluxstartdate1 = 0
320     hfluxstartdate2 = 0
321     hfluxperiod = 0.0 _d 0
322 heimbach 1.7 hfluxconst = 0.0 _d 0
323 heimbach 1.27 hflux_exfremo_intercept = 0.0 _d 0
324     hflux_exfremo_slope = 0.0 _d 0
325 heimbach 1.1
326     atempstartdate1 = 0
327     atempstartdate2 = 0
328     atempperiod = 0.0 _d 0
329 heimbach 1.15 atempconst = celsius2K
330 heimbach 1.27 atemp_exfremo_intercept = 0.0 _d 0
331     atemp_exfremo_slope = 0.0 _d 0
332 heimbach 1.1
333     aqhstartdate1 = 0
334     aqhstartdate2 = 0
335     aqhperiod = 0.0 _d 0
336 heimbach 1.7 aqhconst = 0.0 _d 0
337 heimbach 1.27 aqh_exfremo_intercept = 0.0 _d 0
338     aqh_exfremo_slope = 0.0 _d 0
339 heimbach 1.1
340     sfluxstartdate1 = 0
341     sfluxstartdate2 = 0
342     sfluxperiod = 0.0 _d 0
343 heimbach 1.7 sfluxconst = 0.0 _d 0
344 heimbach 1.27 sflux_exfremo_intercept = 0.0 _d 0
345     sflux_exfremo_slope = 0.0 _d 0
346 heimbach 1.1
347 dimitri 1.5 evapstartdate1 = 0
348     evapstartdate2 = 0
349     evapperiod = 0.0 _d 0
350 heimbach 1.7 evapconst = 0.0 _d 0
351 heimbach 1.27 evap_exfremo_intercept = 0.0 _d 0
352     evap_exfremo_slope = 0.0 _d 0
353 dimitri 1.5
354 heimbach 1.1 precipstartdate1 = 0
355     precipstartdate2 = 0
356     precipperiod = 0.0 _d 0
357 heimbach 1.7 precipconst = 0.0 _d 0
358 heimbach 1.27 precip_exfremo_intercept = 0.0 _d 0
359     precip_exfremo_slope = 0.0 _d 0
360 heimbach 1.1
361 heimbach 1.30 snowprecipstartdate1 = 0
362     snowprecipstartdate2 = 0
363     snowprecipperiod = 0.0 _d 0
364     snowprecipconst = 0.0 _d 0
365     snowprecip_exfremo_intercept = 0.0 _d 0
366     snowprecip_exfremo_slope = 0.0 _d 0
367    
368 heimbach 1.3 runoffstartdate1 = 0
369     runoffstartdate2 = 0
370     runoffperiod = 0.0 _d 0
371 heimbach 1.7 runoffconst = 0.0 _d 0
372 heimbach 1.27 runoff_exfremo_intercept = 0.0 _d 0
373     runoff_exfremo_slope = 0.0 _d 0
374 heimbach 1.3
375 heimbach 1.1 ustressstartdate1 = 0
376     ustressstartdate2 = 0
377     ustressperiod = 0.0 _d 0
378 heimbach 1.7 ustressconst = 0.0 _d 0
379 heimbach 1.27 ustress_exfremo_intercept = 0.0 _d 0
380     ustress_exfremo_slope = 0.0 _d 0
381 heimbach 1.1
382     vstressstartdate1 = 0
383     vstressstartdate2 = 0
384     vstressperiod = 0.0 _d 0
385 heimbach 1.7 vstressconst = 0.0 _d 0
386 heimbach 1.27 vstress_exfremo_intercept = 0.0 _d 0
387     vstress_exfremo_slope = 0.0 _d 0
388 heimbach 1.1
389     uwindstartdate1 = 0
390     uwindstartdate2 = 0
391     uwindperiod = 0.0 _d 0
392 heimbach 1.7 uwindconst = 0.0 _d 0
393 heimbach 1.27 uwind_exfremo_intercept = 0.0 _d 0
394     uwind_exfremo_slope = 0.0 _d 0
395 heimbach 1.1
396     vwindstartdate1 = 0
397     vwindstartdate2 = 0
398     vwindperiod = 0.0 _d 0
399 heimbach 1.7 vwindconst = 0.0 _d 0
400 heimbach 1.27 vwind_exfremo_intercept = 0.0 _d 0
401     vwind_exfremo_slope = 0.0 _d 0
402 heimbach 1.1
403 heimbach 1.30 wspeedstartdate1 = 0
404     wspeedstartdate2 = 0
405     wspeedperiod = 0.0 _d 0
406     wspeedconst = 0.0 _d 0
407     wspeed_exfremo_intercept = 0.0 _d 0
408     wspeed_exfremo_slope = 0.0 _d 0
409    
410 heimbach 1.1 swfluxstartdate1 = 0
411     swfluxstartdate2 = 0
412     swfluxperiod = 0.0 _d 0
413 heimbach 1.7 swfluxconst = 0.0 _d 0
414 heimbach 1.27 swflux_exfremo_intercept = 0.0 _d 0
415     swflux_exfremo_slope = 0.0 _d 0
416 heimbach 1.1
417     lwfluxstartdate1 = 0
418     lwfluxstartdate2 = 0
419     lwfluxperiod = 0.0 _d 0
420 heimbach 1.7 lwfluxconst = 0.0 _d 0
421 heimbach 1.27 lwflux_exfremo_intercept = 0.0 _d 0
422     lwflux_exfremo_slope = 0.0 _d 0
423 heimbach 1.1
424 dimitri 1.6 swdownstartdate1 = 0
425     swdownstartdate2 = 0
426     swdownperiod = 0.0 _d 0
427 heimbach 1.7 swdownconst = 0.0 _d 0
428 heimbach 1.27 swdown_exfremo_intercept = 0.0 _d 0
429     swdown_exfremo_slope = 0.0 _d 0
430 dimitri 1.6
431     lwdownstartdate1 = 0
432     lwdownstartdate2 = 0
433     lwdownperiod = 0.0 _d 0
434 heimbach 1.7 lwdownconst = 0.0 _d 0
435 heimbach 1.27 lwdown_exfremo_intercept = 0.0 _d 0
436     lwdown_exfremo_slope = 0.0 _d 0
437    
438     apressurestartdate1 = 0
439     apressurestartdate2 = 0
440     apressureperiod = 0.0 _d 0
441     apressureconst = 0.0 _d 0
442     apressure_exfremo_intercept = 0.0 _d 0
443     apressure_exfremo_slope = 0.0 _d 0
444 dimitri 1.6
445 gforget 1.51 areamaskstartdate1 = 0
446     areamaskstartdate2 = 0
447     areamaskperiod = 0.0 _d 0
448 gforget 1.56 areamaskTauRelax = 0.0 _d 0
449 gforget 1.51 areamaskconst = 0.0 _d 0
450 jmc 1.55 areamask_exfremo_intercept = 0. _d 0
451     areamask_exfremo_slope = 0. _d 0
452 gforget 1.51
453 heimbach 1.43 climsststartdate1 = 0
454     climsststartdate2 = 0
455     climsstperiod = 0
456 gforget 1.56 climsstTauRelax = 0.0 _d 0
457 heimbach 1.43 climsstconst = 0.0 _d 0
458     climsst_exfremo_intercept = 0.0 _d 0
459     climsst_exfremo_slope = 0.0 _d 0
460    
461     climsssstartdate1 = 0
462     climsssstartdate2 = 0
463     climsssperiod = 0
464 gforget 1.56 climsssTauRelax = 0.0 _d 0
465 heimbach 1.43 climsssconst = 0.0 _d 0
466     climsss_exfremo_intercept = 0.0 _d 0
467     climsss_exfremo_slope = 0.0 _d 0
468    
469 heimbach 1.60 climustrstartdate1 = 0
470     climustrstartdate2 = 0
471     climustrperiod = 0
472     climustrTauRelax = 0.0 _d 0
473     climustrconst = 0.0 _d 0
474     climustr_exfremo_intercept = 0.0 _d 0
475     climustr_exfremo_slope = 0.0 _d 0
476    
477     climvstrstartdate1 = 0
478     climvstrstartdate2 = 0
479     climvstrperiod = 0
480     climvstrTauRelax = 0.0 _d 0
481     climvstrconst = 0.0 _d 0
482     climvstr_exfremo_intercept = 0.0 _d 0
483     climvstr_exfremo_slope = 0.0 _d 0
484    
485 dimitri 1.61 sgrunoffstartdate1 = 0
486     sgrunoffstartdate2 = 0
487     sgrunoffstartdate = 0.
488     sgrunoffperiod = 0.0 _d 0
489     sgrunoffconst = 0.0 _d 0
490     sgrunoff_exfremo_intercept = 0.0 _d 0
491     sgrunoff_exfremo_slope = 0.0 _d 0
492 dimitri 1.62 exf_inscal_sgrunoff = 1. _d 0
493 dimitri 1.61
494 jmc 1.65 useOBCSYearlyFields = .FALSE.
495 heimbach 1.2 obcsNstartdate1 = 0
496     obcsNstartdate2 = 0
497     obcsNperiod = 0.0 _d 0
498     obcsSstartdate1 = 0
499     obcsSstartdate2 = 0
500     obcsSperiod = 0.0 _d 0
501     obcsEstartdate1 = 0
502     obcsEstartdate2 = 0
503     obcsEperiod = 0.0 _d 0
504     obcsWstartdate1 = 0
505     obcsWstartdate2 = 0
506     obcsWperiod = 0.0 _d 0
507 heimbach 1.1
508 dimitri 1.50 siobNstartdate1 = UNSET_I
509     siobNstartdate2 = UNSET_I
510     siobNperiod = UNSET_RL
511     siobSstartdate1 = UNSET_I
512     siobSstartdate2 = UNSET_I
513     siobSperiod = UNSET_RL
514     siobEstartdate1 = UNSET_I
515     siobEstartdate2 = UNSET_I
516     siobEperiod = UNSET_RL
517     siobWstartdate1 = UNSET_I
518     siobWstartdate2 = UNSET_I
519     siobWperiod = UNSET_RL
520    
521 heimbach 1.30 repeatPeriod = 0.0 _d 0
522     windstressmax = 2.0 _d 0
523 cheisey 1.4
524 heimbach 1.43 exf_scal_BulkCdn = 1.0 _d 0
525    
526     c Initialise freezing temperature of sea water
527     climtempfreeze = -1.9 _d 0
528 dimitri 1.36
529 heimbach 1.1 c Data files.
530     hfluxfile = ' '
531     atempfile = ' '
532     aqhfile = ' '
533 dimitri 1.5 evapfile = ' '
534 heimbach 1.1 precipfile = ' '
535 heimbach 1.30 snowprecipfile = ' '
536 heimbach 1.1 sfluxfile = ' '
537 heimbach 1.3 runofffile = ' '
538 heimbach 1.1 ustressfile = ' '
539     vstressfile = ' '
540     uwindfile = ' '
541     vwindfile = ' '
542 heimbach 1.30 wspeedfile = ' '
543 heimbach 1.1 swfluxfile = ' '
544     lwfluxfile = ' '
545 dimitri 1.6 swdownfile = ' '
546     lwdownfile = ' '
547 jmc 1.53 apressurefile = ' '
548 gforget 1.51 areamaskfile = ' '
549 heimbach 1.43 climsstfile = ' '
550     climsssfile = ' '
551 heimbach 1.60 climustrfile = ' '
552     climvstrfile = ' '
553 heimbach 1.1
554 dimitri 1.13 c Start dates.
555 dimitri 1.24 hfluxstartdate = 0.
556     atempstartdate = 0.
557     aqhstartdate = 0.
558     evapstartdate = 0.
559     precipstartdate = 0.
560 jmc 1.48 snowprecipstartdate= 0.
561 dimitri 1.24 sfluxstartdate = 0.
562     runoffstartdate = 0.
563     ustressstartdate = 0.
564     vstressstartdate = 0.
565     uwindstartdate = 0.
566     vwindstartdate = 0.
567 heimbach 1.30 wspeedstartdate = 0.
568 dimitri 1.24 swfluxstartdate = 0.
569     lwfluxstartdate = 0.
570     swdownstartdate = 0.
571     lwdownstartdate = 0.
572     obcsNstartdate = 0.
573     obcsSstartdate = 0.
574     obcsEstartdate = 0.
575     obcsWstartdate = 0.
576 dimitri 1.50 siobNstartdate = 0.
577     siobSstartdate = 0.
578     siobEstartdate = 0.
579     siobWstartdate = 0.
580 dimitri 1.24 apressurestartdate = 0.
581 gforget 1.51 areamaskstartdate = 0.
582 heimbach 1.43 climsststartdate = 0.
583     climsssstartdate = 0.
584 heimbach 1.60 climustrstartdate = 0.
585     climvstrstartdate = 0.
586 heimbach 1.1
587     c Initialise file type and field precision
588 heimbach 1.20 exf_iprec = 32
589 mlosch 1.54 exf_iprec_obcs = UNSET_I
590 heimbach 1.20 exf_yftype = 'RL'
591     useExfYearlyFields = .FALSE.
592 dimitri 1.25 twoDigitYear = .FALSE.
593 heimbach 1.1
594 dimitri 1.6 c Input scaling factors.
595 heimbach 1.8 exf_inscal_hflux = 1. _d 0
596     exf_inscal_sflux = 1. _d 0
597     exf_inscal_ustress = 1. _d 0
598     exf_inscal_vstress = 1. _d 0
599     exf_inscal_uwind = 1. _d 0
600     exf_inscal_vwind = 1. _d 0
601 heimbach 1.30 exf_inscal_wspeed = 1. _d 0
602 heimbach 1.8 exf_inscal_swflux = 1. _d 0
603     exf_inscal_lwflux = 1. _d 0
604     exf_inscal_precip = 1. _d 0
605 jmc 1.48 exf_inscal_snowprecip= 1. _d 0
606 dimitri 1.6 exf_inscal_sst = 1. _d 0
607     exf_inscal_sss = 1. _d 0
608 heimbach 1.8 exf_inscal_atemp = 1. _d 0
609 dimitri 1.14 exf_offset_atemp = 0. _d 0
610 heimbach 1.8 exf_inscal_aqh = 1. _d 0
611     exf_inscal_evap = 1. _d 0
612 dimitri 1.6 exf_inscal_apressure = 1. _d 0
613 heimbach 1.21 exf_inscal_runoff = 1. _d 0
614 heimbach 1.8 exf_inscal_swdown = 1. _d 0
615     exf_inscal_lwdown = 1. _d 0
616 heimbach 1.43 exf_inscal_climsst = 1. _d 0
617     exf_inscal_climsss = 1. _d 0
618 heimbach 1.60 exf_inscal_climustr = 1. _d 0
619     exf_inscal_climvstr = 1. _d 0
620 dimitri 1.6
621     c Output scaling factors.
622 heimbach 1.8 exf_outscal_hflux = 1. _d 0
623     exf_outscal_sflux = 1. _d 0
624     exf_outscal_ustress = 1. _d 0
625     exf_outscal_vstress = 1. _d 0
626     exf_outscal_swflux = 1. _d 0
627 dimitri 1.6 exf_outscal_sst = 1. _d 0
628     exf_outscal_sss = 1. _d 0
629     exf_outscal_apressure= 1. _d 0
630 heimbach 1.3
631 dimitri 1.19 #ifdef USE_EXF_INTERPOLATION
632 jmc 1.70 C-- set default input location to match (in case of simple Lat-Lonp grid)
633     C model grid cell-center position (leading to trivial interpolation)
634     inp_lon0 = xgOrigin + delX(1)*exf_half
635     inp_lat0 = ygOrigin + delY(1)*exf_half
636     inp_dLon = delX(1)
637     inp_dLat = delY(1)
638    
639     ustress_lon0 = inp_lon0
640     uwind_lon0 = inp_lon0
641     vstress_lon0 = inp_lon0
642     hflux_lon0 = inp_lon0
643     sflux_lon0 = inp_lon0
644     swflux_lon0 = inp_lon0
645     runoff_lon0 = inp_lon0
646     atemp_lon0 = inp_lon0
647     aqh_lon0 = inp_lon0
648     evap_lon0 = inp_lon0
649     precip_lon0 = inp_lon0
650     snowprecip_lon0= inp_lon0
651     vwind_lon0 = inp_lon0
652     wspeed_lon0 = inp_lon0
653     lwflux_lon0 = inp_lon0
654     swdown_lon0 = inp_lon0
655     lwdown_lon0 = inp_lon0
656     apressure_lon0 = inp_lon0
657     areamask_lon0 = inp_lon0
658     vstress_lat0 = inp_lat0
659     vwind_lat0 = inp_lat0
660     wspeed_lat0 = inp_lat0
661     ustress_lat0 = inp_lat0
662     hflux_lat0 = inp_lat0
663     sflux_lat0 = inp_lat0
664     runoff_lat0 = inp_lat0
665     swflux_lat0 = inp_lat0
666     atemp_lat0 = inp_lat0
667     aqh_lat0 = inp_lat0
668     evap_lat0 = inp_lat0
669     precip_lat0 = inp_lat0
670     snowprecip_lat0= inp_lat0
671     uwind_lat0 = inp_lat0
672     lwflux_lat0 = inp_lat0
673     swdown_lat0 = inp_lat0
674     lwdown_lat0 = inp_lat0
675     apressure_lat0 = inp_lat0
676     areamask_lat0 = inp_lat0
677 jmc 1.68 ustress_nlon = gridNx
678     ustress_nlat = gridNy
679     vstress_nlon = gridNx
680     vstress_nlat = gridNy
681     hflux_nlon = gridNx
682     hflux_nlat = gridNy
683     sflux_nlon = gridNx
684     sflux_nlat = gridNy
685     swflux_nlon = gridNx
686     swflux_nlat = gridNy
687     runoff_nlon = gridNx
688     runoff_nlat = gridNy
689     atemp_nlon = gridNx
690     atemp_nlat = gridNy
691     aqh_nlon = gridNx
692     aqh_nlat = gridNy
693     evap_nlon = gridNx
694     evap_nlat = gridNy
695     precip_nlon = gridNx
696     snowprecip_nlon= gridNx
697     precip_nlat = gridNy
698     snowprecip_nlat= gridNy
699     uwind_nlon = gridNx
700     uwind_nlat = gridNy
701     vwind_nlon = gridNx
702     vwind_nlat = gridNy
703     wspeed_nlon = gridNx
704     wspeed_nlat = gridNy
705     lwflux_nlon = gridNx
706     lwflux_nlat = gridNy
707     swdown_nlon = gridNx
708     swdown_nlat = gridNy
709     lwdown_nlon = gridNx
710     lwdown_nlat = gridNy
711     apressure_nlon = gridNx
712     apressure_nlat = gridNy
713     areamask_nlon = gridNx
714     areamask_nlat = gridNy
715 jmc 1.70 ustress_lon_inc = inp_dLon
716     vstress_lon_inc = inp_dLon
717     hflux_lon_inc = inp_dLon
718     sflux_lon_inc = inp_dLon
719     swflux_lon_inc = inp_dLon
720     runoff_lon_inc = inp_dLon
721     atemp_lon_inc = inp_dLon
722     aqh_lon_inc = inp_dLon
723     evap_lon_inc = inp_dLon
724     precip_lon_inc = inp_dLon
725     snowprecip_lon_inc= inp_dLon
726     uwind_lon_inc = inp_dLon
727     vwind_lon_inc = inp_dLon
728     wspeed_lon_inc = inp_dLon
729     lwflux_lon_inc = inp_dLon
730     swdown_lon_inc = inp_dLon
731     lwdown_lon_inc = inp_dLon
732     apressure_lon_inc = inp_dLon
733     areamask_lon_inc = inp_dLon
734    
735     climsst_lon0 = inp_lon0
736     climsss_lon0 = inp_lon0
737     climustr_lon0 = inp_lon0
738     climvstr_lon0 = inp_lon0
739     climsst_lat0 = inp_lat0
740     climsss_lat0 = inp_lat0
741     climustr_lat0 = inp_lat0
742     climvstr_lat0 = inp_lat0
743 jmc 1.68 climsst_nlon = gridNx
744     climsst_nlat = gridNy
745     climsss_nlon = gridNx
746     climsss_nlat = gridNy
747     climustr_nlon = gridNx
748     climustr_nlat = gridNy
749     climvstr_nlon = gridNx
750     climvstr_nlat = gridNy
751 jmc 1.70 climsst_lon_inc = inp_dLon
752     climsss_lon_inc = inp_dLon
753     climustr_lon_inc= inp_dLon
754     climvstr_lon_inc= inp_dLon
755    
756     DO j=1,MAX_LAT_INC
757     IF (j.LT.gridNy) THEN
758     inp_dLat = (delY(j) + delY(j+1))*exf_half
759     ELSE
760     inp_dLat = 0.
761     ENDIF
762     ustress_lat_inc(j) = inp_dLat
763     vstress_lat_inc(j) = inp_dLat
764     hflux_lat_inc(j) = inp_dLat
765     sflux_lat_inc(j) = inp_dLat
766     swflux_lat_inc(j) = inp_dLat
767     runoff_lat_inc(j) = inp_dLat
768     atemp_lat_inc(j) = inp_dLat
769     aqh_lat_inc(j) = inp_dLat
770     evap_lat_inc(j) = inp_dLat
771     precip_lat_inc(j) = inp_dLat
772     snowprecip_lat_inc(j)= inp_dLat
773     uwind_lat_inc(j) = inp_dLat
774     vwind_lat_inc(j) = inp_dLat
775     wspeed_lat_inc(j) = inp_dLat
776     lwflux_lat_inc(j) = inp_dLat
777     swdown_lat_inc(j) = inp_dLat
778     lwdown_lat_inc(j) = inp_dLat
779     apressure_lat_inc(j) = inp_dLat
780     areamask_lat_inc(j) = inp_dLat
781     climsst_lat_inc(j) = inp_dLat
782     climsss_lat_inc(j) = inp_dLat
783     climustr_lat_inc(j) = inp_dLat
784     climvstr_lat_inc(j) = inp_dLat
785 dimitri 1.19 ENDDO
786 jmc 1.69
787     ustress_interpMethod = 12
788     vstress_interpMethod = 22
789     hflux_interpMethod = 1
790     sflux_interpMethod = 1
791     swflux_interpMethod = 1
792     runoff_interpMethod = 1
793     atemp_interpMethod = 1
794     aqh_interpMethod = 1
795     evap_interpMethod = 1
796     precip_interpMethod = 1
797     snowprecip_interpMethod= 1
798     uwind_interpMethod = 12
799     vwind_interpMethod = 22
800     wspeed_interpMethod = 1
801     lwflux_interpMethod = 1
802     swdown_interpMethod = 1
803     lwdown_interpMethod = 1
804     apressure_interpMethod = 1
805     areamask_interpMethod = 1
806     climsst_interpMethod = 2
807     climsss_interpMethod = 2
808     climustr_interpMethod = 12
809     climvstr_interpMethod = 22
810    
811 dimitri 1.19 #endif /* USE_EXF_INTERPOLATION */
812    
813 heimbach 1.1 c Next, read the forcing data file.
814 heimbach 1.43 WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
815     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
816     & SQUEEZE_RIGHT , 1)
817 heimbach 1.26
818 heimbach 1.43 CALL OPEN_COPY_DATA_FILE(
819 heimbach 1.26 I 'data.exf', 'EXF_READPARMS',
820     O iUnit,
821     I myThid )
822    
823 jmc 1.53 WRITE(msgBuf,'(A)')
824 heimbach 1.43 & 'EXF_READPARMS: reading EXF_NML_01'
825     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
826     & SQUEEZE_RIGHT , 1)
827     READ( iUnit, nml = EXF_NML_01 )
828 jmc 1.53 WRITE(msgBuf,'(A)')
829 heimbach 1.43 & 'EXF_READPARMS: reading EXF_NML_02'
830     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
831     & SQUEEZE_RIGHT , 1)
832     READ( iUnit, nml = EXF_NML_02 )
833 jmc 1.53 WRITE(msgBuf,'(A)')
834 heimbach 1.43 & 'EXF_READPARMS: reading EXF_NML_03'
835     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
836     & SQUEEZE_RIGHT , 1)
837     READ( iUnit, nml = EXF_NML_03 )
838 mlosch 1.66 #ifdef USE_EXF_INTERPOLATION
839 jmc 1.53 WRITE(msgBuf,'(A)')
840 heimbach 1.43 & 'EXF_READPARMS: reading EXF_NML_04'
841     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
842     & SQUEEZE_RIGHT , 1)
843     READ( iUnit, nml = EXF_NML_04 )
844 mlosch 1.66 #endif /* USE_EXF_INTERPOLATION */
845 dimitri 1.61
846     #ifdef ALLOW_ICEFRONT
847 mlosch 1.66 IF ( useIcefront ) THEN
848     WRITE(msgBuf,'(A)')
849     & 'EXF_READPARMS: reading EXF_NML_SGRUNOFF'
850     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
851     & SQUEEZE_RIGHT , 1)
852     READ( iUnit, nml = EXF_NML_SGRUNOFF )
853     ENDIF
854 dimitri 1.61 #endif /* ALLOW_ICEFRONT */
855    
856 heimbach 1.43 #ifdef ALLOW_OBCS
857 mlosch 1.66 IF ( useOBCS ) THEN
858     WRITE(msgBuf,'(A)')
859     & 'EXF_READPARMS: reading EXF_NML_OBCS'
860     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
861     & SQUEEZE_RIGHT , 1)
862     READ( iUnit, nml = EXF_NML_OBCS )
863 jmc 1.67 ENDIF
864 mlosch 1.66 IF(siobNstartdate1.EQ.UNSET_I ) siobNstartdate1=obcsNstartdate1
865     IF(siobNstartdate2.EQ.UNSET_I ) siobNstartdate2=obcsNstartdate2
866     IF(siobNperiod .EQ.UNSET_RL) siobNperiod =obcsNperiod
867     IF(siobSstartdate1.EQ.UNSET_I ) siobSstartdate1=obcsSstartdate1
868     IF(siobSstartdate2.EQ.UNSET_I ) siobSstartdate2=obcsSstartdate2
869     IF(siobSperiod .EQ.UNSET_RL) siobSperiod =obcsSperiod
870     IF(siobEstartdate1.EQ.UNSET_I ) siobEstartdate1=obcsEstartdate1
871     IF(siobEstartdate2.EQ.UNSET_I ) siobEstartdate2=obcsEstartdate2
872     IF(siobEperiod .EQ.UNSET_RL) siobEperiod =obcsEperiod
873     IF(siobWstartdate1.EQ.UNSET_I ) siobWstartdate1=obcsWstartdate1
874     IF(siobWstartdate2.EQ.UNSET_I ) siobWstartdate2=obcsWstartdate2
875     IF(siobWperiod .EQ.UNSET_RL) siobWperiod =obcsWperiod
876 jmc 1.55
877 mlosch 1.66 IF(exf_iprec_obcs .EQ. UNSET_I) exf_iprec_obcs =exf_iprec
878 dimitri 1.61 #endif /* ALLOW_OBCS */
879 heimbach 1.26
880 jmc 1.53 WRITE(msgBuf,'(A)')
881 heimbach 1.26 & 'EXF_READPARMS: finished reading data.exf'
882     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
883     & SQUEEZE_RIGHT , 1)
884    
885     CLOSE( iUnit )
886 heimbach 1.1
887 jmc 1.71 C-- Retired parameters
888     IF ( exf_yftype.NE.'RL' ) THEN
889     STOP 'S/R EXF_READPARAMS: value of exf_yftype not allowed'
890     ENDIF
891    
892 jmc 1.48 C-- Derive other parameters:
893 heimbach 1.46 hq = ht
894 jmc 1.69 stressIsOnCgrid = readStressOnCgrid
895     #if ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) )
896 jmc 1.48 stressIsOnCgrid = .FALSE.
897     #endif
898 jmc 1.69 #ifdef USE_EXF_INTERPOLATION
899     IF ( (ustress_interpMethod.GE.1 .AND. ustressfile.NE.' ') .OR.
900     & (vstress_interpMethod.GE.1 .AND. vstressfile.NE.' ') )
901     & stressIsOnCgrid = .FALSE.
902     #endif /* USE_EXF_INTERPOLATION */
903 heimbach 1.46
904 jmc 1.71 IF ( select_ZenAlbedo.GT.0 ) THEN
905 gforget 1.59 useExfZenAlbedo=.TRUE.
906 jmc 1.71 ENDIf
907 gforget 1.59
908 gforget 1.56 #ifdef ALLOW_CLIMSST_RELAXATION
909     cgf warning before we overwrite tauThetaClimRelax/thetaClimFile:
910 jmc 1.64 IF ( doThetaClimRelax ) THEN
911     WRITE(msgBuf,'(2A)') '** WARNING ** EXF_READPARMS:',
912     & ' useEXF implies that tauThetaClimRelax'
913 gforget 1.56 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
914     & SQUEEZE_RIGHT , myThid)
915 jmc 1.64 WRITE(msgBuf,'(2A)') '** WARNING ** ',
916     & ' and thetaClimFile from "data" file are overwritten'
917 gforget 1.56 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
918     & SQUEEZE_RIGHT , myThid)
919 jmc 1.64 ENDIF
920     cgf overwrite tauThetaClimRelax/thetaClimFile:
921     tauThetaClimRelax=climsstTauRelax
922     thetaClimFile=' '
923 gforget 1.56 cgf overwrite doThetaClimRelax based on data.exf:
924 jmc 1.71 IF ( climsstTauRelax.NE.0.) THEN
925     IF (climsstfile.EQ.' ') THEN
926 gforget 1.56 WRITE(msgBuf,'(A)')
927     & 'S/R EXF_READPARMS: climsstTauRelax > 0 but'
928     CALL PRINT_ERROR( msgBuf, myThid )
929     WRITE(msgBuf,'(A)')
930     & 'S/R EXF_READPARMS: climsstfile is undefined'
931     CALL PRINT_ERROR( msgBuf, myThid )
932     STOP 'ABNORMAL END: S/R EXF_READPARMS'
933 jmc 1.71 ELSE
934 gforget 1.56 doThetaClimRelax=.TRUE.
935 jmc 1.71 ENDIF
936     ELSE
937 gforget 1.56 doThetaClimRelax=.FALSE.
938 jmc 1.71 ENDIf
939 gforget 1.56 #endif
940    
941     #ifdef ALLOW_CLIMSSS_RELAXATION
942     cgf warning before we overwrite tauSaltClimRelax/saltClimFile:
943 jmc 1.64 IF ( doSaltClimRelax ) THEN
944     WRITE(msgBuf,'(2A)') '** WARNING ** EXF_READPARMS:',
945     & ' useEXF implies that tauSaltClimRelax'
946 gforget 1.56 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
947     & SQUEEZE_RIGHT , myThid)
948 jmc 1.64 WRITE(msgBuf,'(2A)') '** WARNING ** ',
949     & ' and saltClimFile from "data" file are overwritten'
950 gforget 1.56 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
951     & SQUEEZE_RIGHT , myThid)
952 jmc 1.64 ENDIF
953     cgf overwrite tauSaltClimRelax/saltClimFile:
954     tauSaltClimRelax=climsssTauRelax
955     saltClimFile=' '
956 gforget 1.56 cgf overwrite doSaltClimRelax based on data.exf:
957 jmc 1.71 IF ( climsssTauRelax.NE.0.) THEN
958     IF (climsssfile.EQ.' ') THEN
959 gforget 1.56 WRITE(msgBuf,'(A)')
960     & 'S/R EXF_READPARMS: climsssTauRelax > 0 but'
961     CALL PRINT_ERROR( msgBuf, myThid )
962     WRITE(msgBuf,'(A)')
963     & 'S/R EXF_READPARMS: climsssfile is undefined'
964     CALL PRINT_ERROR( msgBuf, myThid )
965     STOP 'ABNORMAL END: S/R EXF_READPARMS'
966 jmc 1.71 ELSE
967 gforget 1.56 doSaltClimRelax=.TRUE.
968 jmc 1.71 ENDIF
969     ELSE
970 gforget 1.56 doSaltClimRelax=.FALSE.
971 jmc 1.71 ENDIF
972 gforget 1.56 #endif
973    
974 heimbach 1.1 c Complete the start date specifications for the forcing
975     c fields to get a complete calendar date array.
976 jmc 1.48 C => moved to EXF_INIT_FIXED
977 heimbach 1.43
978 heimbach 1.1 _END_MASTER( mythid )
979     _BARRIER
980    
981 jmc 1.47 RETURN
982     END

  ViewVC Help
Powered by ViewVC 1.1.22