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

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

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


Revision 1.2 - (hide annotations) (download)
Mon Jun 5 18:17:23 2006 UTC (18 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint60, checkpoint61, checkpoint62, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, 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, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58m_post
Changes since 1.1: +12 -9 lines
Implement periodic averaging diagnostics (e.g., mean seasonal cycle,
 mean diurnal cycle)

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_clear.F,v 1.1 2005/06/26 16:51:49 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "DIAG_OPTIONS.h"
5    
6     CBOP 0
7     C !ROUTINE: DIAGNOSTICS_CLEAR
8     C !INTERFACE:
9     SUBROUTINE DIAGNOSTICS_CLEAR (listId, myThid)
10    
11     C !DESCRIPTION:
12     C***********************************************************************
13     C Driver to clear diagnostics specified in diagnostic index list
14     C***********************************************************************
15    
16     C !USES:
17     IMPLICIT NONE
18    
19     C == Global variables ===
20     #include "EEPARAMS.h"
21     #include "SIZE.h"
22     #include "DIAGNOSTICS_SIZE.h"
23     #include "DIAGNOSTICS.h"
24    
25     C !INPUT PARAMETERS:
26     C listId :: diagnostics list number
27     C myThid :: my Thread Id number
28     INTEGER listId, myThid
29     CEOP
30    
31     C !LOCAL VARIABLES:
32 jmc 1.2 INTEGER m, ndId, ipt, nLev
33 jmc 1.1
34     DO m=1,nActive(listId)
35     IF ( idiag(m,listId).GT.0 ) THEN
36     ndId = jdiag(m,listId)
37     ipt = idiag(m,listId)
38 jmc 1.2 nLev = kdiag(ndId)*averageCycle(listId)
39     CALL DIAGNOSTICS_CLRDIAG( ipt, nLev, myThid )
40 jmc 1.1 ENDIF
41     ENDDO
42    
43     RETURN
44     END
45    
46     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
47    
48     CBOP 0
49     C !ROUTINE: DIAGNOSTICS_CLRDIAG
50     C !INTERFACE:
51 jmc 1.2 SUBROUTINE DIAGNOSTICS_CLRDIAG ( ipt, nLev, myThid )
52 jmc 1.1
53     C !DESCRIPTION:
54     C***********************************************************************
55     C Zero out model diagnostic array elements
56     C***********************************************************************
57    
58     C !USES:
59     IMPLICIT NONE
60    
61     C == Global variables ===
62     #include "EEPARAMS.h"
63     #include "SIZE.h"
64     #include "DIAGNOSTICS_SIZE.h"
65     #include "DIAGNOSTICS.h"
66    
67     C !INPUT PARAMETERS:
68     C ipt :: diagnostic pointer to storage array
69 jmc 1.2 C nLev :: number of levels (in storage array) to reset
70 jmc 1.1 C myThid :: my Thread Id number
71 jmc 1.2 INTEGER ipt, nLev
72 jmc 1.1 INTEGER myThid
73     CEOP
74    
75     C !LOCAL VARIABLES:
76     INTEGER bi,bj
77     INTEGER i,j,k
78 jmc 1.2 INTEGER kl
79 jmc 1.1
80     C **********************************************************************
81     C **** SET DIAGNOSTIC AND COUNTER TO ZERO ****
82     C **********************************************************************
83    
84     DO bj=myByLo(myThid), myByHi(myThid)
85     DO bi=myBxLo(myThid), myBxHi(myThid)
86 jmc 1.2 DO k = 1,nLev
87     kl = ipt+k-1
88     ndiag(kl,bi,bj) = 0
89 jmc 1.1 DO j = 1-OLy,sNy+OLy
90     DO i = 1-OLx,sNx+OLx
91 jmc 1.2 qdiag(i,j,kl,bi,bj) = 0.0
92 jmc 1.1 ENDDO
93     ENDDO
94     ENDDO
95     ENDDO
96     ENDDO
97    
98    
99     RETURN
100     END

  ViewVC Help
Powered by ViewVC 1.1.22