[Thread Prev][Thread Next][Index]

Re: [RDB problem] LAS internal NetCDF file always has the same name....



Hi,
I have found an LAS bug in v6.3.  It involves certain insitu DB access drivers.  When a 'metadata' or 'profile location' plot is requested while in xy view, a NetCDF file is created with a dummy var1.  When var2 is selected and the same region and product are requested, LAS tries to use a cached version of the NetCDF file which contains var1 instead of var2.  We are working on a fix.  Now, this was your original point.

As for the second part of this thread, I am not able to duplicate this error.  You are always getting the digest string 'd41d...'? Even with different regions selected?  With all product requests? Try running the following perl script on your machine.  If you receive the same error, we will look at operating system and perl module details or other parts of your scripts.
---------------------
#! /usr/bin/perl -w

use strict;
use MD5;

my $queryString = "SELECT la,lo,sst,time
FROM testTable
WHERE (lo>=22.0 AND lo<=66.0) AND (la>=12.0 AND la<=67.0) AND (time>=19990101 AND time<=19990401)";

my $md5 = new MD5;
$md5->add($queryString);
my $digest = $md5->digest;
$digest = unpack("H*", $digest);

print "$queryString\n";
print "$digest\n";

my $queryString2 = "SELECT la,lo,sst,time
FROM testTable
WHERE (lo>=36.0 AND lo<=72.0) AND (la>=29.0 AND la<=55.0) AND (time>=19990101 AND time<=19990501)";

$md5->add($queryString2);
my $digest2 = $md5->digest;
$digest2 = unpack("H*", $digest2);

print "$queryString2\n";
print "$digest2\n";
---------------------------

Joe
---------------
cch wrote:

 

Hi, Joe!
I have two examples.
The $queryString and $digest string pairs are shown below.
thanks you!
 
example1:
 
SELECT la,lo,sst,time
FROM testTable
WHERE (lo>=22.0 AND lo<=66.0) AND (la>=12.0 AND la<=67.0) AND (time>=19990101 AND time<=19990401)

  d41d8cd98f00b204e9800998ecf8427e
 
 
example2:

SELECT la,lo,sst,time
FROM testTable
WHERE (lo>=36.0 AND lo<=72.0) AND (la>=29.0 AND la<=55.0) AND (time>=19990101 AND time<=19990501)
 
 d41d8cd98f00b204e9800998ecf8427e 
 

 
Hi,
Could you send me some examples of the differnet $queryString and $digest string pairs?  also, what does your Perl db driver getQueryString() subroutine look like?  I'm fishing here, but I might as well take a look.
Joe

cch wrote:
Anyone can help me?
 
The part of the file $LAS_date/xml/perl/TMAP/insitu.pl is shown below.
 
    if ($output_file eq "") {
      my $queryString = $db->getQueryString();
      my $md5 = new MD5;
      $md5->reset;
      $md5->add($queryString);
      my $digest = $md5->digest;
      #$digest = unpack("H*", $digest);
      $digest = unpack("H*", $digest);
      $output_file = $output_path . $digest . ".nc";
      die "$queryString \n $digest \n";  # my test code
 
The codes decide the name of internal netCDF file.
I inserted a line to check the $queryString and $digest.
But I find that different $queryString always create the same $digest.
I don't know what's wrong ?
Anybody knows how to solve this problem, thanks very much.
----- Original Message -----
From: cch
Sent: Friday, June 04, 2004 12:06 PM
Subject: [RDB problem] LAS internal NetCDF file always has the same name....

Hi, my dear friends.
I find the step 5 on http://ferret.pmel.noaa.gov/LASdoc/serve/cache/20.html has some thing wrong.
The created LAS internal NetCDF file always has the sam name, d41d8cd98f00b204e9800998ecf8427e.nc.
Supporse there are two variables var1 and var2 (either belonging smae Table or different Tables).
When I choose var1 first, it's working good and creating a netcdf file in $LAS_DIR/server/output/d41d8cd98f00b204e9800998ecf8427e.nc.
Then when I choose var2, the error message is showen below.
 
==========================================================
LAS Error
The following error message was received from LAS:
Adding an acceptable error string: "*** NOTE: ".
  NOAA/PMEL TMAP
  FERRET v5.60 
  Linux(g77) 2.4.18 - 04/09/04
   4-Jun-04 10:44    
 
yes? cancel mode verify
yes? cancel mode interp
yes? define symbol refmap_xhi = 68.0
yes? define symbol refmap_yhi = 66.0
yes? define symbol land_type = shade
yes? define symbol refmap_xlo = 20.0
yes? define symbol jnl_t = ARRAY(0x84ebedc)
yes? define symbol refmap_view = box
yes? define symbol refmap_ylo = 24.0
yes? define symbol variable_name_0 = tmp
yes? define symbol fill_type = fill
yes? define symbol jnl_x = ARRAY(0x84ebee8)
yes? define symbol variable_name = ARRAY(0x880a55c)
yes? define symbol jnl_y = ARRAY(0x84ebf00)
yes? define symbol jnl_z = ARRAY(0x8cadc84)
yes? define symbol diag_direction = up
yes? define symbol dataset_name_0 = asia_prof_ctd.cdp
yes? define symbol dataset_name = ARRAY(0x880a580)
yes? define symbol rank = 3
yes? canc data/all
yes? go std_initialize "output/d41d8cd98f00b204e9800998ecf8427e.nc" "1" "1" "tmp"
 **ERROR: variable unknown or not in data set: TMP[D=1]
define grid/like=tmp[d=1] var1_grid_
Command file, command group, or REPEAT execution aborted
===========================================================
 
I should delete $LAS_DIR/server/output/d41d8cd98f00b204e9800998ecf8427e.nc before choose var2,
then the LAS will creat a new netcdf file for var2 (but also named d41d8cd98f00b204e9800998ecf8427e.nc) and work good.
 
The problem is, I should delete the prior netcdf file created for prior variable everytime,
because the LAS internal netcdf file always has the same name.
 
Is this a cache problem, how colud I solve it ??
 
Thanks a lot!
 
 

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement