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