/[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.2 - (hide annotations) (download)
Tue Feb 5 15:31:19 2008 UTC (16 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59o, checkpoint59n, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.1: +3 -3 lines
minor modifications for many diagnostics:
- modify "available_diagnostics.log" and diagnostics summary (write mate number)
- use wider (integer) format (generally, use I6) to write diagnostics number
- rename numdiags --> numDiags (to differentiate from mdiag)

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagstats_close_io.F,v 1.1 2005/05/20 07:28:51 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 "EESUPPORT.h"
25     #include "PARAMS.h"
26     #include "DIAGNOSTICS_SIZE.h"
27     #include "DIAGNOSTICS.h"
28    
29     C !INPUT/OUTPUT PARAMETERS:
30     C == Routine arguments ==
31     C myThid - Thread number for this instance of the routine.
32     INTEGER myThid
33     CEOP
34    
35     C !LOCAL VARIABLES:
36     C == Local variables ==
37     INTEGER n, iL, nUnit
38     CHARACTER*(MAX_LEN_FNAM) dataFName
39     CHARACTER*(MAX_LEN_MBUF) msgBuf
40     INTEGER ILNBLNK
41     EXTERNAL ILNBLNK
42    
43     _BEGIN_MASTER( myThid)
44    
45     #ifdef ALLOW_USE_MPI
46     IF ( diagSt_Ascii .AND. mpiMyId.EQ.0 ) THEN
47     #else
48     IF ( diagSt_Ascii ) THEN
49     #endif
50    
51     DO n=1,diagSt_nbLists
52    
53     nUnit = diagSt_ioUnit(n)
54    
55     C- write a conclusion & close the file:
56     WRITE(nUnit,'(A)') '# records End here.'
57     CLOSE(nUnit)
58    
59     iL = ILNBLNK(diagSt_Fname(n))
60     WRITE(dataFName,'(2A,I10.10,A)')
61     & diagSt_Fname(n)(1:iL), '.', nIter0, '.txt'
62 jmc 1.2 WRITE(msgBuf,'(4A,I6)') 'DIAGSTATS_CLOSE_IO: ',
63 jmc 1.1 & 'close file: ',dataFName(1:iL+15), ' , unit=', nUnit
64     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
65     & SQUEEZE_RIGHT , myThid)
66    
67     ENDDO
68 jmc 1.2
69 jmc 1.1 ENDIF
70    
71     _END_MASTER( myThid )
72    
73     RETURN
74     END

  ViewVC Help
Powered by ViewVC 1.1.22