Re: ncl 5.1 vs hdf

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 10 Mar 2009 11:13:54 -0600

Hi Siji

We got the file. I ran the following simple code on 2 linux systems (32
and 64).
ncl -V ===> 5.1.0

 fils = systemfunc("ls ./AIRS.2003.*")
 f = addfiles (fils, "r")
 lon1=f[0]->Longitude
 printVarSummary(lon1)
 lon=f[0]->Longitude(0,:)
 printVarSummary(lon)

I had no problems.
=================================
I do note that you have a fatal error
 
fatal:Memory allocation failure:[errno=12]

You were processing interactively and the error occurred at "ncl 39>"

Did previous processing read in multiple variables?
What memory do you have available?

D
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
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 10 2009 - 11:13:54 MDT

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