/[MITgcm]/MITgcm/pkg/diagnostics/diagstats_close_io.F
ViewVC logotype

Contents of /MITgcm/pkg/diagnostics/diagstats_close_io.F

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


Revision 1.3 - (show annotations) (download)
Wed Jan 13 01:44:12 2010 UTC (14 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.2: +3 -8 lines
no needs to include EESUPPORT.h

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagstats_close_io.F,v 1.2 2008/02/05 15:31:19 jmc Exp $
2 C $Name: $
3
4 #include "DIAG_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: DIAGSTATS_CLOSE_IO
8 C !INTERFACE:
9 SUBROUTINE DIAGSTATS_CLOSE_IO( myThid )
10
11 C !DESCRIPTION: \bv
12 C *==================================================================
13 C | S/R DIAGSTATS_CLOSE_IO
14 C | o Close I/O unit of ASCII output file
15 C *==================================================================
16 C \ev
17
18 C !USES:
19 IMPLICIT NONE
20
21 C == Global variables ===
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "DIAGNOSTICS_SIZE.h"
26 #include "DIAGNOSTICS.h"
27
28 C !INPUT/OUTPUT PARAMETERS:
29 C == Routine arguments ==
30 C myThid :: my Thread Id number
31 INTEGER myThid
32 CEOP
33
34 C !LOCAL VARIABLES:
35 C == Local variables ==
36 INTEGER n, iL, nUnit
37 CHARACTER*(MAX_LEN_FNAM) dataFName
38 CHARACTER*(MAX_LEN_MBUF) msgBuf
39 INTEGER ILNBLNK
40 EXTERNAL ILNBLNK
41
42 _BEGIN_MASTER( myThid)
43
44 IF ( diagSt_Ascii .AND. myProcId.EQ.0 ) THEN
45
46 DO n=1,diagSt_nbLists
47
48 nUnit = diagSt_ioUnit(n)
49
50 C- write a conclusion & close the file:
51 WRITE(nUnit,'(A)') '# records End here.'
52 CLOSE(nUnit)
53
54 iL = ILNBLNK(diagSt_Fname(n))
55 WRITE(dataFName,'(2A,I10.10,A)')
56 & diagSt_Fname(n)(1:iL), '.', nIter0, '.txt'
57 WRITE(msgBuf,'(4A,I6)') 'DIAGSTATS_CLOSE_IO: ',
58 & 'close file: ',dataFName(1:iL+15), ' , unit=', nUnit
59 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
60 & SQUEEZE_RIGHT , myThid)
61
62 ENDDO
63
64 ENDIF
65
66 _END_MASTER( myThid )
67
68 RETURN
69 END

  ViewVC Help
Powered by ViewVC 1.1.22