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 SUBROUTINE RUNCLOCK_READPARMS( myThid )
587d15c8e3 Jean*0004
1eeb28fe07 Alis*0005
587d15c8e3 Jean*0006
1eeb28fe07 Alis*0007 IMPLICIT NONE
0008
0009
0010 #include "EEPARAMS.h"
587d15c8e3 Jean*0011 #include "SIZE.h"
0012 #include "PARAMS.h"
1eeb28fe07 Alis*0013 #include "RUNCLOCK.h"
0014
0015
0016 INTEGER myThid
0017
0018 #ifdef ALLOW_RUNCLOCK
587d15c8e3 Jean*0019
0020
0021 CHARACTER*(MAX_LEN_MBUF) msgBuf
0022 INTEGER iUnit
0023 INTEGER tSecs
1eeb28fe07 Alis*0024
0025
0026 NAMELIST /RUNCLOCK/
0027 & RC_maxtime_hr,
0028 & RC_maxtime_mi,
0029 & RC_maxtime_sc
0030
587d15c8e3 Jean*0031
0032
0033 IF ( .NOT.useRunClock ) THEN
0034
0035 _BEGIN_MASTER(myThid)
0036
0037 RUNCLOCKIsOn = .FALSE.
0038
0039 CALL PACKAGES_UNUSED_MSG( 'useRunClock', ' ', ' ' )
0040 _END_MASTER(myThid)
0041 RETURN
0042 ENDIF
1eeb28fe07 Alis*0043
587d15c8e3 Jean*0044 RUNCLOCKIsOn = .TRUE.
1eeb28fe07 Alis*0045
0046 _BEGIN_MASTER(myThid)
0047
0048 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: opening data.runclock'
0049 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0050 & SQUEEZE_RIGHT , 1)
587d15c8e3 Jean*0051
1eeb28fe07 Alis*0052 CALL OPEN_COPY_DATA_FILE(
0053 I 'data.runclock', 'RUNCLOCK_READPARMS',
0054 O iUnit,
0055 I myThid )
0056
0057
587d15c8e3 Jean*0058 RC_maxtime_hr=0
0059 RC_maxtime_mi=0
1eeb28fe07 Alis*0060 RC_maxtime_sc=0
0061
0062
0063 READ(UNIT=iUnit,NML=RUNCLOCK)
0064
0065 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: read data.runclock done'
0066 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0067 & SQUEEZE_RIGHT , 1)
0068
0069
7a77863887 Mart*0070 #ifdef SINGLE_DISK_IO
1eeb28fe07 Alis*0071 CLOSE(iUnit)
7a77863887 Mart*0072 #else
0073 CLOSE(iUnit,STATUS='DELETE')
0074 #endif /* SINGLE_DISK_IO */
1eeb28fe07 Alis*0075
0076 IF (RC_maxtime_hr.LT.0) THEN
0077 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: ERR! RC_maxtime_hr<0'
0078 CALL PRINT_ERROR( msgBuf, myThid )
0079 ENDIF
0080 IF (RC_maxtime_mi.LT.0) THEN
0081 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: ERR! RC_maxtime_mi<0'
0082 CALL PRINT_ERROR( msgBuf, myThid )
0083 ENDIF
0084 IF (RC_maxtime_sc.LT.0) THEN
0085 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: ERR! RC_maxtime_sc<0'
0086 CALL PRINT_ERROR( msgBuf, myThid )
0087 ENDIF
0088 IF (RC_maxtime_sc.GT.59 .AND. RC_maxtime_mi.NE.0) THEN
0089 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: ERR! RC_maxtime_sc>59'
0090 CALL PRINT_ERROR( msgBuf, myThid )
0091 ENDIF
0092 IF (RC_maxtime_mi.GT.59 .AND. RC_maxtime_hr.NE.0) THEN
0093 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: ERR! RC_maxtime_mi>59'
0094 CALL PRINT_ERROR( msgBuf, myThid )
0095 ENDIF
0096
0097 tSecs=(RC_maxtime_hr*60+RC_maxtime_mi)*60+RC_maxtime_sc
0098 IF (tSecs.EQ.0) THEN
0099 WRITE(msgBuf,'(A)') ' RUNCLOCK_READPARMS: no Wall Clock limit set'
0100 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0101 & SQUEEZE_RIGHT , 1)
0102
0103 ELSE
587d15c8e3 Jean*0104 WRITE(msgBuf,'(A,I7)')
1eeb28fe07 Alis*0105 & ' RUNCLOCK_READPARMS: Wall Clock limit set to ',tSecs
0106 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0107 & SQUEEZE_RIGHT , 1)
0108
0109 ENDIF
0110
0111 _END_MASTER(myThid)
0112
0113
0114 _BARRIER
0115
0116 #endif /* ALLOW_RUNCLOCK */
0117
0118 RETURN
0119 END