/[MITgcm]/MITgcm/pkg/ptracers/ptracers_monitor.F
ViewVC logotype

Annotation of /MITgcm/pkg/ptracers/ptracers_monitor.F

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


Revision 1.11 - (hide annotations) (download)
Fri Jun 23 00:33:42 2006 UTC (18 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58k_post, checkpoint58m_post
Changes since 1.10: +2 -6 lines
remove un-needed includes

1 jmc 1.11 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_monitor.F,v 1.10 2005/11/08 15:53:41 cnh Exp $
2 mlosch 1.1 C $Name: $
3    
4     #include "PTRACERS_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: PTRACERS_MONITOR
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE PTRACERS_MONITOR(
11     I myIter, myTime, myThid )
12    
13     C !DESCRIPTION:
14     C writes out ptracer statistics
15    
16     C !USES: ===============================================================
17     IMPLICIT NONE
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20 jmc 1.11 #include "EESUPPORT.h"
21 mlosch 1.1 #include "PARAMS.h"
22     #include "GRID.h"
23     #include "PTRACERS_SIZE.h"
24     #include "PTRACERS.h"
25     #ifdef ALLOW_MONITOR
26     #include "MONITOR.h"
27     #endif
28    
29     C !INPUT PARAMETERS: ===================================================
30     C myThid :: thread number
31     C myIter :: current timestep
32     C myTime :: current time
33     INTEGER myIter
34     _RL myTime
35     INTEGER myThid
36    
37     C === Functions ====
38 jmc 1.8 LOGICAL DIFFERENT_MULTIPLE
39     EXTERNAL DIFFERENT_MULTIPLE
40 mlosch 1.1
41     #ifdef ALLOW_PTRACERS
42     #ifdef ALLOW_MONITOR
43    
44     C !LOCAL VARIABLES: ====================================================
45     C i,j :: loop indices
46     C ip :: ptracer number
47     CHARACTER*(MAX_LEN_MBUF) msgBuf
48     CHARACTER*(MAX_LEN_MBUF) suff
49     _RL dT
50     integer ip
51     CEOP
52    
53     dT=deltaTclock
54    
55 jmc 1.8 IF ( DIFFERENT_MULTIPLE( PTRACERS_monitorFreq,myTime,dT ) ) THEN
56     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
57 mlosch 1.9 mon_write_stdout = .FALSE.
58     mon_write_mnc = .FALSE.
59 cnh 1.10 _BARRIER
60 mlosch 1.1
61     C Ptracers field monitor start
62     _BEGIN_MASTER(myThid)
63     #ifdef ALLOW_USE_MPI
64     IF ( .NOT. useSingleCPUIO .OR. mpiMyId .EQ. 0 ) THEN
65     #endif /* ALLOW_USE_MPI */
66    
67 mlosch 1.9 IF (PTRACERS_monitor_stdio) THEN
68 mlosch 1.1 WRITE(msgBuf,'(2A)') '// ==========================',
69     & '============================='
70     CALL PRINT_MESSAGE( msgBuf, mon_ioUnit, SQUEEZE_RIGHT , 1)
71     WRITE(msgBuf,'(A)')
72     & '// Begin MONITOR ptracer field statistics'
73     CALL PRINT_MESSAGE( msgBuf, mon_ioUnit,
74     & SQUEEZE_RIGHT , 1)
75     WRITE(msgBuf,'(2A)') '// ==========================',
76     & '============================='
77     CALL PRINT_MESSAGE( msgBuf, mon_ioUnit, SQUEEZE_RIGHT , 1)
78     mon_write_stdout = .TRUE.
79     ENDIF
80    
81     #ifdef ALLOW_USE_MPI
82     ENDIF
83     #endif /* ALLOW_USE_MPI */
84     _END_MASTER(myThid)
85    
86 mlosch 1.9 #ifdef ALLOW_MNC
87     IF (useMNC .AND. PTRACERS_monitor_mnc) mon_write_mnc = .TRUE.
88     #endif /* ALLOW_MNC */
89    
90 mlosch 1.1 IF ( PTRACERS_monitorFreq .NE. monitorFreq ) THEN
91     C repeat printing of time to make grepping easier, default is not
92     C to do this, because the default is to use the same monitorFreq
93 mlosch 1.5 C for ptracers as for the dynamics variables.
94 mlosch 1.1 CALL MON_SET_PREF('trctime',myThid)
95     CALL MON_OUT_I( '_tsnumber', myIter,mon_string_none,myThid)
96     CALL MON_OUT_RL('_secondsf', myTime,mon_string_none,myThid)
97     ENDIF
98     C Print the basic statistics of ptracer variables
99     CALL MON_SET_PREF('trcstat_',myThid)
100     DO ip = 1, PTRACERS_numInUse
101 cnh 1.10 _BEGIN_MASTER(myThid)
102 mlosch 1.1 WRITE(suff,'(A7,I2.2)') 'ptracer',ip
103 cnh 1.10 _END_MASTER(myThid)
104     _BARRIER
105 mlosch 1.1 CALL MON_PRINTSTATS_RL(
106     & Nr, ptracer(1-Olx,1-Oly,1,1,1,ip),
107     & suff, maskC,hFacC,rA ,drF,myThid)
108     ENDDO
109    
110 cnh 1.10 IF (PTRACERS_monitor_stdio) THEN
111 mlosch 1.1 C Ptracers field monitor finish
112     _BEGIN_MASTER(myThid)
113     #ifdef ALLOW_USE_MPI
114     IF ( .NOT. useSingleCPUIO .OR. mpiMyId .EQ. 0 ) THEN
115     #endif /* ALLOW_USE_MPI */
116     WRITE(msgBuf,'(2A)') '// ==========================',
117     & '============================='
118     CALL PRINT_MESSAGE( msgBuf, mon_ioUnit, SQUEEZE_RIGHT , 1)
119     WRITE(msgBuf,'(A)')
120     & '// End MONITOR ptracers field statistics'
121     CALL PRINT_MESSAGE( msgBuf, mon_ioUnit,
122     & SQUEEZE_RIGHT , 1)
123     WRITE(msgBuf,'(2A)') '// ==========================',
124     & '============================='
125     CALL PRINT_MESSAGE( msgBuf, mon_ioUnit, SQUEEZE_RIGHT , 1)
126     #ifdef ALLOW_USE_MPI
127     ENDIF
128     #endif /* ALLOW_USE_MPI */
129    
130     mon_write_stdout = .FALSE.
131    
132     _END_MASTER(myThid)
133     ENDIF
134 mlosch 1.9
135     mon_write_stdout = .FALSE.
136     mon_write_mnc = .FALSE.
137    
138 mlosch 1.1 C endif different multiple
139     ENDIF
140    
141     #endif /* ALLOW_MONITOR */
142     #endif /* ALLOW_PTRACERS */
143    
144     RETURN
145     END

  ViewVC Help
Powered by ViewVC 1.1.22