tick Subroutine

subroutine tick(nymd, nhms, ndt)

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: nymd
integer, intent(inout) :: nhms
integer, intent(in) :: ndt

Calls

proc~~tick~~CallsGraph proc~tick tick proc~compute_incymd compute_incymd proc~tick->proc~compute_incymd proc~compute_nhmsf compute_nhmsf proc~tick->proc~compute_nhmsf proc~compute_nsecf compute_nsecf proc~tick->proc~compute_nsecf proc~is_leap_year is_leap_year proc~compute_incymd->proc~is_leap_year

Called by

proc~~tick~~CalledByGraph proc~tick tick program~time_ave time_ave program~time_ave->proc~tick

Source Code

   subroutine tick (nymd,nhms,ndt)
      integer, intent(inout) :: nymd
      integer, intent(inout) :: nhms
      integer, intent(in) :: ndt

      integer :: nsec

      if(ndt.ne.0) then
         nsec = compute_nsecf(nhms) + ndt

         if (nsec.gt.86400)  then
            do while (nsec.gt.86400)
               nsec = nsec - 86400
               nymd = compute_incymd (nymd,1)
            enddo
         endif

         if (nsec.eq.86400)  then
            nsec = 0
            nymd = compute_incymd (nymd,1)
         endif

         if (nsec.lt.00000)  then
            do while (nsec.lt.0)
               nsec = 86400 + nsec
               nymd = compute_incymd (nymd,-1)
            enddo
         endif

         nhms = compute_nhmsf (nsec)
      endif

   end subroutine tick