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

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

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


Revision 1.4 - (hide annotations) (download)
Fri Jul 1 18:28:52 2011 UTC (12 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint63, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.3: +6 -1 lines
start a hack to get missing-corner values printed (for corner-cell variables
 on CS-grid)

1 jmc 1.4 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagstats_close_io.F,v 1.3 2010/01/13 01:44:12 jmc Exp $
2 jmc 1.1 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 jmc 1.3 C myThid :: my Thread Id number
31 jmc 1.1 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 jmc 1.3 IF ( diagSt_Ascii .AND. myProcId.EQ.0 ) THEN
45 jmc 1.1
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 jmc 1.2 WRITE(msgBuf,'(4A,I6)') 'DIAGSTATS_CLOSE_IO: ',
58 jmc 1.1 & 'close file: ',dataFName(1:iL+15), ' , unit=', nUnit
59     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
60     & SQUEEZE_RIGHT , myThid)
61    
62     ENDDO
63 jmc 1.2
64 jmc 1.1 ENDIF
65    
66 jmc 1.4 C- Close also local diagnostics output file
67     IF ( diagLoc_ioUnit.GT.0 ) THEN
68     CLOSE(diagLoc_ioUnit)
69     ENDIF
70    
71 jmc 1.1 _END_MASTER( myThid )
72    
73     RETURN
74     END

  ViewVC Help
Powered by ViewVC 1.1.22