- To: netcdf-perl@xxxxxxxxxxxxxxxx
- Subject: varid return value
- From: Gary Hodges <Gary.Hodges@xxxxxxxx>
- Date: Thu, 01 Feb 2007 15:20:14 -0700
The netcdf man page indicates that ncvarid will return a value of -1 if 
an error occurs.  I have the following code and I know that "head_temp2" 
does not exist in the netcdf file.
  
   
my $vid = NetCDF::varid($ncid, "head_temp2");
print("$vid\n);
I get the error "ncvarid: ncid 5: Variable not found" when this is run. 
 Ultimately what I want to do is test if a variable exists and set a 
flag based on the result so I'm not necessarily tied to varid.
Gary ============================================================================== To unsubscribe netcdf-perl, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ==============================================================================
- Follow-Ups:
- Re: varid return value
- From: Steve Emmerson
 
 
- Re: varid return value
