[Thread Prev][Thread Next][Index]
How to extract the parameters passed from LASserver.pl in customizedperl function?
Dear LAS users
I'm customizing a LAS site for mooring data by writing my own perl
function in the file custom.pl.
I don't know how to extract the parameters, like depth, time range, user
selected variables etc, passed from users' web
browser in my function. I need those parameters to tell my ferret script
to plot accordingly.
My site is at
http://palapa.ocean.dal.ca:8080/las/servlets/dataset?catitem=13. Right
now everything in my ferret script is fixed, like variables, time range
and depth. Therefore whatever you select, eventually it will draw a plot
with "salinity" and "temperature"measured at surface during the range
between 2002 Jun to 2002 Nov.
My custom.pl file is like below, it contains a function called
MooringTest.
package LAS::Server::Ferret;
sub MooringTest {
my $self = shift;
my @vars = @{$self->{vars}};
my $numVars = scalar @vars;
use IO::File;
my $log_file = 'MooringTest.log';
my $log_fh = IO::File->new($log_file,O_WRONLY|O_APPEND|O_CREAT);
use Carp ();
if ( !defined ($log_fh) ) { #if open log file fails
Carp::confess("File open failed!");
}
print $log_fh @vars;
print $log_fh $numVars;
print $log_fh "\n";
$self->command("go MooringTest"); # Execute the Ferret command 'go
MooringTest'
$self->genImage($self->{output_file}); # Generate the image
}
1;
As you can see, I print the parameter array passed into my function
in my log file. What I got was like this
LAS::Variable=HASH(0x88eff6c). I checked the perl document about
LAS::Variable, and it has several methods like
getChildren(),getDataset(), getURL(). I tried to get the axes of the
variable and the dataset information but failed.
Can anybody help me to extract the parameters? Any information will
be highly appreciated.
Cheers, Ding
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement