/[MITgcm]/MITgcm/pkg/runclock/runclock_continue.F
ViewVC logotype

Contents of /MITgcm/pkg/runclock/runclock_continue.F

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


Revision 1.2 - (show annotations) (download)
Thu Sep 20 20:55:21 2007 UTC (16 years, 7 months ago) by ce107
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.1: +3 -2 lines
Break up line that is longer than 72 columns

1 C $Header: /u/gcmpack/MITgcm/pkg/runclock/runclock_continue.F,v 1.1 2005/05/31 18:24:34 adcroft Exp $
2 C $Name: $
3
4 #include "RUNCLOCK_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: RUNCLOCK_CONTINUE
8 C !INTERFACE:
9 FUNCTION RUNCLOCK_CONTINUE( myThid )
10
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | FUNCTION RUNCLOCK_CONTINUE
14 C | o Function to signal time to termiante run
15 C *==========================================================*
16 C \ev
17 C !USES:
18 IMPLICIT NONE
19
20 C === Global variables ===
21 #include "EEPARAMS.h"
22 #include "RUNCLOCK.h"
23
24 C !INPUT/OUTPUT PARAMETERS:
25 C === Routine arguments ===
26 C myThid :: my Thread Id number
27 LOGICAL RUNCLOCK_CONTINUE
28 INTEGER myThid
29 CEOP
30
31 #ifdef ALLOW_RUNCLOCK
32
33 C !LOCAL VARIABLES:
34 C === Local variables ===
35 CHARACTER*(MAX_LEN_MBUF) msgBuf
36 INTEGER RC_now_yr,RC_now_mo,RC_now_dy
37 INTEGER RC_now_hr,RC_now_mi,RC_now_sc
38 INTEGER dd,dh,dm,ds
39 INTEGER elapsed_secs,maxtime_secs
40 Real*8 tins,ETmax
41
42 _BEGIN_MASTER(myThid)
43 IF (.NOT.RUNCLOCKIsOn) THEN
44 WRITE(msgBuf,'(A)') ' RUNCLOCK_CONTINUE: RUNCLOCK not turned on'
45 CALL PRINT_ERROR( msgBuf, myThid )
46 ENDIF
47 _END_MASTER(myThid)
48
49 C Get the current wall-clock time
50 CALL runclock_gettime(
51 & RC_now_yr,RC_now_mo,RC_now_dy,
52 & RC_now_hr,RC_now_mi,RC_now_sc,
53 & tins)
54
55 CALL GLOBAL_MAX_R8(tins,myThid)
56
57 c write(0,*) 'RUNCLOCK_CONTINUE: yr mo dy hr mi sc tins',
58 c & RC_now_yr,RC_now_mo,RC_now_dy,
59 c & RC_now_hr,RC_now_mi,RC_now_sc,
60 c & tins
61
62 ds=RC_now_sc-RC_start_sc
63 dm=RC_now_mi-RC_start_mi
64 dh=RC_now_hr-RC_start_hr
65 dd=RC_now_dy-RC_start_dy
66 c write(0,'(A,4I3)') 'RUNCLOCK_CONTINUE: dy hr mi sc',dd,dh,dm,ds
67
68 ETmax=((dd*24.+dh)*60.+dm)*60.+ds
69 CALL GLOBAL_MAX_R8(ETmax,myThid)
70 elapsed_secs=ETmax
71 c elapsed_secs=((dd*24.+dh)*60.+dm)*60.+ds
72 maxtime_secs=(RC_MaxTime_hr*60+RC_MaxTime_mi)*60+RC_MaxTime_sc
73
74 _BEGIN_MASTER(myThid)
75 c write(0,*) ' RUNCLOCK_CONTINUE: elapsed=',elapsed_secs,maxtime_secs
76
77 c IF (myProcID.EQ.0)
78 c & write(0,'(A,4I3,2I6,F)') 'RUNCLOCK_CONTINUE: dy hr mi sc el mx',
79 c & dd,dh,dm,ds,elapsed_secs,maxtime_secs,tins-RC_start_tins
80
81 WRITE(msgBuf,'(A,G16.6,G24.10)') ' RUNCLOCK: dT,T-To =',
82 & tins-RC_prev_tins,tins-RC_start_tins
83 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
84 & SQUEEZE_RIGHT , 1)
85 RC_prev_tins=tins
86
87 IF (maxtime_secs.ne.0 .AND. elapsed_secs.GT.maxtime_secs) THEN
88 RUNCLOCK_CONTINUE=.FALSE.
89 WRITE(msgBuf,'(A)')
90 & ' RUNCLOCK_CONTINUE: Wall Clock limit reached!'
91 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
92 & SQUEEZE_RIGHT , 1)
93 CALL PRINT_ERROR( msgBuf, myThid )
94 WRITE(msgBuf,'(A)') ' RUNCLOCK_CONTINUE: Ending run now ...'
95 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
96 & SQUEEZE_RIGHT , 1)
97 CALL PRINT_ERROR( msgBuf, myThid )
98 RETURN
99 ENDIF
100
101 _END_MASTER(myThid)
102
103 #endif /* ALLOW_RUNCLOCK */
104
105 RUNCLOCK_CONTINUE=.TRUE.
106
107 RETURN
108 END

  ViewVC Help
Powered by ViewVC 1.1.22