1 |
C $Header: /u/gcmpack/MITgcm/pkg/rw/read_fld_xyz_rs.F,v 1.2 2005/08/22 23:00:58 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "RW_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE READ_FLD_XYZ_RS( pref,suff,field,myIter,myThid) |
7 |
C READ_FLD_XYZ_RS is a "front-end" interface to the low-level I/O |
8 |
C routines. It assumes single record files. |
9 |
IMPLICIT NONE |
10 |
C Global |
11 |
#include "SIZE.h" |
12 |
#include "EEPARAMS.h" |
13 |
#include "PARAMS.h" |
14 |
C Arguments |
15 |
CHARACTER*(*) pref,suff |
16 |
_RS field(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy) |
17 |
INTEGER myIter |
18 |
INTEGER myThid |
19 |
C Functions |
20 |
INTEGER ILNBLNK,IFNBLNK |
21 |
C Local |
22 |
CHARACTER*(2) fType |
23 |
INTEGER nNz |
24 |
INTEGER irec |
25 |
INTEGER s1Lo,s1Hi,s2Lo,s2Hi |
26 |
CHARACTER*(MAX_LEN_FNAM) fullName |
27 |
C |
28 |
C-- Build file name |
29 |
C Name has form 'prefix.suffix' |
30 |
C e.g. U.0000000100 |
31 |
s1Lo = IFNBLNK(pref) |
32 |
s1Hi = ILNBLNK(pref) |
33 |
IF ( suff .EQ. ' ' ) THEN |
34 |
WRITE( fullName, '(A)' ) pref(s1Lo:s1Hi) |
35 |
ELSE |
36 |
s2Lo = IFNBLNK(suff) |
37 |
s2Hi = ILNBLNK(suff) |
38 |
WRITE( fullName, '(A,A)' ) pref(s1Lo:s1Hi),suff(s2Lo:s2Hi) |
39 |
ENDIF |
40 |
C |
41 |
fType='RS' |
42 |
nNz=Nr |
43 |
irec=1 |
44 |
#ifdef ALLOW_MDSIO |
45 |
CALL MDSREADFIELD( fullName, readBinaryPrec, fType, |
46 |
& nNz, field, irec, myThid ) |
47 |
#endif |
48 |
RETURN |
49 |
END |