julday Function

public function julday(mm, id, iyyy)

Arguments

Type IntentOptional Attributes Name
integer :: mm
integer :: id
integer :: iyyy

Return Value integer


Called by

proc~~julday~~CalledByGraph proc~julday julday proc~diffdate DiffDate proc~diffdate->proc~julday proc~getdateint8 GetDateInt8 proc~getdateint8->proc~julday interface~getdate GetDate interface~getdate->proc~getdateint8 proc~getdateint4 GetDateInt4 interface~getdate->proc~getdateint4 proc~cfio_getvar CFIO_GetVar proc~cfio_getvar->proc~diffdate proc~getdatetimevec GetDateTimeVec proc~cfio_getvar->proc~getdatetimevec proc~cfio_putvar CFIO_PutVar proc~cfio_putvar->proc~diffdate proc~cfio_sgetvar CFIO_SGetVar proc~cfio_sgetvar->proc~diffdate proc~cfio_sgetvar->proc~getdatetimevec proc~cfio_sputvar CFIO_SPutVar proc~cfio_sputvar->proc~diffdate proc~getdateint4->proc~getdateint8 proc~getbegdatetime GetBegDateTime proc~getbegdatetime->interface~getdate proc~getdatetimevec->interface~getdate proc~esmf_cfiosdffileopen ESMF_CFIOSdfFileOpen proc~esmf_cfiosdffileopen->proc~getbegdatetime

Source Code

      INTEGER FUNCTION julday(mm,id,iyyy)
      INTEGER id,iyyy,mm,IGREG
      PARAMETER (IGREG=15+31*(10+12*1582))
      INTEGER ja,jm,jy
      jy=iyyy
      if (jy.eq.0) then
        print *, 'julday: there is no year zero'
        return
      endif
      if (jy.lt.0) jy=jy+1
      if (mm.gt.2) then
        jm=mm+1
      else
        jy=jy-1
        jm=mm+13
      endif
      julday=int(365.25*jy)+int(30.6001*jm)+id+1720995
      if (id+31*(mm+12*iyyy).ge.IGREG) then
        ja=int(0.01*jy)
        julday=julday+2-ja+int(0.25*ja)
      endif
      return
      END function julday