/[MITgcm]/MITgcm/pkg/rw/read_rec.F
ViewVC logotype

Contents of /MITgcm/pkg/rw/read_rec.F

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


Revision 1.1 - (show annotations) (download)
Sun Aug 6 18:06:17 2006 UTC (18 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59i, checkpoint59h, checkpoint59j, checkpoint59, checkpoint58o_post, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post
- split file read_write_rec.F in two: read_rec.F & write_rec.F
- add new S/R READ,WRITE_REC_3D_RX with number of levels and
   file precision in argument list.

1 C $Header: /u/gcmpack/MITgcm/pkg/rw/read_write_rec.F,v 1.2 2006/08/04 02:48:05 jmc Exp $
2 C $Name: $
3 #include "RW_OPTIONS.h"
4
5 C-- File read_write_rec.F: Routines to handle mid-level I/O interface.
6 C-- Contents
7 C-- o READ_REC_XY_RS
8 C-- o READ_REC_XY_RL
9 C-- o READ_REC_XYZ_RS
10 C-- o READ_REC_XYZ_RL
11 C-- o READ_REC_3D_RS
12 C-- o READ_REC_3D_RL
13 C-- o READ_REC_XZ_RS
14 C-- o READ_REC_XZ_RL
15 C-- o READ_REC_YZ_RS
16 C-- o READ_REC_YZ_RL
17
18 CBOP
19 C !ROUTINE: READ_REC_XY_RS
20 C !INTERFACE:
21 SUBROUTINE READ_REC_XY_RS( fName,field,iRec,myIter,myThid)
22 C !DESCRIPTION: \bv
23 C READ_REC_XY_RS is a "front-end" interface to the low-level I/O
24 C routines.
25 C \ev
26 C !USES:
27 IMPLICIT NONE
28 C Global
29 #include "SIZE.h"
30 #include "EEPARAMS.h"
31 #include "PARAMS.h"
32 C !INPUT/OUTPUT PARAMETERS:
33 C Arguments
34 CHARACTER*(*) fName
35 _RS field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
36 INTEGER iRec
37 INTEGER myIter
38 INTEGER myThid
39
40 C Functions
41 c INTEGER ILNBLNK
42
43 C !LOCAL VARIABLES:
44 C Local
45 CHARACTER*(2) fType
46 INTEGER nNz
47 c INTEGER IL
48 c CHARACTER*(MAX_LEN_FNAM) fullName
49 CEOP
50
51 c IF (myIter.GE.0) THEN
52 c IL=ILNBLNK( fName )
53 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
54 c ELSE
55 c fullName=fName
56 c ENDIF
57
58 fType='RS'
59 nNz=1
60 #ifdef ALLOW_MDSIO
61 CALL MDSREADFIELD( fName, readBinaryPrec, fType,
62 & nNz, field, iRec, myThid )
63 #endif
64 RETURN
65 END
66
67 CBOP
68 C !ROUTINE: READ_REC_XY_RL
69 C !INTERFACE:
70 SUBROUTINE READ_REC_XY_RL( fName,field,iRec,myIter,myThid)
71
72 C !DESCRIPTION: \bv
73 C READ_REC_XY_RL is a "front-end" interface to the low-level I/O
74 C routines.
75 C \ev
76
77 C !USES:
78 IMPLICIT NONE
79 C Global
80 #include "SIZE.h"
81 #include "EEPARAMS.h"
82 #include "PARAMS.h"
83
84 C !INPUT/OUTPUT PARAMETERS:
85 C Arguments
86 CHARACTER*(*) fName
87 _RL field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
88 INTEGER iRec
89 INTEGER myIter
90 INTEGER myThid
91
92 C Functions
93 c INTEGER ILNBLNK
94
95 C !LOCAL VARIABLES:
96 C Local
97 CHARACTER*(2) fType
98 INTEGER nNz
99 c INTEGER IL
100 c CHARACTER*(MAX_LEN_FNAM) fullName
101 CEOP
102
103 c IF (myIter.GE.0) THEN
104 c IL=ILNBLNK( fName )
105 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
106 c ELSE
107 c fullName=fName
108 c ENDIF
109
110 fType='RL'
111 nNz=1
112 #ifdef ALLOW_MDSIO
113 CALL MDSREADFIELD( fName, readBinaryPrec, fType,
114 & nNz, field, iRec, myThid )
115 #endif
116 RETURN
117 END
118
119 CBOP
120 C !ROUTINE: READ_REC_XYZ_RS
121 C !INTERFACE:
122 SUBROUTINE READ_REC_XYZ_RS( fName,field,iRec,myIter,myThid)
123
124 C !DESCRIPTION: \bv
125 C READ_REC_XYZ_RS is a "front-end" interface to the low-level I/O
126 C routines.
127 C \ev
128
129 C !USES:
130 IMPLICIT NONE
131 C Global
132 #include "SIZE.h"
133 #include "EEPARAMS.h"
134 #include "PARAMS.h"
135
136 C !INPUT/OUTPUT PARAMETERS:
137 C Arguments
138 CHARACTER*(*) fName
139 _RS field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
140 INTEGER iRec
141 INTEGER myIter
142 INTEGER myThid
143
144 C Functions
145 c INTEGER ILNBLNK
146
147 C !LOCAL VARIABLES:
148 C Local
149 CHARACTER*(2) fType
150 INTEGER nNz
151 c INTEGER IL
152 c CHARACTER*(MAX_LEN_FNAM) fullName
153 CEOP
154
155
156 c IF (myIter.GE.0) THEN
157 c IL=ILNBLNK( fName )
158 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
159 c ELSE
160 c fullName=fName
161 c ENDIF
162
163 fType='RS'
164 nNz=Nr
165 #ifdef ALLOW_MDSIO
166 CALL MDSREADFIELD( fName, readBinaryPrec, fType,
167 & nNz, field, iRec, myThid )
168 #endif
169 RETURN
170 END
171
172 CBOP
173 C !ROUTINE: READ_REC_XYZ_RL
174 C !INTERFACE:
175 SUBROUTINE READ_REC_XYZ_RL( fName,field,iRec,myIter,myThid)
176
177 C !DESCRIPTION: \bv
178 C READ_REC_XYZ_RL is a "front-end" interface to the low-level I/O
179 C routines.
180 C \ev
181
182 C !USES:
183 IMPLICIT NONE
184 C Global
185 #include "SIZE.h"
186 #include "EEPARAMS.h"
187 #include "PARAMS.h"
188
189 C !INPUT/OUTPUT PARAMETERS:
190 C Arguments
191 CHARACTER*(*) fName
192 _RL field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
193 INTEGER iRec
194 INTEGER myIter
195 INTEGER myThid
196
197 C Functions
198 c INTEGER ILNBLNK
199
200 C !LOCAL VARIABLES:
201 C Local
202 CHARACTER*(2) fType
203 INTEGER nNz
204 c INTEGER IL
205 c CHARACTER*(MAX_LEN_FNAM) fullName
206 CEOP
207
208
209 c IF (myIter.GE.0) THEN
210 c IL=ILNBLNK( fName )
211 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
212 c ELSE
213 c fullName=fName
214 c ENDIF
215
216 fType='RL'
217 nNz=Nr
218 #ifdef ALLOW_MDSIO
219 CALL MDSREADFIELD( fName, readBinaryPrec, fType,
220 & nNz, field, iRec, myThid )
221 #endif
222 RETURN
223 END
224
225 CBOP
226 C !ROUTINE: READ_REC_3D_RS
227 C !INTERFACE:
228 SUBROUTINE READ_REC_3D_RS(
229 I fName, fPrec, nNz,
230 O field,
231 I iRec, myIter, myThid )
232
233 C !DESCRIPTION: \bv
234 C READ_REC_3D_RS is a "front-end" interface to the low-level I/O routines.
235 C read a full 3D field (nNz levels) from record number "iRec"
236 C in binary file "fName" (precision "fPrec", generally =32 or 64).
237 C \ev
238
239 C !USES:
240 IMPLICIT NONE
241 C Global
242 #include "SIZE.h"
243 #include "EEPARAMS.h"
244 #include "PARAMS.h"
245
246 C !INPUT/OUTPUT PARAMETERS:
247 C Arguments
248 CHARACTER*(*) fName
249 INTEGER fPrec
250 INTEGER nNz
251 _RS field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nNz,nSx,nSy)
252 INTEGER iRec
253 INTEGER myIter
254 INTEGER myThid
255
256 C Functions
257 c INTEGER ILNBLNK
258
259 C !LOCAL VARIABLES:
260 C Local
261 CHARACTER*(2) fType
262 c INTEGER IL
263 c CHARACTER*(MAX_LEN_FNAM) fullName
264 CEOP
265
266
267 c IF (myIter.GE.0) THEN
268 c IL=ILNBLNK( fName )
269 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
270 c ELSE
271 c fullName=fName
272 c ENDIF
273
274 fType='RS'
275 #ifdef ALLOW_MDSIO
276 CALL MDSREADFIELD( fName, fPrec, fType,
277 & nNz, field, iRec, myThid )
278 #endif
279 RETURN
280 END
281
282 CBOP
283 C !ROUTINE: READ_REC_3D_RL
284 C !INTERFACE:
285 SUBROUTINE READ_REC_3D_RL(
286 I fName, fPrec, nNz,
287 O field,
288 I iRec, myIter, myThid )
289
290 C !DESCRIPTION: \bv
291 C READ_REC_3D_RL is a "front-end" interface to the low-level I/O routines.
292 C read a full 3D field (nNz levels) from record number "iRec"
293 C in binary file "fName" (precision "fPrec", generally =32 or 64).
294 C \ev
295
296 C !USES:
297 IMPLICIT NONE
298 C Global
299 #include "SIZE.h"
300 #include "EEPARAMS.h"
301 #include "PARAMS.h"
302
303 C !INPUT/OUTPUT PARAMETERS:
304 C Arguments
305 CHARACTER*(*) fName
306 INTEGER fPrec
307 INTEGER nNz
308 _RL field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nNz,nSx,nSy)
309 INTEGER iRec
310 INTEGER myIter
311 INTEGER myThid
312
313 C Functions
314 c INTEGER ILNBLNK
315
316 C !LOCAL VARIABLES:
317 C Local
318 CHARACTER*(2) fType
319 c INTEGER IL
320 c CHARACTER*(MAX_LEN_FNAM) fullName
321 CEOP
322
323
324 c IF (myIter.GE.0) THEN
325 c IL=ILNBLNK( fName )
326 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
327 c ELSE
328 c fullName=fName
329 c ENDIF
330
331 fType='RL'
332 #ifdef ALLOW_MDSIO
333 CALL MDSREADFIELD( fName, fPrec, fType,
334 & nNz, field, iRec, myThid )
335 #endif
336 RETURN
337 END
338
339 CBOP
340 C !ROUTINE: READ_REC_XZ_RS
341 C !INTERFACE:
342 SUBROUTINE READ_REC_XZ_RS( fName,field,iRec,myIter,myThid)
343
344 C !DESCRIPTION: \bv
345 C READ_REC_XZ_RS is a "front-end" interface to the low-level I/O
346 C routines.
347 C \ev
348
349 C !USES:
350 IMPLICIT NONE
351 C Global
352 #include "SIZE.h"
353 #include "EEPARAMS.h"
354 #include "PARAMS.h"
355 C !INPUT/OUTPUT PARAMETERS:
356 C Arguments
357 CHARACTER*(*) fName
358 _RS field(1-Olx:sNx+Olx,Nr,nSx,nSy)
359 INTEGER iRec
360 INTEGER myIter
361 INTEGER myThid
362
363 C Functions
364 c INTEGER ILNBLNK
365
366 C !LOCAL VARIABLES:
367 C Local
368 CHARACTER*(2) fType
369 INTEGER nNz
370 c INTEGER IL
371 c CHARACTER*(MAX_LEN_FNAM) fullName
372 CEOP
373
374 c IF (myIter.GE.0) THEN
375 c IL=ILNBLNK( fName )
376 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
377 c ELSE
378 c fullName=fName
379 c ENDIF
380
381 fType='RS'
382 nNz=Nr
383 #ifdef ALLOW_MDSIO
384 CALL MDSREADFIELDXZ( fName, readBinaryPrec, fType,
385 & nNz, field, iRec, myThid )
386 #endif
387 RETURN
388 END
389
390 CBOP
391 C !ROUTINE: READ_REC_XZ_RL
392 C !INTERFACE:
393 SUBROUTINE READ_REC_XZ_RL( fName,field,iRec,myIter,myThid)
394
395 C !DESCRIPTION: \bv
396 C READ_REC_XZ_RL is a "front-end" interface to the low-level I/O
397 C routines.
398 C \ev
399
400 C !USES:
401 IMPLICIT NONE
402 C Global
403 #include "SIZE.h"
404 #include "EEPARAMS.h"
405 #include "PARAMS.h"
406
407 C !INPUT/OUTPUT PARAMETERS:
408 C Arguments
409 CHARACTER*(*) fName
410 _RL field(1-Olx:sNx+Olx,Nr,nSx,nSy)
411 INTEGER iRec
412 INTEGER myIter
413 INTEGER myThid
414
415 C Functions
416 c INTEGER ILNBLNK
417
418 C !LOCAL VARIABLES:
419 C Local
420 CHARACTER*(2) fType
421 INTEGER nNz
422 c INTEGER IL
423 c CHARACTER*(MAX_LEN_FNAM) fullName
424 CEOP
425
426 c IF (myIter.GE.0) THEN
427 c IL=ILNBLNK( fName )
428 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
429 c ELSE
430 c fullName=fName
431 c ENDIF
432
433 fType='RL'
434 nNz=Nr
435 #ifdef ALLOW_MDSIO
436 CALL MDSREADFIELDXZ( fName, readBinaryPrec, fType,
437 & nNz, field, iRec, myThid )
438 #endif
439 RETURN
440 END
441
442 CBOP
443 C !ROUTINE: READ_REC_YZ_RS
444 C !INTERFACE:
445 SUBROUTINE READ_REC_YZ_RS( fName,field,iRec,myIter,myThid)
446
447 C !DESCRIPTION: \bv
448 C READ_REC_YZ_RS is a "front-end" interface to the low-level I/O
449 C routines.
450 C \ev
451
452 C !USES:
453 IMPLICIT NONE
454 C Global
455 #include "SIZE.h"
456 #include "EEPARAMS.h"
457 #include "PARAMS.h"
458
459 C !INPUT/OUTPUT PARAMETERS:
460 C Arguments
461 CHARACTER*(*) fName
462 _RS field(1-Oly:sNy+Oly,Nr,nSx,nSy)
463 INTEGER iRec
464 INTEGER myIter
465 INTEGER myThid
466
467 C Functions
468 c INTEGER ILNBLNK
469
470 C !LOCAL VARIABLES:
471 C Local
472 CHARACTER*(2) fType
473 INTEGER nNz
474 c INTEGER IL
475 c CHARACTER*(MAX_LEN_FNAM) fullName
476 CEOP
477
478
479 c IF (myIter.GE.0) THEN
480 c IL=ILNBLNK( fName )
481 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
482 c ELSE
483 c fullName=fName
484 c ENDIF
485
486 fType='RS'
487 nNz=Nr
488 #ifdef ALLOW_MDSIO
489 CALL MDSREADFIELDYZ( fName, readBinaryPrec, fType,
490 & nNz, field, iRec, myThid )
491 #endif
492 RETURN
493 END
494
495 CBOP
496 C !ROUTINE: READ_REC_YZ_RL
497 C !INTERFACE:
498 SUBROUTINE READ_REC_YZ_RL( fName,field,iRec,myIter,myThid)
499
500 C !DESCRIPTION: \bv
501 C READ_REC_YZ_RL is a "front-end" interface to the low-level I/O
502 C routines.
503 C \ev
504
505 C !USES:
506 IMPLICIT NONE
507 C Global
508 #include "SIZE.h"
509 #include "EEPARAMS.h"
510 #include "PARAMS.h"
511
512 C !INPUT/OUTPUT PARAMETERS:
513 C Arguments
514 CHARACTER*(*) fName
515 _RL field(1-Oly:sNy+Oly,Nr,nSx,nSy)
516 INTEGER iRec
517 INTEGER myIter
518 INTEGER myThid
519
520 C Functions
521 c INTEGER ILNBLNK
522
523 C !LOCAL VARIABLES:
524 C Local
525 CHARACTER*(2) fType
526 INTEGER nNz
527 c INTEGER IL
528 c CHARACTER*(MAX_LEN_FNAM) fullName
529 CEOP
530
531
532 c IF (myIter.GE.0) THEN
533 c IL=ILNBLNK( fName )
534 c WRITE(fullName,'(2a,i10.10)') fName(1:IL),'.',myIter
535 c ELSE
536 c fullName=fName
537 c ENDIF
538
539 fType='RL'
540 nNz=Nr
541 #ifdef ALLOW_MDSIO
542 CALL MDSREADFIELDYZ( fName, readBinaryPrec, fType,
543 & nNz, field, iRec, myThid )
544 #endif
545 RETURN
546 END

  ViewVC Help
Powered by ViewVC 1.1.22