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

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

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


Revision 1.5 - (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, checkpoint58w_post, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, mitgcm_mapl_00, checkpoint58r_post, checkpoint58n_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59i, checkpoint59h, checkpoint58v_post, checkpoint58x_post, checkpoint59j, checkpoint58u_post, checkpoint58s_post
Changes since 1.4: +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_rl.F,v 1.4 2005/11/04 01:33:50 jmc Exp $
2 C $Name: $
3
4 #include "RW_OPTIONS.h"
5
6 SUBROUTINE WRITE_LOCAL_RL(
7 I pref,suff,nNr,field,bi,bj,iRec,myIter,myThid)
8 C WRITE_LOCAL_RL 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 _RL 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='RL'
49 #ifdef ALLOW_MDSIO
50 IF (nSx.EQ.1.AND.nSy.EQ.1) THEN
51 C The hack below replaces MDS_WRITELOCAL with MDSWRITEFIELD_LOC for
52 C single-threaded execution because the former does not support the
53 C singleCpuIo option. This is a placeholder until MDS_WRITELOCAL
54 C functionality is superseded by pkg/diagnostics.
55 CALL MDSWRITEFIELD_LOC(
56 & fullName, writeBinaryPrec, globalFile,
57 & fType, nNr, field, iRec, myIter, myThid )
58 ELSE
59 CALL MDS_WRITELOCAL(
60 & fullName, writeBinaryPrec, globalFile,
61 & fType, nNr, field, bi, bj, iRec, myIter, myThid )
62 ENDIF
63 #endif
64 RETURN
65 END

  ViewVC Help
Powered by ViewVC 1.1.22