[Thread Prev][Thread Next][Index]

Re: "ASCII table" output problem



Jerome,

I have used step sizes of .1 and .5 and they do not present any problems for LAS.

- cyndy

Jerome King wrote:

Thanks Joe!

I should have seen this inconsistency in the NUMPROF variable...
However, this problem seems to be independant to the ASCII problem. It still dies inexplicably.
The values for the different axis make sense.

Here are my axis definitions:
---------------------------------------------------------------------------------------
<axes>
<cimtCTD_transect_X units="degrees_east" type="x">
<arange start="-125" step=".1" size="40"/>
</cimtCTD_transect_X>
<cimtCTD_transect_Y units="degrees_north" type="y">
<arange start="35" step=".1" size="30"/>
</cimtCTD_transect_Y>
<cimtCTD_transect_Z units="meters" type="z">
<arange start="0" step="1" size="250"/>
</cimtCTD_transect_Z>
<cimtCTD_transect_T units="day" type="t">
<arange start="2000-01-01 00" step="1" size="1825"/>
<!-- <cimtCTD_transect_T type="t" units="day" default="last">
<v>14-Nov-2002</v>
<v>15-Nov-2002</v>
-->
</cimtCTD_transect_T>
---------------------------------------------------------------------------------------------------

I want to double check with you that LAS will understand a step size of ".1"?
Thanks,

PS: I am using the latest LAS 6.4.1.

From: Joe McLean <joe.mclean@noaa.gov>
To: Jerome King <jejeking@hotmail.com>
Subject: Re: "ASCII table" output problem
Date: Wed, 05 Jan 2005 14:12:08 -0800

Okay,
It looks like we left an incorrect comment in insitu.pl which you actually read.
---------------
# Here are all the internal variables that all database drivers
# must write into the NetCDF file. Any other variables found
# are data variables.
#
# double trdim(trdim) ;
# double trange(trdim) ;
# double tax(index) ;
# float xax(index) ;
# float yax(index) ;
# float zax(index) ;
# float PROF_ID(index) ;
# float NUMPROFS_REQ(dim_one) ;
# float NUMOBS(dim_one) ;
-------------
It should read
# float NUMPROFS(dim_one) ;

and any place where you are using NUMPROFS_REQ or numprofs_req should be replaced with NUMPROFS or numprofs.

I will get that comment changed in our source code. Does this solve that problem?
Also the error was generated in the server/jnls/insitu/ directory Ferret scripts - looking for numprofs, not numprofs_req.

Don't worry about overloading the las_users email list. If you ran across a problem, chances are someone else did too.

Joe
------------------------

Joe McLean wrote:

HOLD EVERYTHING. I just downloaded a netcdf file from your LAS and noticed that the variable name in the file is NUMPROFS_REQ, a holdover from earlier days. Let me check our latest code very quickly.

Joe McLean wrote:

Hi Jerome,
check out $lasroot/xml/perl/TMAP/TMAPDBI.pm and make sure your modifications include this.

NUMPROFS is a count of the number of profiles which your database has returned. It is set in
-------
# Now put a value in for NUMPROFS
$self->{optimize}->{numprofs}->{val} = $PROF_ID;
-------
The subroutine writeCDFFile {} then defines the NUMPROFS variable when it loops through the optimize variables
------------
# Create the optimization variables
foreach my $optvar (keys %{$self->{optimize}}){
my $opt = $self->{optimize}->{$optvar};
my $varid = NetCDF::vardef($ncid, $opt->{name}, $ftype,[$dimid_ONE]);
$string = $opt->{long_name};
NetCDF::attput($ncid, $varid, "long_name", $ctype, \$string);
$string = ($opt->{units});
NetCDF::attput($ncid, $varid, "units", $ctype, \$string);
$opt->{varid} = $varid;
}
-----------
and writes the NUMPROFS data to the NetCDF file looping through them again
-----------
foreach my $optvar (keys %{$self->{optimize}}){
my $opt = $self->{optimize}->{$optvar};
NetCDF::varput($ncid, $opt->{varid}, [0], [1], [$opt->{val}]);
}
-----------

Joe

Jerome King wrote:

Hi Joe!

Thanks for your mail about this.
I did not want to overwhelm the Forum group, but I have another recurring problem with LAS and it's probably linked to my "ASCII" problem.

I get this typical error:

**ERROR: variable unknown or not in data set: NUMPROFS
def sym numprofs `numprofs`
Command file, command group, or REPEAT execution aborted

