File indexing completed on 2018-03-02 18:43:06 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
1eeb28fe07 Alis*0001 #include "RUNCLOCK_OPTIONS.h"
0002
0003
0004
0005
0006 FUNCTION RUNCLOCK_CONTINUE( myThid )
0007
0008
0009
0010
0011
0012
0013
0014
0015 IMPLICIT NONE
0016
0017
0018 #include "EEPARAMS.h"
0019 #include "RUNCLOCK.h"
0020
0021
0022
0023
0024 LOGICAL RUNCLOCK_CONTINUE
0025 INTEGER myThid
0026
0027
0028 #ifdef ALLOW_RUNCLOCK
0029
0030
0031
0032 CHARACTER*(MAX_LEN_MBUF) msgBuf
0033 INTEGER RC_now_yr,RC_now_mo,RC_now_dy
0034 INTEGER RC_now_hr,RC_now_mi,RC_now_sc
0035 INTEGER dd,dh,dm,ds
0036 INTEGER elapsed_secs,maxtime_secs
0037 Real*8 tins,ETmax
0038
0039 _BEGIN_MASTER(myThid)
0040 IF (.NOT.RUNCLOCKIsOn) THEN
0041 WRITE(msgBuf,'(A)') ' RUNCLOCK_CONTINUE: RUNCLOCK not turned on'
0042 CALL PRINT_ERROR( msgBuf, myThid )
0043 ENDIF
0044 _END_MASTER(myThid)
0045
0046
0047 CALL runclock_gettime(
0048 & RC_now_yr,RC_now_mo,RC_now_dy,
0049 & RC_now_hr,RC_now_mi,RC_now_sc,
0050 & tins)
0051
0052 CALL GLOBAL_MAX_R8(tins,myThid)
0053
0054
0055
0056
0057
0058
0059 ds=RC_now_sc-RC_start_sc
0060 dm=RC_now_mi-RC_start_mi
0061 dh=RC_now_hr-RC_start_hr
0062 dd=RC_now_dy-RC_start_dy
0063
0064
0065 ETmax=((dd*24.+dh)*60.+dm)*60.+ds
0066 CALL GLOBAL_MAX_R8(ETmax,myThid)
0067 elapsed_secs=ETmax
0068
0069 maxtime_secs=(RC_MaxTime_hr*60+RC_MaxTime_mi)*60+RC_MaxTime_sc
0070
0071 _BEGIN_MASTER(myThid)
0072
0073
0074
0075
0076
0077
0078 WRITE(msgBuf,'(A,G16.6,G24.10)') ' RUNCLOCK: dT,T-To =',
0079 & tins-RC_prev_tins,tins-RC_start_tins
0080 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0081 & SQUEEZE_RIGHT , 1)
0082 RC_prev_tins=tins
0083
0084 IF (maxtime_secs.ne.0 .AND. elapsed_secs.GT.maxtime_secs) THEN
0085 RUNCLOCK_CONTINUE=.FALSE.
fc2e08fa67 Cons*0086 WRITE(msgBuf,'(A)')
0087 & ' RUNCLOCK_CONTINUE: Wall Clock limit reached!'
1eeb28fe07 Alis*0088 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0089 & SQUEEZE_RIGHT , 1)
0090 CALL PRINT_ERROR( msgBuf, myThid )
0091 WRITE(msgBuf,'(A)') ' RUNCLOCK_CONTINUE: Ending run now ...'
0092 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0093 & SQUEEZE_RIGHT , 1)
0094 CALL PRINT_ERROR( msgBuf, myThid )
0095 RETURN
0096 ENDIF
0097
0098 _END_MASTER(myThid)
0099
0100 #endif /* ALLOW_RUNCLOCK */
0101
0102 RUNCLOCK_CONTINUE=.TRUE.
0103
0104 RETURN
0105 END