This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Bill,
Thanks for sending the ncdump(1) output.
I don't think you're passing-in the right dimension ID array-argument to
varinq(). The argument needs to be a reference to an array rather than
the array itself (i.e. it needs to have a "\" prefix. Try changing the
line
$status = NetCDF::varinq ( $ncid , $var_id , $cdummy , $type , $ndims ,
@dim_ids , $idummy );
to
$status = NetCDF::varinq ( $ncid , $var_id , $cdummy , $type , $ndims ,
\@dim_ids , $idummy );
and see if that works.
--------
Steve Emmerson <http://www.unidata.ucar.edu>