/[MITgcm]/MITgcm/pkg/offline/offline_state.F
ViewVC logotype

Annotation of /MITgcm/pkg/offline/offline_state.F

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


Revision 1.4 - (hide annotations) (download)
Sun May 15 03:04:57 2005 UTC (19 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57o_post, checkpoint57m_post, checkpoint57j_post, checkpoint57k_post, checkpoint57i_post, checkpoint57h_done, checkpoint57n_post, checkpoint57p_post, checkpoint57q_post, checkpoint57l_post
Changes since 1.3: +4 -5 lines
remove "baseTime" (no used) from arg. list of DIFF_BASE_MULTIPLE
and rename it: DIFFERENT_MULTIPLE

1 jmc 1.4 C $Header: /u/gcmpack/MITgcm/pkg/offline/offline_state.F,v 1.3 2005/04/27 14:10:06 jmc Exp $
2 jmc 1.3 C $Name: $
3    
4 stephd 1.1 #include "OFFLINE_OPTIONS.h"
5    
6     #undef MULTIPLE_RECORD_STATE_FILES
7    
8     CBOP
9     C !ROUTINE: OFFLINE_STATE
10     C !INTERFACE:
11     SUBROUTINE OFFLINE_STATE ( myTime, myIter, myThid )
12     C !DESCRIPTION: \bv
13     C *==========================================================*
14     C | SUBROUTINE OFFLINE_STATE
15     C | o Controlling routine for IO to dump model state.
16     C *==========================================================*
17     C \ev
18    
19     C !USES:
20     IMPLICIT NONE
21     C == Global variables ===
22     #include "SIZE.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25     #include "DYNVARS.h"
26     #include "GRID.h"
27     #include "EOS.h"
28 jmc 1.4 LOGICAL DIFFERENT_MULTIPLE
29     EXTERNAL DIFFERENT_MULTIPLE
30 stephd 1.1 INTEGER IO_ERRCOUNT
31     EXTERNAL IO_ERRCOUNT
32    
33     C !INPUT/OUTPUT PARAMETERS:
34     C myThid - Thread number for this instance of the routine.
35     C myIter - Iteration number
36     C myTime - Current time of simulation ( s )
37     _RL myTime
38     INTEGER myThid
39     INTEGER myIter
40    
41     C !LOCAL VARIABLES:
42     CHARACTER*(MAX_LEN_MBUF) suff
43     INTEGER iRec
44     CEOP
45    
46     IF (
47 jmc 1.4 & DIFFERENT_MULTIPLE(dumpFreq,myTime,deltaTClock) .OR.
48 stephd 1.1 & myTime.EQ.endTime .OR.
49     & myTime.EQ.startTime
50     & ) THEN
51     IF ( dumpFreq .EQ. 0.0 ) THEN
52     iRec = 1
53     ELSE
54     iRec = int ( (myTime-startTime) / dumpFreq +1.5 )
55     ENDIF
56    
57     C-- Going to really do some IO. Make everyone except master thread wait.
58     _BARRIER
59     _BEGIN_MASTER( myThid )
60    
61     C-- Write model fields
62    
63     #ifdef MULTIPLE_RECORD_STATE_FILES
64    
65     C Write each snap-shot as a new record in one file per variable
66     C - creates relatively few files but these files can become huge
67    
68     #else /* MULTIPLE_RECORD_STATE_FILES */
69    
70     C Write each snap-shot as a new file (original and default method)
71     C - creates many files but for large configurations is easier to
72     C transfer analyse a particular snap-shots
73     WRITE(suff,'(I10.10)') myIter
74    
75     #ifdef ALLOW_PTRACERS
76     IF (usePTRACERS) CALL PTRACERS_WRITE_STATE(myIter,myTime,myThid)
77     #endif /* ALLOW_PTRACERS */
78     _END_MASTER( myThid )
79     _BARRIER
80    
81     #endif
82    
83     ENDIF
84    
85     RETURN
86     END

  ViewVC Help
Powered by ViewVC 1.1.22