octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42353] ncread reading data incorrectly


From: Alexander Barth
Subject: [Octave-bug-tracker] [bug #42353] ncread reading data incorrectly
Date: Wed, 10 Jun 2015 13:40:24 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

Follow-up Comment #1, bug #42353 (project octave):

In octave 4.0.0 and netcdf 1.0.6, I get this:


>> url =
"http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/udel.airt.precip/precip.mon.total.v301.nc";
url =
http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/udel.airt.precip/precip.mon.total.v301.nc
>> x = ncread(url, "precip",[1 1 1], [720 360 1], [1 1 1]);
>> xm = max(x(:))
xm =  99.530
>> max(x(x~=xm))
ans =  93
>> xmin = min(x(:))
xm =   -9.9692e+36


I get the same values for xm, max(x(x~=xm)) and xmin than in matlab R2013a.

I think that the file has changed since you reported this bug. 

Can you reproduce the issue with a static NetCDF file (not to big to be
attached to this report for instance)?

As far as I am aware, Matlab converts only converts _FillValues to NaN and not
missing_value. Thus the minimum is equal to the missing_value in octave and
Matlab.

In your example the missing_value attribute has the type float now (from
ncdump -h <url>):


...
        float precip(time, lat, lon) ;
                precip:missing_value = -9.96921e+36f ;
...




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42353>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]