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

[McIDAS #HZP-657281]: Moving McIDAS-XCD server



Hi Hsie,

After doing some troubleshooting on stratus yesterday, I verified your
conjecture that the script used to scour the GRIB data on disk
and in the MySQL database was not working correctly on stratus.

"For the files" what was going on was:

- the scouring script, xcdscour, tries to go back 9 days and scour all
  files from 9 days until the number of days that it is told to keep
  (the number of days value passed on the invocation command line)

- what is supposed to happen is that the Julian date is calculated for
  nine days, eight days, ... ago using the following subroutine:

days_ago_year() {
        uname_s=`uname -s`
        if [ "$uname_s" = "Linux" ]; then
                daysago=`date -d "$1 days ago" +%Y%j`
        else
                hours=$(($1*24))
                daysago=`TZ=GMT+$hours date +%Y%j`
        fi
        echo $daysago
}

  This code works correctly on Linux systems.  It seems that it does NOT work 
correctly
  on SunOS systems.

- I discovered that the "daysago=`TZ=GMT+$hours date +%Y%j`" calculation on 
SunOS will
  only work correctly for up to six days in the past.  For the 7th, 8th, and 
9th days
  it returns the current Julian date instead of one for 7, 8, and 9 days ago, 
respectively.
  The result of this is that GRIB files that are to be kept are deleted from 
disk.

  The code used to scour the data from the MySQL database, however, works 
correctly.
  This accounts for your comment that just after running 'xcdscour' almost all 
of the
  GRIB messages were removed from /home/mcidas/savedata/grib while none of the 
fields
  were deleted from the MySQL database (as seen from a 'gribadmin num' listing).

I will be submitting a bug report to SSEC (xcdscour is their script, not mine) 
to get this
fixed.  In the meantime, I modified 'xcdscour' on stratus to only go back 6 
days in time.
My fix seems to have worked correctly since stratus now appears to have a full 
set of
data for GRIB messages received since I made the change.

I just thought you would want to know what was happening on stratus...

Cheers,

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


Ticket Details
===================
Ticket ID: HZP-657281
Department: Support McIDAS
Priority: Normal
Status: Closed