I am not sure how NUMPROFS gets set during a query process. I compared my LAS with the insitu example and the data table in the database look the same apart from the fact that I pull data from several tables.


Thanks for sharing with me what I could do to correct those problems.
Jerome.



Jerome King
Associate Specialist II
Institute of Marine Sciences
CIMT (http://cimt.ucsc.edu)
phone number: (831) 459-5007.



From: Joe McLean <joe.mclean@noaa.gov>
To: Jerome King <jejeking@hotmail.com>
CC: oar.pmel.las_users@noaa.gov
Subject: Re: "ASCII table" output problem
Date: Wed, 05 Jan 2005 12:04:01 -0800

Hi Jerome,
What version of LAS are you using?
Apologies for the uninformative error messages. I have run into similar sudden ends when the Perl NetCDF interface (used in insitu.pl) fails. Try using the data from output/ba1b7d189c61089565352b73ee60cf4f.nc in a command line Ferret session. Do the values of the various axis variables and fields look like they make sense? Is it possible that your modifications to the DB access driver incorrectly write data to the NetCDF file?

insitu.pl tries to read the data into perl arrays with the following commands:
-----------
my $prof_id = $cdf->getVariable("PROF_ID");
my $xax = $cdf->getVariable("xax");
my $yax = $cdf->getVariable("yax");
my $zax = $cdf->getVariable("zax");
my $tax = $cdf->getVariable("tax");

# Get all requested variables
foreach my $var (@varnames) {
$varObjects{$var} = $cdf->getVariable($var);
}
[...]
# Get data for internal variables we know we'll need
my @prof_ids = $prof_id->getData([0],[$size]);
my @lons = $xax->getData([0],[$size]);
my @lats = $yax->getData([0],[$size]);
my @depths = $zax->getData([0],[$size]);
my @hours = $tax->getData([0],[$size]);
-------------

If any of these variables are missing, Perl NetCDF calls might fail and handle the error incorrectly. Let me know what you find.

Joe
-----------------------------------

Jerome King wrote:

Hi all!

Happy New Year!

I have installed the insitu data example that comes with LAS and I have been modifying it to work with my database.

I would say that 75% of it work. I guess the other 25% needs a bit of tweaking.
First, I needed to download etopo5.cdf to get some of the ferret operations to work.

Now I am trying to get the "ASCII output" to work.
Whatever "view" I select, I always get the same error:

-----------------------------------------------------------------
LAS Error
The following error message was received from LAS:

Died at ../xml/perl/LAS/Server.pm line 1046.
------------------------------------------------------------------

I pulled the following error message out of the LAS debug file:

--------------------------------------------------------------------------------------------------------------


--- Returning from: LAS::Server::Ferret::accessDatabase
FER_GO=custom custom jnls jnls/insitu jnls/section . . /usr/local/ferret/go /usr/local/ferret/examples /usr/local/ferret/contrib
Starting:/usr/local/ferret/bin/ferret -gif -server
Got reply: NOAA/PMEL TMAP
FERRET v5.70
Linux(g77) 2.4.20 - 06/28/04
3-Jan-05 14:31

yes?
Sent command: cancel mode verify
Got reply: yes?
Sent command: cancel mode interp
Got reply: yes?
Sent command: define symbol timeout = 3600
Got reply: yes?
Sent command: canc data/all
Got reply: yes?
Sent command: go std_initialize "output/ba1b7d189c61089565352b73ee60cf4f.nc" "1" "1" "sal_ctd"
Got reply: yes?
LAS::Server::Handler::run(): 0.059435 secs to perform all 'preExecute' activities (database access and parsing)

--- Calling: LAS::Server::Ferret::insitu_data
killing...Waiting for program to exit...
program exited...

--------------------------------------------------------------------------------------------------------------



The insitu_data subroutine in the insitu.pl looks fine to me.
Any ideas?

Thanks a lot!
Jerome.








--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cyndy Chandler		| voice: (508) 289-2765
MS #43, WHOI		| Office hrs: M-F ~ 9-4
Woods Hole, MA  02543	| FAX: (508) 457-2161
cchandler@whoi.edu | http://www.whoi.edu/people/cchandler
U.S. JGOFS Data Management Office
Department of Marine Chemistry and Geochemistry
Woods Hole Oceanographic Institution



[Thread Prev][Thread Next][Index]

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