Re: Wrong shape of variable with PyNIO

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 03 2013 - 15:50:11 MDT

Hi Peter,
I have downloaded your file and I can verify what you say. I have checked the file with HDFView and the output I get from it agrees with yours.
We will need to investigate. I am creating a ticket for the problem. I hope we can track it down soon. Thanks for the report.
 -dave

On Jun 3, 2013, at 2:35 PM, Peter Kuma <peterkuma@waveland.org> wrote:

> Hi there,
>
> I encountered a problem with PyNIO. When I read the shape of a variable
> via PyNIO, it is different from the one reported by HDFView and libhdf.
>
> import Nio
> print Nio.__version__
> -> 1.4.1
> f = Nio.open_file("CAL_LID_L1-ValStage1-V3-01.2007-06-12T03-42-18ZN.hdf")
> v = f.variables["Latitude"]
> print v.shape
> -> (56001, 1)
>
> However, HDFView shows for the dataset:
>
> Latitude (720, 49)
> 32-bit floating-point, 56310 x 1
> Number of attributes = 4
> units = degrees
> format = Float_32
> valid_range = -90.0 ... 90.0
> fillvalue = -9999.0
>
> I get the same result with libhdf (program hdftest.c attached):
>
> gcc -o hdftest -ldf -lmfhdf hdftest.c
> ./hdftest CAL_LID_L1-ValStage1-V3-01.2007-06-12T03-42-18ZN.hdf Latitude
> -> 56310 1
>
> The data file can be downloaded from:
>
> https://sourceforge.net/projects/ccplot/files/products/CAL_LID_L1-ValStage1-V3-01.2007-06-12T03-42-18ZN.hdf
>
> It could be something wrong with the file as well, although it has been
> downloaded from NASA ASDC, and not modified.
>
> Many thanks,
>
> Peter
>
> <hdftest.c>_______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Mon Jun 3 15:50:22 2013

This archive was generated by hypermail 2.1.8 : Sun Jun 23 2013 - 14:32:56 MDT