Re: ncl 5.1 vs hdf

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Mar 2009 13:15:51 -0600

Hi Siji,

There is indeed a bug: in 'join' mode, the code is expecting there to
be an added dimension even if you are accessing only a single element of
the aggregated dimension. This has been fixed and the new code will
be available soon. In the meantime there are 2 work-arounds.
1) Switch from 'join' mode to 'cat' mode prior to reading variables
using a single list element, or,
2) Add an extra dimension index with value 0 as the leftmost subscript:
instead of:
        lon=f[0]->Longitude(0,:)
use:
        lon = f[0]->Longitude(0,0,:)

Note, in the new version of the code, either of these constructions
will work.

Thanks for bringing this issue to our attention.
  -dave

On Mar 9, 2009, at 4:00 AM, Sijikumar S wrote:

> Hello,
>
> After upgrading to version 5.1 my script which reads HDF files
> is crashing with following error.
>
>
> warning:Invalid stride: stride must be positive non-zero integer
> fatal:HDF: An error occurred while attempting to read variable
> (Longitude) from file (/home/dbs/AIRS/2003/AIRS.
> 2003.01.01.L3.RetStd031.v5.0.14.0.G07294211513.hdf)
> fatal:Coordinate variables must have one dimension only
> fatal:No coordinate variable exists for dimension (lon) in variable
> (lon)
> Segmentation fault
>
>
> It was working fine with NCL 5.0
>
>
> I think the problem is with 2 dimensional Lat-Lon array reading,
> when Longitude is reading as it is, it works fine
>
>
> lon1=f[0]->Longitude
> print(lon1)
>
> Variable: lon1
> Type: float
> Total Size: 259200 bytes
> 64800 values
> Number of Dimensions: 2
> Dimensions and sizes: [YDim_location | 180] x [XDim_location | 360]
> Coordinates:
> Number Of Attributes: 2
> _FillValue : -9999
> hdf_name : Longitude
> (0,0) -179.5
> (0,1) -178.5
> (0,2) -177.5
> (0,3) -176.5
> (0,4) -175.5
> (0,5) -174.5
> (0,6) -173.5
>
>
> But when it reads as follows
> ncl 38> lon=f[0]->Longitude(0,:) gives
>
> warning:Invalid stride: stride must be positive non-zero integer
> fatal:Subscript out of range, error in subscript #1
> fatal:Memory allocation failure:[errno=12]
> fatal:Execute: Error occurred at or near line 37
>
> ncl 39> print(lon)
>
> Variable: lon
> Type: float
> Total Size: 720 bytes
> 180 values
> Number of Dimensions: 2
> Dimensions and sizes: [YDim_location | 180] x [YDim_location | 1]
> Coordinates:
> Number Of Attributes: 2
> _FillValue : -9999
> hdf_name : Longitude
> (0,0) -2.660818e-05
> (1,0) -2.660818e-05
> (2,0) 4.362793e-32
> (3,0) 4.362793e-32
> (4,0) 4.879321e-42
> (5,0) 4.362316e-32
> (6,0) 2.574143e-39
>
>
> NCL is from ncl_ncarg-5.1.0.Linux_i686_gcc412.tar.gz and uses
> ncl_static as ncl.
>
>
> Regards
> Siji
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 12 2009 - 13:15:51 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 12 2009 - 14:10:21 MDT