[ncl-talk] Netcdf file error

Mary Haley haley at ucar.edu
Thu May 11 14:30:07 MDT 2017


Nisha,

You didn't provide the script that had the "onedtond" call in it.  My guess
is that the second argument to this function is not the correct size for
the array that you are trying to reshape.

I had no problems with opening your attached file and reading the corr
variable.  Here's the short script:

filename = "output_Jan.nc"
f = addfile(filename,"r")
print(f)

corr = f->corr
printVarSummary(corr)
printMinMax(corr,0)


and here's the output:

Variable: f
Type: file
filename: output_Jan
path: output_Jan.nc
Number of Attributes:4
    creation_date : Thu May 11 12:50:34 EDT 2017
    Conventions : None
    source_file : original-file.nc
    title : Jan netCDF variables

dimensions:
    lat = 361
    lon = 576

variables:
    Variable: lat
    Type: double
    Total Size: 361 values
                2888 bytes
    Number of Dimensions: 1
    Dimensions and sizes: [ 361 <lat> ]
    Coordinates:
                lat: [-90.000000..90.000000]
        Number of Attributes:        5
            long_name : latitude
            units : degrees_north
            vmax : 999999986991104.000000
            vmin : -999999986991104.000000
            valid_range : ( -999999986991104.000000, 999999986991104.000000
)

    Variable: lon
    Type: double
    Total Size: 576 values
                4608 bytes
    Number of Dimensions: 1
    Dimensions and sizes: [ 576 <lon> ]
    Coordinates:
                lon: [-180.000000..179.375000]
        Number of Attributes:        5
            long_name : longitude
            units : degrees_east
            vmax : 999999986991104.000000
            vmin : -999999986991104.000000
            valid_range : ( -999999986991104.000000, 999999986991104.000000
)

    Variable: corr
    Type: float
    Total Size: 207936 values
                831744 bytes
    Number of Dimensions: 2
    Dimensions and sizes: [ 361 <lat> x 576 <lon> ]
    Coordinates:
                lat: [-90.000000..90.000000]
                lon: [-180.000000..179.375000]
        Number of Attributes:        1
            _FillValue : 999999986991104.000000


Variable: corr
Type: float
Total Size: 831744 bytes
            207936 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 361] x [lon | 576]
Coordinates:
            lat: [ -90..  90]
            lon: [-180..179.375]
Number Of Attributes: 1
  _FillValue : 1e+15
(0) min=-0.832452   max=0.970284


What version of NCL are you using?  I was able to look at this file with
NCL versions 6.2.1, 6.3.0 and 6.4.0.

--Mary


On Thu, May 11, 2017 at 11:11 AM, Manisha Ganeshan <
manisha.ganeshan86 at gmail.com> wrote:

> Dead NCL community,
>
> I'm trying to write three variables (576x361 dimensions) in a netcdf file
> using the "efficient" method. I get the following warning and error message
> when I try to run ncl_filedump and read a variable from my output.nc
> file. Attached is my script and output.nc file.
>
> *warning:onedtond : output dimension sizes have fewer elements than input,
> some data not copied*
>
> *fatal:NclMalloc Failed:[errno=12]*
>
> *Segmentation fault*
>
>
> Any thoughts on the solution?
>
> Regards,
> Nisha
>
> --
> Dr. Manisha Ganeshan
> Universities Space Research Association
> Maryland, U.S.A.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170511/5accd05f/attachment.html 


More information about the ncl-talk mailing list