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

20000110: ldm Y2K (fwd)



>From: Ted Jackson <address@hidden>
>Organization: NASA/GSFC
>Keywords: 200001101902.MAA29317 LDM Y2K

Ted,

>Cc: Dave Makofski <address@hidden>
>Subject: ldm Y2K
>
>I've noticed that the ldm output files are named with "10" as the first 2
>digits.  Is that what is desired.  Here are some samples: 10010921_sev.wmo
>99073023_sev.wmo 99090501_sev.wmo 99101309_sev.wmo 99120114_sev.wmo
>10010922_sev.wmo 99073023_wws.wmo 99090502_sev.wmo 99101310_sev.wmo
>99120115_sev.wmo 10010922_wws.wmo 99073100_sev.wmo 99090502_wws.wmo
>99101311_sev.wmo 99120116_sev.wmo 10010923_sev.wmo 99073100_wws.wmo
>99090503_sev.wmo 99101312_sev.wmo 99120117_sev.wmo 10011000_sev.wmo
>99073101_sev.wmo 99090504_sev.wmo 99101313_sev.wmo 99120118_sev.wmo
>10011001_sev.wmo 99073102_sev.wmo 99090505_sev.wmo 99101314_sev.wmo
>99120119_sev.wmo
>
>Seems like there should ba a patch somewhere, or something that I can
>change?

If your files are being named using the \yy construct in pqact.conf, the
following should get you going:

>From address@hidden  Thu Dec 30 10:09:13 1999
>To: address@hidden, address@hidden
>Subject: 19991230: Y2K Bug Fix for pqact program of the LDM
>Reply-to: address@hidden
>Date: Thu, 30 Dec 1999 10:09:13 -0700
>From: Unidata Support <address@hidden>

Hi,

A copy of this notice is available at

  http://www.unidata.ucar.edu/packages/ldm/y2k-fix.html

Thanks to Al Taylor of NOAA's Air Resources Laboratory for being the
first to report a Y2K bug in the pqact program of the LDM (all
versions). The symptom of the bug is that pqact.conf entries that make
use of two-digit year substitution patterns such as (\1:yy) will
substitute the string "10" instead of the string "00" for products
whose WMO header indicates a date in January or later.

For example, the pqact.conf entry 

WMO     ^S[AP][AC-Z][A-Z].* .... ([0-3][0-9])
        FILE    data/obs/surface/hrly/(\1:yy)(\1:mm)\1.hrly

when presented with a matching product with a date component of 010212
(representing 1200 on January 2) will append the product to a file
with a name such as "100212.hrly" instead of the expected
"000212.hrly".

A fix for the bug is to change line 643 in the source file
ldm-5.0.8/src/pqact/palt.c from

                (void) sprintf(ostring,"%d",year);

to 

                (void) sprintf(ostring,"%02d", year % 100);

and then rebuild pqact and reinstall it. An already-patched version of
the palt.c file is available from

  ftp://ftp.unidata.ucar.edu/pub/ldm5/palt.c.

To make it easier to install this bug fix, we have built new versions
of pqact for all the common platforms for which we make binary
distributions. You can just FTP the appropriate version of pqact for
your platform and install it in /usr/local/ldm/bin/pqact (or wherever
you have pqact installed). Below is a list of the available pqact
binaries. Versions built for an earlier version of a platform, for
example sunos_5.6-sparc, will generally work on later versions of the
same platform such as sunos_5.7-sparc.

  ftp://ftp.unidata.ucar.edu/pub/binary/aix_4.3-rs6000/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/hpux_10.20-hp9000/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/hpux_11.00-hp9000/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/irix64_6.5-mips/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/irix_6.5-mips/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/linux_2.2.5-i686/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/osf1_4.0-alpha/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/sunos_5.6-sparc/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/sunos_5.7-i86pc/pqact
  ftp://ftp.unidata.ucar.edu/pub/binary/sunos_5.7-sparc/pqact

If you have a platform for which none of these binaries is appropriate
or if you need pqact built with the GDBM option, you will have to
build a new version of pqact from source after making the one-line
change above. Here's how to do that:

% cd ~ldm/runtime/src/pqact
% mv palt.c palt.sav

Then copy the new palt.c to this directory. 

% make
% cp pqact ~ldm/bin

We will be happy to assist with this and give top priority to any
questions about this sent to address@hidden.

We're sorry for the inconvenience and the late notice on this bug, but
it slipped by our testing.

Tom Yoksas
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303)497-8644                                                  P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata WWW Service                        http://www.unidata.ucar.edu/     
****************************************************************************