Wrong shape of variable with PyNIO

From: Peter Kuma <peterkuma_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 03 2013 - 14:35:00 MDT

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

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

Received on Mon Jun 3 14:35:11 2013

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