1 |
jmc |
1.5 |
C $Header: /u/gcmpack/MITgcm/pkg/rw/read_fld_xyz_rl.F,v 1.4 2007/11/13 19:41:05 jmc Exp $ |
2 |
jmc |
1.2 |
C $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
jmc |
1.2 |
#include "RW_OPTIONS.h" |
5 |
adcroft |
1.1 |
|
6 |
|
|
SUBROUTINE READ_FLD_XYZ_RL( pref,suff,field,myIter,myThid) |
7 |
|
|
C READ_FLD_XYZ_RL 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 |
|
|
_RL 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 |
jmc |
1.4 |
LOGICAL useCurrentDir |
23 |
jmc |
1.5 |
_RS dummyRS(1) |
24 |
adcroft |
1.1 |
CHARACTER*(2) fType |
25 |
|
|
INTEGER nNz |
26 |
jmc |
1.4 |
INTEGER iRec |
27 |
adcroft |
1.1 |
INTEGER s1Lo,s1Hi,s2Lo,s2Hi |
28 |
jmc |
1.3 |
CHARACTER*(MAX_LEN_FNAM) fullName |
29 |
adcroft |
1.1 |
C |
30 |
|
|
C-- Build file name |
31 |
|
|
C Name has form 'prefix.suffix' |
32 |
|
|
C e.g. U.0000000100 |
33 |
|
|
s1Lo = IFNBLNK(pref) |
34 |
|
|
s1Hi = ILNBLNK(pref) |
35 |
|
|
IF ( suff .EQ. ' ' ) THEN |
36 |
|
|
WRITE( fullName, '(A)' ) pref(s1Lo:s1Hi) |
37 |
|
|
ELSE |
38 |
|
|
s2Lo = IFNBLNK(suff) |
39 |
|
|
s2Hi = ILNBLNK(suff) |
40 |
|
|
WRITE( fullName, '(A,A)' ) pref(s1Lo:s1Hi),suff(s2Lo:s2Hi) |
41 |
|
|
ENDIF |
42 |
jmc |
1.4 |
|
43 |
|
|
useCurrentDir = .FALSE. |
44 |
adcroft |
1.1 |
fType='RL' |
45 |
|
|
nNz=Nr |
46 |
jmc |
1.4 |
iRec=1 |
47 |
jmc |
1.2 |
#ifdef ALLOW_MDSIO |
48 |
jmc |
1.4 |
CALL MDS_READ_FIELD( |
49 |
|
|
I fullName, readBinaryPrec, useCurrentDir, |
50 |
|
|
I fType, nNz, 1, nNz, |
51 |
jmc |
1.5 |
O field, dummyRS, |
52 |
jmc |
1.4 |
I iRec, myThid ) |
53 |
jmc |
1.2 |
#endif |
54 |
adcroft |
1.1 |
RETURN |
55 |
|
|
END |