/[MITgcm]/MITgcm/pkg/exf/exf_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon May 14 22:08:41 2001 UTC (23 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint43a-release1mods, checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, release1_b1, checkpoint43, checkpoint40pre2, release1-branch_tutorials, chkpt44a_post, checkpoint40pre4, release1-branch-end, checkpoint39, checkpoint40pre5, chkpt44a_pre, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint40, checkpoint41, checkpoint44, release1-branch_branchpoint
Branch point for: release1-branch, release1, ecco-branch, release1_coupled
Added external forcing package.
Not presently supported by mitgcm, i.e. disabled by default.

1 c $Header: /u/gcmpack/development/heimbach/ecco_env/pkg/exf/exf_readparms.F,v 1.1 2001/02/02 19:43:47 heimbach Exp $
2
3 #include "EXF_CPPOPTIONS.h"
4
5
6 subroutine exf_readparms(
7 I mythid
8 & )
9
10 c ==================================================================
11 c SUBROUTINE exf_readparms
12 c ==================================================================
13 c
14 c o This routine initialises the package that calculates external
15 c forcing fields for a given timestep of the MITgcmUV. Parameters
16 c for this package are set in "data.externalforcing". Some additional
17 c precompiler switches have to be specified in "EXF_CPPOPTIONS.h" .
18 c
19 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
20 c
21 c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
22 c - Restructured the code in order to create a package
23 c for the MITgcmUV.
24 c
25 c Christian Eckert eckert@mit.edu 12-Feb-2000
26 c - Changed Routine names (package prefix: exf_)
27 c
28 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
29 c - changed the handling of precip and sflux with respect
30 c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
31 c
32 c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
33 c - moved relaxation and climatology stuff to extra routines
34 c
35 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
36 c - added obcs parameters
37 c
38 c ==================================================================
39 c SUBROUTINE exf_readparms
40 c ==================================================================
41
42 implicit none
43
44 c == global variables ==
45
46 #include "EEPARAMS.h"
47 #include "SIZE.h"
48 #include "cal.h"
49 #include "exf.h"
50 #include "exf_param.h"
51 #include "exf_constants.h"
52
53 c == routine arguments ==
54
55 integer mythid
56
57 c == local variables ==
58
59 integer i
60
61 c == external ==
62
63 integer ilnblnk
64 external ilnblnk
65
66 c == end of interface ==
67
68 c Surface flux data.
69 namelist /exf_nml/
70 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
71 & atempstartdate1, atempstartdate2, atempperiod,
72 & aqhstartdate1, aqhstartdate2, aqhperiod,
73 & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
74 & precipstartdate1, precipstartdate2, precipperiod,
75 & ustressstartdate1, ustressstartdate2, ustressperiod,
76 & vstressstartdate1, vstressstartdate2, vstressperiod,
77 & uwindstartdate1, uwindstartdate2, uwindperiod,
78 & vwindstartdate1, vwindstartdate2, vwindperiod,
79 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
80 & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
81 & obcsstartdate1, obcsstartdate2, obcsperiod,
82 & hfluxfile, atempfile, aqhfile,
83 & precipfile, sfluxfile, ustressfile,
84 & vstressfile, uwindfile, vwindfile,
85 & swfluxfile, lwfluxfile, obcsfile,
86 & exf_iprec, exf_yftype
87
88 _BEGIN_MASTER(mythid)
89
90 c Set default values.
91
92 c Calendar data.
93 hfluxstartdate1 = 0
94 hfluxstartdate2 = 0
95 hfluxperiod = 0.0 _d 0
96
97 atempstartdate1 = 0
98 atempstartdate2 = 0
99 atempperiod = 0.0 _d 0
100
101 aqhstartdate1 = 0
102 aqhstartdate2 = 0
103 aqhperiod = 0.0 _d 0
104
105 sfluxstartdate1 = 0
106 sfluxstartdate2 = 0
107 sfluxperiod = 0.0 _d 0
108
109 precipstartdate1 = 0
110 precipstartdate2 = 0
111 precipperiod = 0.0 _d 0
112
113 ustressstartdate1 = 0
114 ustressstartdate2 = 0
115 ustressperiod = 0.0 _d 0
116
117 vstressstartdate1 = 0
118 vstressstartdate2 = 0
119 vstressperiod = 0.0 _d 0
120
121 uwindstartdate1 = 0
122 uwindstartdate2 = 0
123 uwindperiod = 0.0 _d 0
124
125 vwindstartdate1 = 0
126 vwindstartdate2 = 0
127 vwindperiod = 0.0 _d 0
128
129 swfluxstartdate1 = 0
130 swfluxstartdate2 = 0
131 swfluxperiod = 0.0 _d 0
132
133 lwfluxstartdate1 = 0
134 lwfluxstartdate2 = 0
135 lwfluxperiod = 0.0 _d 0
136
137 obcsstartdate1 = 0
138 obcsstartdate2 = 0
139 obcsperiod = 0.0 _d 0
140
141 c Data files.
142 hfluxfile = ' '
143 atempfile = ' '
144 aqhfile = ' '
145 precipfile = ' '
146 sfluxfile = ' '
147 ustressfile = ' '
148 vstressfile = ' '
149 uwindfile = ' '
150 vwindfile = ' '
151 swfluxfile = ' '
152 lwfluxfile = ' '
153 obcsfile = ' '
154
155 c Initialise the date arrays.
156 do i = 1,4
157 hfluxstartdate(i) = 0
158 atempstartdate(i) = 0
159 aqhstartdate(i) = 0
160 precipstartdate(i) = 0
161 sfluxstartdate(i) = 0
162 ustressstartdate(i) = 0
163 vstressstartdate(i) = 0
164 uwindstartdate(i) = 0
165 vwindstartdate(i) = 0
166 swfluxstartdate(i) = 0
167 lwfluxstartdate(i) = 0
168 obcsstartdate(i) = 0
169 enddo
170
171 c Initialise file type and field precision
172 exf_iprec = 32
173 exf_yftype = 'RL'
174
175 c Check for the availability of the right calendar version.
176 if ( calendarversion .ne. usescalendarversion ) then
177 print*,' exf_readparms: You are not using the appropriate'
178 print*,' version of the calendar package.'
179 print*
180 print*,' You are using Calendar version: ', calendarversion
181 print*,' Please use Calendar version: ', usescalendarversion
182 stop ' stopped in exf_readparms.'
183 endif
184
185 c Next, read the forcing data file.
186 call nml_filter( 'data.exf', scrunit1, myThid )
187 if (scrunit1 .eq. 0) then
188 stop 'exf_readparms: reading namelist failed'
189 end if
190 read( scrunit1, nml = exf_nml )
191 close( scrunit1 )
192
193 c Complete the start date specifications for the forcing
194 c fields to get a complete calendar date array.
195
196 c check for consistency
197
198 if (.NOT.
199 & (exf_iprec .EQ. 32 .OR. exf_iprec .EQ. 64)
200 & ) then
201 stop 'stop in exf_readparms: value of exf_iprec not allowed'
202 else if (.NOT.
203 & (exf_yftype .EQ. 'RS' .OR.
204 & exf_yftype .EQ. 'RL')
205 & ) then
206 stop 'stop in exf_readparms: value of exf_yftype not allowed'
207 end if
208
209 #ifdef ALLOW_BULKFORMULAE
210
211 #ifdef ALLOW_ATM_TEMP
212 call cal_FullDate( atempstartdate1, atempstartdate2,
213 & atempstartdate, mythid )
214 call cal_FullDate( aqhstartdate1, aqhstartdate2,
215 & aqhstartdate, mythid )
216 call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
217 & swfluxstartdate, mythid )
218 call cal_FullDate( lwfluxstartdate1, lwfluxstartdate2,
219 & lwfluxstartdate, mythid )
220 call cal_FullDate( precipstartdate1, precipstartdate2,
221 & precipstartdate, mythid )
222 #else
223 call cal_FullDate( hfluxstartdate1, hfluxstartdate2,
224 & hfluxstartdate, mythid )
225 call cal_FullDate( sfluxstartdate1, sfluxstartdate2,
226 & sfluxstartdate, mythid )
227 #ifdef ALLOW_KPP
228 call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
229 & swfluxstartdate, mythid )
230 #endif
231
232 #endif
233
234 #ifdef ALLOW_ATM_WIND
235 call cal_FullDate( uwindstartdate1, uwindstartdate2,
236 & uwindstartdate, mythid )
237 call cal_FullDate( vwindstartdate1, vwindstartdate2,
238 & vwindstartdate, mythid )
239 #else
240 call cal_FullDate( ustressstartdate1, ustressstartdate2,
241 & ustressstartdate, mythid )
242 call cal_FullDate( vstressstartdate1, vstressstartdate2,
243 & vstressstartdate, mythid )
244 #endif
245
246 #else
247 call cal_FullDate( hfluxstartdate1, hfluxstartdate2,
248 & hfluxstartdate, mythid )
249 call cal_FullDate( sfluxstartdate1, sfluxstartdate2,
250 & sfluxstartdate, mythid )
251 call cal_FullDate( ustressstartdate1, ustressstartdate2,
252 & ustressstartdate, mythid )
253 call cal_FullDate( vstressstartdate1, vstressstartdate2,
254 & vstressstartdate, mythid )
255 #ifdef ALLOW_KPP
256 call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
257 & swfluxstartdate, mythid )
258 #endif
259
260 #endif
261
262 #ifdef ALLOW_OBCS
263 call cal_FullDate( obcsstartdate1, obcsstartdate2,
264 & obcsstartdate, mythid )
265 #endif
266
267 _END_MASTER( mythid )
268
269 _BARRIER
270
271 c-- Summarize the External forcing's setup.
272 call exf_summary( mythid )
273
274
275 c-- set climatology parameters
276 call exf_clim_readparms( mythid )
277
278 c-- summarize climatologic forcing configuration
279 call exf_clim_summary( mythid )
280
281 end

  ViewVC Help
Powered by ViewVC 1.1.22