[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 20000229: year mod 400 leap year



Tom,

No....this section of code will only execute if the
first condition "jmonth .eq. 2" is true. All other months will
just fall through.

What my intention here is:
if its jmonth=2 and its a year divisible by 4, and either
   a) the year is not divisible by 100  (all leap years from xx04->xx96
   or
   b) the year is divisible by 400 (those leap years of 1600, 2000, 2400 etc).

If you mean something else, let me know...

Steve Chiswell
Unidata User Support

On Tue, 29 Feb 2000, Tom McDermott wrote:

> Steve,
> 
> Is there a bug in this fix? :
> 
>       IF  (( jmonth .eq. 2 ) .and. ( MOD(iyear,4) .eq. 0 ) 
>      +        .and. (( MOD(iyear,100) .ne. 0) .or.
>      +        ( MOD(iyear,400) .eq. 0 ) )) jmonth = 13
> 
> 
> Won't this set jmonth = 13 for every month in year 2000?
> 
> Tom
> ------------------------------------------------------------------------------
> Tom McDermott                         Email: address@hidden
> System Administrator                  Phone: (716) 395-5718
> Earth Sciences Dept.                  Fax: (716) 395-2416
> SUNY College at Brockport
> 
> 
> On Tue, 29 Feb 2000, Steve Chiswell wrote:
> 
> > 
> > I have updated copies of the 2 time format routines
> > rearranged for MOD(year,400) leap years.
> > 
> > I have posted updates for tiitoc.f and tictoi.f in the
> > ~gbuddy/gempak5.4/patches directory. I will post recompiled
> > binaries for Solaris X86 and Linux distributions in the
> > ~gbuddy/gempak5.4/binary directories as pl16.
> > 
> > To update your source distribution, download the 2 files
> > into your $GEMPAKHOME/source/gemlib/ti directory, then:
> > 
> > 1) update your gemlib
> > 
> > cd $GEMPAKHOME/source/gemlib/ti
> > make clean
> > make all
> > make clean
> > 
> > 2) update your programs and decoders
> > 
> > cd $GEMPAKHOME/source/programs
> > make clean
> > make all
> > make install
> > make clean
> > 
> > cd $NAWIPS/unidata
> > make clean
> > make all
> > make install
> > make clean
> > 
> > cd $NAWIPS/nprogs
> > make clean
> > make all
> > make install
> > make clean
> > 
> > cd $GARPHOME
> > make clean
> > make all
> > make install
> > make clean
> > 
> > (optional if you are using dcacars and dcncprof which aren't built 
> > by default since you need NetCDF installed)
> > 
> > cd $NAWIPS/unidata/ldmbridge/dcacars
> > make clean
> > make all
> > make install
> > make clean
> > 
> > cd $NAWIPS/unidata/ldmbridge/dcncprof
> > make clean
> > make all
> > make install
> > make clean
> > 
> > The above will relink programs, decoders, and GUIs.
> > 
> > I will repackage the complete source distribution as pl16 asap.
> > 
> > 
> > Steve Chiswell
> > Unidata User Support
> > 
> > 
> > 
> > 
> > 
> 
>