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

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

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


Revision 1.9 - (hide annotations) (download)
Sun Feb 6 23:19:02 2005 UTC (19 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57d_post
Changes since 1.8: +30 -8 lines
write snap-shot diagnostics at the middle of the time-interval (instead of
 at the end)

1 jmc 1.9 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_write.F,v 1.8 2004/12/13 21:55:48 jmc Exp $
2 edhill 1.6 C $Name: $
3    
4 edhill 1.7 #include "DIAG_OPTIONS.h"
5    
6 jmc 1.9 SUBROUTINE DIAGNOSTICS_WRITE ( myTime, myIter, myThid )
7 molod 1.1 C***********************************************************************
8     C Purpose
9     C -------
10 molod 1.2 C Output sequence for the (multiple) diagnostics output files
11 molod 1.1 C
12     C Arguments Description
13     C ----------------------
14 jmc 1.9 C myTime :: Current time of simulation ( s )
15     C myIter :: Current Iteration Number
16     C myThid :: my thread Id number
17 molod 1.1 C***********************************************************************
18 jmc 1.8 IMPLICIT NONE
19 molod 1.1 #include "SIZE.h"
20 jmc 1.8 #include "DIAGNOSTICS_SIZE.h"
21     #include "DIAGNOSTICS.h"
22 molod 1.4 #include "EEPARAMS.h"
23     #include "PARAMS.h"
24 molod 1.1
25 jmc 1.9 _RL myTime
26 jmc 1.8 INTEGER myIter, myThid
27 molod 1.1
28     c Local variables
29     c ===============
30 jmc 1.8 INTEGER n
31 jmc 1.9 INTEGER myItM1, wrIter
32     LOGICAL dump2fileNow
33 jmc 1.8
34 jmc 1.9 IF ( myIter.NE.nIter0 ) THEN
35     myItM1 = myIter - 1
36 molod 1.1
37     C***********************************************************************
38 jmc 1.8 C*** Check to see IF its time for Diagnostic Output ***
39 molod 1.1 C***********************************************************************
40    
41 jmc 1.8 DO n = 1,nlists
42 jmc 1.9 IF ( freq(n).LT.0 ) THEN
43     dump2fileNow = MOD(myItM1,-freq(n)) .EQ. INT(-freq(n)/2)
44     C-- write snap-shot with suffix = myIter to be consistent with
45     C time-average diagnostics (e.g., freq=-1 & freq=1):
46     c wrIter = myIter
47     C-- write snap-shot with suffix = myIter-1 to be consistent with
48     C state-variable time-step:
49     wrIter = myItM1
50     ELSE
51     dump2fileNow = MOD(myIter,freq(n)) .EQ. 0
52     wrIter = myIter
53     ENDIF
54     IF ( dump2fileNow ) THEN
55     CALL DIAGNOSTICS_OUT(n,wrIter,myThid)
56 jmc 1.8 ENDIF
57     ENDDO
58    
59     C- wait for everyone before setting arrays to zero:
60     _BARRIER
61     DO n = 1,nlists
62 jmc 1.9 IF ( freq(n).LT.0 ) THEN
63     dump2fileNow = MOD(myItM1,-freq(n)) .EQ. INT(-freq(n)/2)
64     ELSE
65     dump2fileNow = MOD(myIter,freq(n)) .EQ. 0
66     ENDIF
67     IF ( dump2fileNow ) CALL CLRINDX(n,myThid)
68 jmc 1.8 ENDDO
69    
70     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
71     ENDIF
72    
73     RETURN
74     END

  ViewVC Help
Powered by ViewVC 1.1.22