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

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

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


Revision 1.3 - (show annotations) (download)
Sun Jun 26 16:51:49 2005 UTC (18 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57y_post, checkpoint58n_post, checkpoint58h_post, checkpoint57y_pre, checkpoint57v_post, checkpoint58j_post, checkpoint57r_post, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58k_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint58m_post, checkpoint57l_post
Changes since 1.2: +11 -15 lines
change pointers so that 1 diag. can be used several times (with # freq.)

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_is_on.F,v 1.2 2005/05/20 07:28:50 jmc Exp $
2 C $Name: $
3
4 #include "DIAG_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7
8 CBOP 0
9 C !ROUTINE: DIAGNOSTICS_IS_ON
10
11 C !INTERFACE:
12 LOGICAL FUNCTION DIAGNOSTICS_IS_ON( diagName, myThid )
13
14 C !DESCRIPTION:
15 C *==========================================================*
16 C | FUNCTION DIAGNOSTIC_IS_ON
17 C | o Return TRUE if diagnostics "diagName" is Active
18 C *==========================================================*
19
20 C !USES:
21 IMPLICIT NONE
22 #include "EEPARAMS.h"
23 #include "SIZE.h"
24 #include "DIAGNOSTICS_SIZE.h"
25 #include "DIAGNOSTICS.h"
26
27 C !INPUT PARAMETERS:
28 C diagName :: diagnostic identificator name (8 characters long)
29 C myThid :: my thread Id number
30 CHARACTER*8 diagName
31 INTEGER myThid
32 CEOP
33
34 C !LOCAL VARIABLES:
35 INTEGER n,m
36 INTEGER ip,iSp
37
38 DIAGNOSTICS_IS_ON = .FALSE.
39
40 C- search for this diag. in the active 2D/3D diagnostics list
41 DO n=1,nlists
42 DO m=1,nActive(n)
43 IF ( diagName.EQ.flds(m,n) .AND. idiag(m,n).NE.0 ) THEN
44 ip = ABS(idiag(m,n))
45 IF ( ndiag(ip,1,1).GE.0 ) DIAGNOSTICS_IS_ON = .TRUE.
46 ENDIF
47 ENDDO
48 ENDDO
49
50 IF ( .NOT.DIAGNOSTICS_IS_ON ) THEN
51 C- search for this diag. in the active statistics-diagnostics list
52 DO n=1,diagSt_nbLists
53 DO m=1,diagSt_nbActv(n)
54 IF ( diagName.EQ.diagSt_Flds(m,n)
55 & .AND.iSdiag(m,n).NE.0 ) THEN
56 iSp = ABS(iSdiag(m,n))
57 IF (qSdiag(0,0,iSp,1,1).GE.0.) DIAGNOSTICS_IS_ON = .TRUE.
58 ENDIF
59 ENDDO
60 ENDDO
61 ENDIF
62
63 RETURN
64 END

  ViewVC Help
Powered by ViewVC 1.1.22