C ********************************************************************** C * * C * SOFTWARE LICENSING * C * * C * This program is free software; you can redistribute * C * it and/or modify it under the terms of the GNU * C * General Public License as published by the Free * C * Software Foundation, either Version 2 of the * C * license, or (at your option) any later version. * C * * C * This program is distributed in the hope that it * C * will be useful, but without any warranty; without * C * even the implied warranty of merchantability or * C * fitness for a particular purpose. See the GNU * C * General Public License for more details. * C * * C * A copy of the GNU General Public License is * C * available at http://www.gnu.org/copyleft/gpl.html * C * or by writing to the Free Software Foundation, Inc.,* C * 59 Temple Place - Suite 330, Boston, MA 02111, USA. * C * * C ********************************************************************** SUBROUTINE DATEHR(IDAY,IMON,IYR,IHR,IMIN,THOURS) C C THIS ROUTINES GIVES THE HOUR (THOURS) CORRESPONDING TO DAY, MON, C YEAR, HOUR AND MINUTES C C OSSM01.FOR C COMMON /DEVCES/ LPRT,LCON,LTPE,LDSK,LWCON DIMENSION MON(12,2) DIMENSION LYEAR(4) DATA(LYEAR(I),I=1,4)/8784,8760,8760,8760/ DATA (MON(I,1),I=1,12)/0,31,59,90,120,151,181,212,243,273, C304,334/ DATA (MON(I,2),I=1,12)/0,31,60,91,121,152,182,213,244,274, C305,335/ THOURS=0.0 IF((IMON.LT.1).OR.(IMON.GT.12)) GOTO 800 IF((IDAY.LT.1).OR.(IDAY.GT.31)) GOTO 800 c change year from 2 digitis to 4 digits (hli,03/28/2000) IYRS=IYR-1900 IF(IYRS.EQ.0) GOTO 12 DO 10 J=1,IYRS IJ=MOD(J,4) IF(IJ.EQ.0) IJ=4 THOURS=THOURS+FLOAT(LYEAR(IJ)) 10 CONTINUE K=1 11 IF(IJ.EQ.4) K=2 IDAYS=MON(IMON,K)+IDAY-1 THOURS=THOURS+FLOAT(24*IDAYS)+FLOAT(IHR)+FLOAT(IMIN)/60. GOTO 999 12 IJ=4 GOTO 11 800 WRITE(LWCON,101) IDAY,IMON,IYR,IHR,IMIN 101 FORMAT(10X,'ERROR IN DATE FIELD',I2,'/',I2,'/',I2,1X,I2,':',I2) 999 RETURN END