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

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

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


Revision 1.4 - (show annotations) (download)
Fri Aug 4 02:48:05 2006 UTC (18 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59, checkpoint58y_post, checkpoint58t_post, checkpoint60, checkpoint61, checkpoint58w_post, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, mitgcm_mapl_00, checkpoint58r_post, checkpoint58n_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint58v_post, checkpoint61f, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint61e, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i
Changes since 1.3: +2 -2 lines
use MAX_LEN_FNAM for file name length (replaces fixed length of 80.c)

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

  ViewVC Help
Powered by ViewVC 1.1.22