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

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

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


Revision 1.9 - (show 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 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_write.F,v 1.8 2004/12/13 21:55:48 jmc Exp $
2 C $Name: $
3
4 #include "DIAG_OPTIONS.h"
5
6 SUBROUTINE DIAGNOSTICS_WRITE ( myTime, myIter, myThid )
7 C***********************************************************************
8 C Purpose
9 C -------
10 C Output sequence for the (multiple) diagnostics output files
11 C
12 C Arguments Description
13 C ----------------------
14 C myTime :: Current time of simulation ( s )
15 C myIter :: Current Iteration Number
16 C myThid :: my thread Id number
17 C***********************************************************************
18 IMPLICIT NONE
19 #include "SIZE.h"
20 #include "DIAGNOSTICS_SIZE.h"
21 #include "DIAGNOSTICS.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24
25 _RL myTime
26 INTEGER myIter, myThid
27
28 c Local variables
29 c ===============
30 INTEGER n
31 INTEGER myItM1, wrIter
32 LOGICAL dump2fileNow
33
34 IF ( myIter.NE.nIter0 ) THEN
35 myItM1 = myIter - 1
36
37 C***********************************************************************
38 C*** Check to see IF its time for Diagnostic Output ***
39 C***********************************************************************
40
41 DO n = 1,nlists
42 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 ENDIF
57 ENDDO
58
59 C- wait for everyone before setting arrays to zero:
60 _BARRIER
61 DO n = 1,nlists
62 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 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