/[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.4 - (show annotations) (download)
Tue Feb 21 01:23:57 2006 UTC (18 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58f_post, checkpoint58d_post, checkpoint58c_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.3: +2 -2 lines
minor changes in (ASCII) DiagStats output files.

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagstats_ascii_out.F,v 1.3 2005/11/04 01:30:33 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