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

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

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


Revision 1.5 - (show annotations) (download)
Wed Aug 24 23:23:34 2005 UTC (18 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint58l_post, checkpoint58e_post, checkpoint57r_post, checkpoint57s_post, checkpoint58b_post, checkpoint58m_post, checkpoint60, checkpoint61, checkpoint62, checkpoint58r_post, checkpoint57y_post, checkpoint58g_post, checkpoint57x_post, checkpoint58n_post, checkpoint58x_post, checkpoint61l, checkpoint58h_post, checkpoint58w_post, checkpoint58j_post, checkpoint57y_pre, checkpoint58q_post, checkpoint57v_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint58d_post, checkpoint57w_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint58o_post, checkpoint57z_post, checkpoint62a, checkpoint58c_post, checkpoint58k_post, checkpoint58u_post, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint58t_post, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.4: +5 -5 lines
write Initial state & Final state if "dumpInitAndLast=T"

1 C $Header: /u/gcmpack/MITgcm/pkg/offline/offline_state.F,v 1.4 2005/05/15 03:04:57 jmc Exp $
2 C $Name: $
3
4 #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 LOGICAL DIFFERENT_MULTIPLE
29 EXTERNAL DIFFERENT_MULTIPLE
30 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 & DIFFERENT_MULTIPLE(dumpFreq,myTime,deltaTClock)
48 & .OR. dumpInitAndLast.AND.( 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