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

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

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


Revision 1.1 - (show annotations) (download)
Sun Jun 26 16:51:49 2005 UTC (18 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57y_post, checkpoint57y_pre, checkpoint57v_post, checkpoint57r_post, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint57q_post, checkpoint57z_post, checkpoint57j_post, checkpoint58b_post, checkpoint57l_post
change pointers so that 1 diag. can be used several times (with # freq.)

1 C $Header: $
2 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 INTEGER m, ndId, ipt
33
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 CALL DIAGNOSTICS_CLRDIAG ( ndId, ipt, myThid )
39 ENDIF
40 ENDDO
41
42 RETURN
43 END
44
45 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
46
47 CBOP 0
48 C !ROUTINE: DIAGNOSTICS_CLRDIAG
49 C !INTERFACE:
50 SUBROUTINE DIAGNOSTICS_CLRDIAG ( ndId, ipt, myThid )
51
52 C !DESCRIPTION:
53 C***********************************************************************
54 C Zero out model diagnostic array elements
55 C***********************************************************************
56
57 C !USES:
58 IMPLICIT NONE
59
60 C == Global variables ===
61 #include "EEPARAMS.h"
62 #include "SIZE.h"
63 #include "DIAGNOSTICS_SIZE.h"
64 #include "DIAGNOSTICS.h"
65
66 C !INPUT PARAMETERS:
67 C ndId :: diagnostic Id number (in available diagnostics list)
68 C ipt :: diagnostic pointer to storage array
69 C myThid :: my Thread Id number
70 INTEGER ndId, ipt
71 INTEGER myThid
72 CEOP
73
74 C !LOCAL VARIABLES:
75 INTEGER bi,bj
76 INTEGER i,j,k
77
78 C **********************************************************************
79 C **** SET DIAGNOSTIC AND COUNTER TO ZERO ****
80 C **********************************************************************
81
82 DO bj=myByLo(myThid), myByHi(myThid)
83 DO bi=myBxLo(myThid), myBxHi(myThid)
84 DO k = 1,kdiag(ndId)
85 DO j = 1-OLy,sNy+OLy
86 DO i = 1-OLx,sNx+OLx
87 qdiag(i,j,ipt+k-1,bi,bj) = 0.0
88 ENDDO
89 ENDDO
90 ENDDO
91 ndiag(ipt,bi,bj) = 0
92 ENDDO
93 ENDDO
94
95
96 RETURN
97 END

  ViewVC Help
Powered by ViewVC 1.1.22