/[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.72 - (hide annotations) (download)
Thu Apr 19 16:06:43 2012 UTC (12 years, 2 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63m, checkpoint63n, checkpoint63o
Changes since 1.71: +4 -1 lines
Part two of ECCO-CLIVAR code merges.
Completes merge of seaice area relax. code.
Requires unified CPP option EXF_ALLOW_SEAICE_RELAX
to be set in EXF_OPTIONS.h since this pkg controls its I/O
(and avoids second CPP option in SEAICE_OPTIONS.h)

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

  ViewVC Help
Powered by ViewVC 1.1.22