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

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

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


Revision 1.5 - (show annotations) (download)
Tue Feb 5 15:31:19 2008 UTC (16 years, 3 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, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59o, checkpoint59n, 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, 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.4: +5 -5 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 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagstats_ascii_out.F,v 1.4 2006/02/21 01:23:57 jmc Exp $
2 C $Name: $
3
4 #include "DIAG_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: DIAGSTATS_ASCII_OUT
9
10 C !INTERFACE:
11 SUBROUTINE DIAGSTATS_ASCII_OUT(
12 I statGlob, nLev, ndId,
13 I mId, listId, myIter, myThid )
14
15 C !DESCRIPTION:
16 C Write Global statistic to ASCII file
17
18 C !USES:
19 IMPLICIT NONE
20 #include "SIZE.h"
21 #include "EEPARAMS.h"
22 #include "EESUPPORT.h"
23 #include "DIAGNOSTICS_SIZE.h"
24 #include "DIAGNOSTICS.h"
25
26 C !INPUT PARAMETERS:
27 C statGlob ..... AVERAGED DIAGNOSTIC QUANTITY
28 C nLev .... 2nd Dimension (max Nb of levels) of statGlob array
29 C ndId ... diagnostic Id number (in diagnostics long list)
30 C mId ..... field rank in list "listId"
31 C listId ..... current output Stream list
32 C myIter ..... current Iteration Number
33 C myThid ..... my thread Id number
34 INTEGER nLev
35 _RL statGlob(0:nStats,0:nLev,0:nRegions)
36 INTEGER ndId, mId, listId
37 INTEGER myIter, myThid
38 CEOP
39
40 C !LOCAL VARIABLES:
41 INTEGER im, ix, iv
42 PARAMETER ( iv = nStats - 2 , im = nStats - 1 , ix = nStats )
43 INTEGER i, j, k, klev, nUnit
44
45 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
46
47 _BEGIN_MASTER( myThid)
48
49 #ifdef ALLOW_USE_MPI
50 IF ( diagSt_Ascii .AND. mpiMyId.EQ.0 ) THEN
51 #else
52 IF ( diagSt_Ascii ) THEN
53 #endif
54
55 nUnit = diagSt_ioUnit(listId)
56 klev = kdiag(ndId)
57 C- single level field: Vertical Integral (k=0) & 1rst level are identical
58 C => write only 1 of the 2:
59 IF ( klev.EQ.1 ) kLev = 0
60 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
61 DO j=0,nRegions
62 IF ( diagSt_region(j,listId).GE.1 ) THEN
63 WRITE(nUnit,'(3A,I10,2(A,I4))') ' field : ', cdiag(ndId),
64 & ' ; Iter =',myIter,' ; region #',j, ' ; nb.Lev =',kdiag(ndId)
65 c WRITE(nUnit,'(5A)') ' k |',
66 c & ' -- Average -- |', ' -- Std.Dev -- |',
67 c & ' -- min -- |', ' -- max -- |'
68 WRITE(nUnit,'(6A)') ' k |',
69 & ' -- Average -- |', ' -- Std.Dev -- |',
70 & ' -- min -- |', ' -- max -- |',' Vol'
71 DO k=0,klev
72 C full precision, do not write the volume:
73 c WRITE(nUnit,'(I3,1P4E20.12)') k,(statGlob(i,k,j),i=1,nStats)
74 C reduced precision + write the volume (usefull for testing):
75 WRITE(nUnit,'(I3,1P5E18.10)')
76 & k, (statGlob(i,k,j),i=1,nStats), statGlob(0,k,j)
77 ENDDO
78 ENDIF
79 ENDDO
80 WRITE(nUnit,'(A)') ' '
81 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
82 ENDIF
83
84 _END_MASTER( myThid )
85
86 RETURN
87 END

  ViewVC Help
Powered by ViewVC 1.1.22