/[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.79 - (hide annotations) (download)
Tue May 27 23:41:31 2014 UTC (10 years ago) by jmc
Branch: MAIN
Changes since 1.78: +11 -1 lines
add a call to S/R packages_unused_msg.F to print a weak warning
when parameter file "data.this_pkg" exist but  but useTHIS_PKG=F

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

  ViewVC Help
Powered by ViewVC 1.1.22