1 |
C $Header: /u/gcmpack/MITgcm/pkg/ecco/ecco_readparms.F,v 1.12 2005/07/29 05:19:40 heimbach Exp $ |
2 |
|
3 |
#include "COST_CPPOPTIONS.h" |
4 |
|
5 |
subroutine ecco_readparms( mythid ) |
6 |
|
7 |
c ================================================================== |
8 |
c SUBROUTINE ecco_readparms |
9 |
c ================================================================== |
10 |
c |
11 |
c o This routine initialises the package cost. |
12 |
c started: Ralf Giering 18-Jan-2001 |
13 |
c |
14 |
c ================================================================== |
15 |
c SUBROUTINE ecco_readparms |
16 |
c ================================================================== |
17 |
|
18 |
implicit none |
19 |
|
20 |
c == global variables == |
21 |
|
22 |
#include "EEPARAMS.h" |
23 |
#include "SIZE.h" |
24 |
#include "GRID.h" |
25 |
#include "PARAMS.h" |
26 |
|
27 |
#include "ecco_cost.h" |
28 |
|
29 |
c == routine arguments == |
30 |
|
31 |
integer mythid |
32 |
|
33 |
c == local variables == |
34 |
C msgBuf - Informational/error meesage buffer |
35 |
C iUnit - Work variable for IO unit number |
36 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
37 |
INTEGER iUnit |
38 |
|
39 |
c == end of interface == |
40 |
|
41 |
c-- Read the namelist input. |
42 |
namelist /ecco_cost_nml/ |
43 |
& data_errfile, |
44 |
& tbarfile, sbarfile, psbarfile, |
45 |
& ubarfile, vbarfile, wbarfile, |
46 |
& tauxbarfile, tauybarfile, |
47 |
& hfluxbarfile, sfluxbarfile, |
48 |
& using_topex, |
49 |
& topexstartdate1, topexstartdate2, |
50 |
& topexperiod, topexfile, topexmeanfile, |
51 |
& using_ers, |
52 |
& ersstartdate1, ersstartdate2, |
53 |
& ersperiod, ersfile, |
54 |
& scatstartdate1, scatstartdate2, |
55 |
& scatperiod, scatxdatfile, scatydatfile, |
56 |
& scatx_errfile, scaty_errfile, |
57 |
& ssh_errfile, |
58 |
& tmistartdate1, tmistartdate2, tmidatfile, |
59 |
& sststartdate1, sststartdate2, sstdatfile, |
60 |
& sssstartdate1, sssstartdate2, sssdatfile, |
61 |
& tdatfile, sdatfile, |
62 |
& ctdtfile, ctdsfile, |
63 |
& ctdtclimfile, ctdsclimfile, |
64 |
& xbtfile, |
65 |
& argotstartdate1, argotstartdate2, argotfile, |
66 |
& argosstartdate1, argosstartdate2, argosfile, |
67 |
& udriftfile, vdriftfile, |
68 |
& udrifterrfile, vdrifterrfile, |
69 |
& curmtrufile,curmtrvfile, |
70 |
& salterrfile, temperrfile, velerrfile, |
71 |
& hflux_errfile, sflux_errfile, |
72 |
& tauu_errfile, tauv_errfile, |
73 |
& atemp_errfile, aqh_errfile, |
74 |
& precip_errfile, swflux_errfile, swdown_errfile, |
75 |
& uwind_errfile, vwind_errfile, |
76 |
& geoid_errfile, geoid_covariancefile, |
77 |
& mult_hflux, mult_sflux, mult_tauu, mult_tauv, |
78 |
& mult_atemp, mult_aqh, |
79 |
& mult_precip, mult_swflux, mult_swdown, |
80 |
& mult_uwind, mult_vwind, |
81 |
& mult_hmean, mult_h, mult_temp, mult_salt, |
82 |
& mult_tmi, mult_sst, mult_sss, |
83 |
& mult_ctdt, mult_ctds, |
84 |
& mult_ctdtclim, mult_ctdsclim, |
85 |
& mult_xbt, mult_drift, |
86 |
& mult_argot, mult_argos, |
87 |
& mult_scatx, mult_scaty, |
88 |
& mult_sdrift, mult_tdrift, mult_wdrift, |
89 |
& mult_temp0, mult_salt0, |
90 |
& mult_obcsn, mult_obcss, |
91 |
& mult_obcsw, mult_obcse, mult_obcsvol, |
92 |
& mult_curmtr, mult_ageos, |
93 |
& mult_ice, |
94 |
& mult_kapgm, mult_diffkr, |
95 |
& whflux0, wsflux0, wtau0, |
96 |
& watemp0, waqh0, |
97 |
& wprecip0, wswflux0, wswdown0, wwind0, |
98 |
& wmean_hflux, wmean_sflux, wmean_tau, |
99 |
& wmean_atemp, wmean_aqh, wmean_precip, |
100 |
& wmean_swflux, wmean_swdown, wmean_wind, |
101 |
& costIceStart1, costIceStart2, |
102 |
& costIceEnd1, costIceEnd2, |
103 |
& cost_ice_flag, |
104 |
& cost_iprec, cost_yftype |
105 |
|
106 |
_BEGIN_MASTER( myThid ) |
107 |
|
108 |
c-- Set default values. |
109 |
data_errfile = ' ' |
110 |
tbarfile = 'tbar' |
111 |
sbarfile = 'sbar' |
112 |
psbarfile = 'psbar' |
113 |
ubarfile = 'ubar' |
114 |
vbarfile = 'vbar' |
115 |
wbarfile = 'wbar' |
116 |
tauxbarfile = 'tauxbar' |
117 |
tauybarfile = 'tauybar' |
118 |
hfluxbarfile = 'hfluxbar' |
119 |
sfluxbarfile = 'sfluxbar' |
120 |
using_topex = .false. |
121 |
topexstartdate1 = 0 |
122 |
topexstartdate2 = 0 |
123 |
topexperiod = 0. _d 0 |
124 |
topexfile = ' ' |
125 |
topexmeanfile = ' ' |
126 |
using_ers = .false. |
127 |
ersstartdate1 = 0 |
128 |
ersstartdate2 = 0 |
129 |
ersperiod = 0. _d 0 |
130 |
ersfile = ' ' |
131 |
scatstartdate1 = 0 |
132 |
scatstartdate2 = 0 |
133 |
scatperiod = 0. _d 0 |
134 |
scatxdatfile = ' ' |
135 |
scatydatfile = ' ' |
136 |
ssh_errfile = ' ' |
137 |
scatx_errfile = ' ' |
138 |
scaty_errfile = ' ' |
139 |
tmistartdate1 = 0 |
140 |
tmistartdate2 = 0 |
141 |
tmidatfile = ' ' |
142 |
sststartdate1 = 0 |
143 |
sststartdate2 = 0 |
144 |
sstdatfile = ' ' |
145 |
sssstartdate1 = 0 |
146 |
sssstartdate2 = 0 |
147 |
sssdatfile = ' ' |
148 |
tdatfile = ' ' |
149 |
sdatfile = ' ' |
150 |
ctdtfile = ' ' |
151 |
ctdsfile = ' ' |
152 |
ctdtclimfile = ' ' |
153 |
ctdsclimfile = ' ' |
154 |
curmtrufile = ' ' |
155 |
curmtrvfile = ' ' |
156 |
xbtfile = ' ' |
157 |
argotstartdate1 = 0 |
158 |
argotstartdate2 = 0 |
159 |
argotfile = ' ' |
160 |
argosstartdate1 = 0 |
161 |
argosstartdate2 = 0 |
162 |
argosfile = ' ' |
163 |
udriftfile = ' ' |
164 |
vdriftfile = ' ' |
165 |
udrifterrfile = ' ' |
166 |
vdrifterrfile = ' ' |
167 |
salterrfile = ' ' |
168 |
temperrfile = ' ' |
169 |
velerrfile = ' ' |
170 |
hflux_errfile = ' ' |
171 |
sflux_errfile = ' ' |
172 |
tauu_errfile = ' ' |
173 |
tauv_errfile = ' ' |
174 |
atemp_errfile = ' ' |
175 |
aqh_errfile = ' ' |
176 |
precip_errfile = ' ' |
177 |
swflux_errfile = ' ' |
178 |
swdown_errfile = ' ' |
179 |
uwind_errfile = ' ' |
180 |
vwind_errfile = ' ' |
181 |
geoid_errfile = ' ' |
182 |
geoid_covariancefile = ' ' |
183 |
mult_hflux = 0. _d 0 |
184 |
mult_sflux = 0. _d 0 |
185 |
mult_tauu = 0. _d 0 |
186 |
mult_tauv = 0. _d 0 |
187 |
mult_atemp = 0. _d 0 |
188 |
mult_aqh = 0. _d 0 |
189 |
mult_precip = 0. _d 0 |
190 |
mult_swflux = 0. _d 0 |
191 |
mult_swdown = 0. _d 0 |
192 |
mult_uwind = 0. _d 0 |
193 |
mult_vwind = 0. _d 0 |
194 |
mult_hmean = 0. _d 0 |
195 |
mult_h = 0. _d 0 |
196 |
mult_temp = 0. _d 0 |
197 |
mult_salt = 0. _d 0 |
198 |
mult_temp0 = 0. _d 0 |
199 |
mult_salt0 = 0. _d 0 |
200 |
mult_tmi = 0. _d 0 |
201 |
mult_sst = 0. _d 0 |
202 |
mult_sss = 0. _d 0 |
203 |
mult_ctdt = 0. _d 0 |
204 |
mult_ctds = 0. _d 0 |
205 |
mult_ctdtclim = 0. _d 0 |
206 |
mult_ctdsclim = 0. _d 0 |
207 |
mult_xbt = 0. _d 0 |
208 |
mult_argot = 0. _d 0 |
209 |
mult_argos = 0. _d 0 |
210 |
mult_drift = 0. _d 0 |
211 |
mult_tdrift = 0. _d 0 |
212 |
mult_sdrift = 0. _d 0 |
213 |
mult_wdrift = 0. _d 0 |
214 |
mult_scatx = 0. _d 0 |
215 |
mult_scaty = 0. _d 0 |
216 |
mult_obcsn = 0. _d 0 |
217 |
mult_obcss = 0. _d 0 |
218 |
mult_obcsw = 0. _d 0 |
219 |
mult_obcse = 0. _d 0 |
220 |
mult_obcsvol = 0. _d 0 |
221 |
mult_ageos = 0. _d 0 |
222 |
mult_curmtr = 0. _d 0 |
223 |
mult_ice = 0. _d 0 |
224 |
mult_kapgm = 0. _d 0 |
225 |
mult_diffkr = 0. _d 0 |
226 |
watemp0 = 0. _d 0 |
227 |
waqh0 = 0. _d 0 |
228 |
wprecip0 = 0. _d 0 |
229 |
wswflux0 = 0. _d 0 |
230 |
wswdown0 = 0. _d 0 |
231 |
wwind0 = 0. _d 0 |
232 |
whflux0 = 0. _d 0 |
233 |
wsflux0 = 0. _d 0 |
234 |
wtau0 = 0. _d 0 |
235 |
wmean_atemp = 0. _d 0 |
236 |
wmean_aqh = 0. _d 0 |
237 |
wmean_precip = 0. _d 0 |
238 |
wmean_swflux = 0. _d 0 |
239 |
wmean_swdown = 0. _d 0 |
240 |
wmean_wind = 0. _d 0 |
241 |
wmean_hflux = 0. _d 0 |
242 |
wmean_sflux = 0. _d 0 |
243 |
wmean_tau = 0. _d 0 |
244 |
costIceStart1 = 0 |
245 |
costIceStart2 = 0 |
246 |
costIceEnd1 = 0 |
247 |
costIceEnd2 = 0 |
248 |
cost_ice_flag = 1 |
249 |
|
250 |
c-- Next, read the cost data file. |
251 |
WRITE(msgBuf,'(A)') 'ECCO_READPARMS: opening data.ecco' |
252 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
253 |
& SQUEEZE_RIGHT , 1) |
254 |
|
255 |
CALL OPEN_COPY_DATA_FILE( |
256 |
I 'data.ecco', 'ECCO_READPARMS', |
257 |
O iUnit, |
258 |
I myThid ) |
259 |
|
260 |
READ( iUnit, nml = ecco_cost_nml ) |
261 |
|
262 |
WRITE(msgBuf,'(A)') 'ECCO_READPARMS: finished reading data.ecco' |
263 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
264 |
& SQUEEZE_RIGHT , 1) |
265 |
|
266 |
CLOSE( iUnit ) |
267 |
|
268 |
#ifdef ALLOW_CAL |
269 |
c-- Get the complete dates of the ... |
270 |
c-- ... SST data. |
271 |
call cal_FullDate( sststartdate1, sststartdate2, |
272 |
& sststartdate, mythid ) |
273 |
c-- ... TMI data. |
274 |
call cal_FullDate( tmistartdate1, tmistartdate2, |
275 |
& tmistartdate, mythid ) |
276 |
c-- ... SSS data. |
277 |
call cal_FullDate( sssstartdate1, sssstartdate2, |
278 |
& sssstartdate, mythid ) |
279 |
c-- ... T/P data. |
280 |
call cal_FullDate( topexstartdate1, topexstartdate2, |
281 |
& topexstartdate, mythid ) |
282 |
c-- ... ERS data. |
283 |
call cal_FullDate( ersstartdate1, ersstartdate2, |
284 |
& ersstartdate, mythid ) |
285 |
c-- ... SCAT data. |
286 |
call cal_FullDate( scatstartdate1, scatstartdate2, |
287 |
& scatxstartdate, mythid ) |
288 |
call cal_FullDate( scatstartdate1, scatstartdate2, |
289 |
& scatystartdate, mythid ) |
290 |
#endif |
291 |
|
292 |
_END_MASTER( mythid ) |
293 |
|
294 |
_BARRIER |
295 |
|
296 |
end |