/[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.2 - (show annotations) (download)
Thu Feb 7 20:00:09 2002 UTC (22 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint46l_pre, chkpt44d_post, checkpoint44e_pre, checkpoint46d_pre, checkpoint45d_post, checkpoint46j_pre, checkpoint44h_pre, checkpoint46a_post, checkpoint46j_post, checkpoint46k_post, chkpt44c_pre, checkpoint45a_post, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, checkpoint46b_pre, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint44b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, checkpoint45, checkpoint46h_post, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post
Branch point for: release1_final
Changes since 1.1: +49 -17 lines
o merge of relevant stuff from the ecco-branch:
  - genmake: removed $S64 overwrite for case SunOS
  - pkg/exf: update and corrections for field swapping and obcs
  - pkg/ecco: parameter lists for the_model_main, the_main_loop
              harmonized between ECCO and MITgcm
  - pkg/autodiff: added flow directives for obcs, mdsio_gl_slice
                  updated checkpointing_lev... lists for obcs
  - model/src: minor changes in forward_step, plot_field
               added directive for divided adjoint in the_main_loop
  - pkg/mdsio: added mdsio_gl_slice

1 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.1.6.1 2002/02/06 23:18:54 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 Christian Eckert eckert@mit.edu 12-Feb-2000
25 c - Changed Routine names (package prefix: exf_)
26 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
27 c - changed the handling of precip and sflux with respect
28 c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
29 c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
30 c - moved relaxation and climatology to extra routines
31 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
32 c - added obcs parameters
33 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
34 c - added new obcs parameters (for each boundaries)
35 c
36 c ==================================================================
37 c SUBROUTINE exf_readparms
38 c ==================================================================
39
40 implicit none
41
42 c == global variables ==
43
44 #include "EEPARAMS.h"
45 #include "SIZE.h"
46 #include "cal.h"
47 #include "exf.h"
48 #include "exf_param.h"
49 #include "exf_constants.h"
50 #ifdef ALLOW_OBCS
51 # include "OBCS_OPTIONS.h"
52 #endif
53
54 c == routine arguments ==
55
56 integer mythid
57
58 c == local variables ==
59
60 integer i
61
62 c == external ==
63
64 integer ilnblnk
65 external ilnblnk
66
67 c == end of interface ==
68
69 c Surface flux data.
70 namelist /exf_nml/
71 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
72 & atempstartdate1, atempstartdate2, atempperiod,
73 & aqhstartdate1, aqhstartdate2, aqhperiod,
74 & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
75 & precipstartdate1, precipstartdate2, precipperiod,
76 & ustressstartdate1, ustressstartdate2, ustressperiod,
77 & vstressstartdate1, vstressstartdate2, vstressperiod,
78 & uwindstartdate1, uwindstartdate2, uwindperiod,
79 & vwindstartdate1, vwindstartdate2, vwindperiod,
80 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
81 & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
82 & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
83 & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
84 & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
85 & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
86 & hfluxfile, atempfile, aqhfile,
87 & precipfile, sfluxfile, ustressfile,
88 & vstressfile, uwindfile, vwindfile,
89 & swfluxfile, lwfluxfile,
90 & exf_iprec, exf_yftype
91
92 _BEGIN_MASTER(mythid)
93
94 c Set default values.
95
96 c Calendar data.
97 hfluxstartdate1 = 0
98 hfluxstartdate2 = 0
99 hfluxperiod = 0.0 _d 0
100
101 atempstartdate1 = 0
102 atempstartdate2 = 0
103 atempperiod = 0.0 _d 0
104
105 aqhstartdate1 = 0
106 aqhstartdate2 = 0
107 aqhperiod = 0.0 _d 0
108
109 sfluxstartdate1 = 0
110 sfluxstartdate2 = 0
111 sfluxperiod = 0.0 _d 0
112
113 precipstartdate1 = 0
114 precipstartdate2 = 0
115 precipperiod = 0.0 _d 0
116
117 ustressstartdate1 = 0
118 ustressstartdate2 = 0
119 ustressperiod = 0.0 _d 0
120
121 vstressstartdate1 = 0
122 vstressstartdate2 = 0
123 vstressperiod = 0.0 _d 0
124
125 uwindstartdate1 = 0
126 uwindstartdate2 = 0
127 uwindperiod = 0.0 _d 0
128
129 vwindstartdate1 = 0
130 vwindstartdate2 = 0
131 vwindperiod = 0.0 _d 0
132
133 swfluxstartdate1 = 0
134 swfluxstartdate2 = 0
135 swfluxperiod = 0.0 _d 0
136
137 lwfluxstartdate1 = 0
138 lwfluxstartdate2 = 0
139 lwfluxperiod = 0.0 _d 0
140
141 obcsNstartdate1 = 0
142 obcsNstartdate2 = 0
143 obcsNperiod = 0.0 _d 0
144
145 obcsSstartdate1 = 0
146 obcsSstartdate2 = 0
147 obcsSperiod = 0.0 _d 0
148
149 obcsEstartdate1 = 0
150 obcsEstartdate2 = 0
151 obcsEperiod = 0.0 _d 0
152
153 obcsWstartdate1 = 0
154 obcsWstartdate2 = 0
155 obcsWperiod = 0.0 _d 0
156
157 c Data files.
158 hfluxfile = ' '
159 atempfile = ' '
160 aqhfile = ' '
161 precipfile = ' '
162 sfluxfile = ' '
163 ustressfile = ' '
164 vstressfile = ' '
165 uwindfile = ' '
166 vwindfile = ' '
167 swfluxfile = ' '
168 lwfluxfile = ' '
169
170 c Initialise the date arrays.
171 do i = 1,4
172 hfluxstartdate(i) = 0
173 atempstartdate(i) = 0
174 aqhstartdate(i) = 0
175 precipstartdate(i) = 0
176 sfluxstartdate(i) = 0
177 ustressstartdate(i) = 0
178 vstressstartdate(i) = 0
179 uwindstartdate(i) = 0
180 vwindstartdate(i) = 0
181 swfluxstartdate(i) = 0
182 lwfluxstartdate(i) = 0
183 obcsNstartdate(i) = 0
184 obcsSstartdate(i) = 0
185 obcsEstartdate(i) = 0
186 obcsWstartdate(i) = 0
187 enddo
188
189 c Initialise file type and field precision
190 exf_iprec = 32
191 exf_yftype = 'RL'
192
193 c Check for the availability of the right calendar version.
194 if ( calendarversion .ne. usescalendarversion ) then
195 print*,' exf_readparms: You are not using the appropriate'
196 print*,' version of the calendar package.'
197 print*
198 print*,' You are using Calendar version: ', calendarversion
199 print*,' Please use Calendar version: ', usescalendarversion
200 stop ' stopped in exf_readparms.'
201 endif
202
203 c Next, read the forcing data file.
204 call nml_filter( 'data.exf', scrunit1, myThid )
205 if (scrunit1 .eq. 0) then
206 stop 'exf_readparms: reading namelist failed'
207 end if
208 read( scrunit1, nml = exf_nml )
209 close( scrunit1 )
210
211 c Complete the start date specifications for the forcing
212 c fields to get a complete calendar date array.
213
214 c check for consistency
215
216 if (.NOT.
217 & (exf_iprec .EQ. 32 .OR. exf_iprec .EQ. 64)
218 & ) then
219 stop 'stop in exf_readparms: value of exf_iprec not allowed'
220 else if (.NOT.
221 & (exf_yftype .EQ. 'RS' .OR.
222 & exf_yftype .EQ. 'RL')
223 & ) then
224 stop 'stop in exf_readparms: value of exf_yftype not allowed'
225 end if
226
227 #ifdef ALLOW_BULKFORMULAE
228
229 #ifdef ALLOW_ATM_TEMP
230 call cal_FullDate( atempstartdate1, atempstartdate2,
231 & atempstartdate, mythid )
232 call cal_FullDate( aqhstartdate1, aqhstartdate2,
233 & aqhstartdate, mythid )
234 call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
235 & swfluxstartdate, mythid )
236 call cal_FullDate( lwfluxstartdate1, lwfluxstartdate2,
237 & lwfluxstartdate, mythid )
238 call cal_FullDate( precipstartdate1, precipstartdate2,
239 & precipstartdate, mythid )
240 #else
241 call cal_FullDate( hfluxstartdate1, hfluxstartdate2,
242 & hfluxstartdate, mythid )
243 call cal_FullDate( sfluxstartdate1, sfluxstartdate2,
244 & sfluxstartdate, mythid )
245 #ifdef ALLOW_KPP
246 call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
247 & swfluxstartdate, mythid )
248 #endif
249
250 #endif
251
252 #ifdef ALLOW_ATM_WIND
253 call cal_FullDate( uwindstartdate1, uwindstartdate2,
254 & uwindstartdate, mythid )
255 call cal_FullDate( vwindstartdate1, vwindstartdate2,
256 & vwindstartdate, mythid )
257 #else
258 call cal_FullDate( ustressstartdate1, ustressstartdate2,
259 & ustressstartdate, mythid )
260 call cal_FullDate( vstressstartdate1, vstressstartdate2,
261 & vstressstartdate, mythid )
262 #endif
263
264 #else
265 call cal_FullDate( hfluxstartdate1, hfluxstartdate2,
266 & hfluxstartdate, mythid )
267 call cal_FullDate( sfluxstartdate1, sfluxstartdate2,
268 & sfluxstartdate, mythid )
269 call cal_FullDate( ustressstartdate1, ustressstartdate2,
270 & ustressstartdate, mythid )
271 call cal_FullDate( vstressstartdate1, vstressstartdate2,
272 & vstressstartdate, mythid )
273 #ifdef ALLOW_KPP
274 call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
275 & swfluxstartdate, mythid )
276 #endif
277
278 #endif
279
280 #ifdef ALLOW_OBCS
281 #ifdef ALLOW_OBCS_NORTH
282 call cal_FullDate( obcsNstartdate1, obcsNstartdate2,
283 & obcsNstartdate, mythid )
284 #endif
285 #ifdef ALLOW_OBCS_SOUTH
286 call cal_FullDate( obcsSstartdate1, obcsSstartdate2,
287 & obcsSstartdate, mythid )
288 #endif
289 #ifdef ALLOW_OBCS_EAST
290 call cal_FullDate( obcsEstartdate1, obcsEstartdate2,
291 & obcsEstartdate, mythid )
292 #endif
293 #ifdef ALLOW_OBCS_WEST
294 call cal_FullDate( obcsWstartdate1, obcsWstartdate2,
295 & obcsWstartdate, mythid )
296 #endif
297 #endif
298
299 _END_MASTER( mythid )
300
301 _BARRIER
302
303 c-- Summarize the External forcing's setup.
304 call exf_summary( mythid )
305
306
307 c-- set climatology parameters
308 call exf_clim_readparms( mythid )
309
310 c-- summarize climatologic forcing configuration
311 call exf_clim_summary( mythid )
312
313 end

  ViewVC Help
Powered by ViewVC 1.1.22