1 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/cost/cost_readparms.F,v 1.1 2001/03/25 22:33:54 heimbach Exp $ |
2 |
|
3 |
#include "COST_CPPOPTIONS.h" |
4 |
|
5 |
|
6 |
subroutine cost_readparms( |
7 |
I mythid |
8 |
& ) |
9 |
|
10 |
c ================================================================== |
11 |
c SUBROUTINE cost_readparms |
12 |
c ================================================================== |
13 |
c |
14 |
c o This routine initialises the package cost. |
15 |
c |
16 |
c started: Ralf Giering 18-Jan-2001 |
17 |
c |
18 |
c ================================================================== |
19 |
c SUBROUTINE cost_readparms |
20 |
c ================================================================== |
21 |
|
22 |
implicit none |
23 |
|
24 |
c == global variables == |
25 |
|
26 |
#include "EEPARAMS.h" |
27 |
#include "SIZE.h" |
28 |
#include "GRID.h" |
29 |
|
30 |
#include "cost.h" |
31 |
|
32 |
c == routine arguments == |
33 |
|
34 |
integer mythid |
35 |
|
36 |
c == local variables == |
37 |
|
38 |
integer sststartdate1 |
39 |
integer sststartdate2 |
40 |
integer topexstartdate1 |
41 |
integer topexstartdate2 |
42 |
integer ersstartdate1 |
43 |
integer ersstartdate2 |
44 |
|
45 |
c == external functions == |
46 |
|
47 |
integer cal_IntMonths |
48 |
external cal_IntMonths |
49 |
integer cal_IntDays |
50 |
external cal_IntDays |
51 |
|
52 |
c == end of interface == |
53 |
|
54 |
c-- Read the namelist input. |
55 |
namelist /cost_nml/ |
56 |
& data_errfile, |
57 |
& tbarfile, sbarfile, psbarfile, |
58 |
& using_topex, |
59 |
& topexstartdate1, topexstartdate2, |
60 |
& topexperiod, topexfile, topexmeanfile, |
61 |
& using_ers, |
62 |
& ersstartdate1, ersstartdate2, |
63 |
& ersperiod, ersfile, |
64 |
& ssh_errfile, |
65 |
& sststartdate1, sststartdate2, sstdatfile, |
66 |
& tdatfile, sdatfile, |
67 |
& ctdtfile, ctdsfile, |
68 |
& hflux_errfile, sflux_errfile, |
69 |
& tauu_errfile, tauv_errfile, |
70 |
& geoid_errfile, geoid_covariancefile, |
71 |
& mult_hq, mult_hs, mult_tauu, mult_tauv, |
72 |
& mult_hmean, mult_h, mult_temp, mult_salt, |
73 |
& mult_sst, mult_atl, mult_ctdt, mult_ctds, |
74 |
& mult_test, mult_tracer, |
75 |
& iprec_cost, yftype_cost |
76 |
|
77 |
_BEGIN_MASTER( myThid ) |
78 |
|
79 |
c-- Set default values. |
80 |
data_errfile = ' ' |
81 |
tbarfile = ' ' |
82 |
sbarfile = ' ' |
83 |
psbarfile = ' ' |
84 |
using_topex = .false. |
85 |
topexstartdate1 = 0 |
86 |
topexstartdate2 = 0 |
87 |
topexperiod = 0. _d 0 |
88 |
topexfile = ' ' |
89 |
topexmeanfile = ' ' |
90 |
using_ers = .false. |
91 |
ersstartdate1 = 0 |
92 |
ersstartdate2 = 0 |
93 |
ersperiod = 0. _d 0 |
94 |
ersfile = ' ' |
95 |
ssh_errfile = ' ' |
96 |
sststartdate1 = 0 |
97 |
sststartdate2 = 0 |
98 |
sstdatfile = ' ' |
99 |
tdatfile = ' ' |
100 |
sdatfile = ' ' |
101 |
ctdtfile = ' ' |
102 |
ctdsfile = ' ' |
103 |
hflux_errfile = ' ' |
104 |
sflux_errfile = ' ' |
105 |
tauu_errfile = ' ' |
106 |
tauv_errfile = ' ' |
107 |
geoid_errfile = ' ' |
108 |
geoid_covariancefile = ' ' |
109 |
mult_hq = 0. _d 0 |
110 |
mult_hs = 0. _d 0 |
111 |
mult_tauu = 0. _d 0 |
112 |
mult_tauv = 0. _d 0 |
113 |
mult_hmean = 0. _d 0 |
114 |
mult_h = 0. _d 0 |
115 |
mult_temp = 0. _d 0 |
116 |
mult_salt = 0. _d 0 |
117 |
mult_sst = 0. _d 0 |
118 |
mult_atl = 0. _d 0 |
119 |
mult_ctdt = 0. _d 0 |
120 |
mult_ctds = 0. _d 0 |
121 |
mult_test = 0. _d 0 |
122 |
mult_tracer = 0. _d 0 |
123 |
|
124 |
c-- Check versions. |
125 |
|
126 |
c-- Next, read the cost data file. |
127 |
call nml_filter( 'data.cost', scrunit1, myThid ) |
128 |
if (scrunit1 .eq. 0) then |
129 |
stop 'cost_readparms: reading namelist failed' |
130 |
end if |
131 |
read( scrunit1, nml = cost_nml ) |
132 |
close( scrunit1 ) |
133 |
|
134 |
call cost_Summary( mythid ) |
135 |
|
136 |
_END_MASTER( mythid ) |
137 |
|
138 |
_BARRIER |
139 |
|
140 |
end |