[ncl-talk] Get two different results from Matlab and NCL

Maria Gehne - NOAA Affiliate maria.gehne at noaa.gov
Mon Nov 9 16:45:41 MST 2015


Just a quick side note on that.

Matlab does not know about _FillValues in netcdf files. It reads the
numeric values from the file. Unless you specify these values as missing
and set them to NaN, Matlab will assume these are valid and treat them
accordingly.
NCL does recognize _FillValue and will not plot these values.

As Dennis was saying, you need to look at your data before you start
plotting (in NCL and Matlab) and make sure all the values you are seeing
make sense.

Hope this helps,
Maria

On Mon, Nov 9, 2015 at 4:33 PM, Dennis Shea <shea at ucar.edu> wrote:

> As has been mentioned many times on ncl-talk. The golden rule of data
> processing is *look at your data*. ("examine your data"!!!)
>
> If you had done so, you would have seen that the source array had
> 90361 missing values (_FillValue).
>
>
> [1]
> Matlab must silently interpolate/extrapolate to these values. I am not
> sure that I would consider that a good thing.
>
> [2]
> NCL can interp/extrapolate also. However, the user must explicitly
> invoke the interpolation procedures. At least the user knows what type
> of interpolation has been used.
>
>
>
> On Mon, Nov 9, 2015 at 4:03 PM, Wang, Chao <cxw151530 at utdallas.edu> wrote:
> > Dear Sir/Madam,
> >
> > I have used the data downloaded from GFS to make the wind field. But I
> got
> > two different results from Matlab and NCL. For example, there are two
> blanks
> > in this map of NCL: one is on Greenland, the other is China. But in
> Matlab,
> > the result is different. I don’t know whether is there any problem about
> my
> > NCL codes? I really need your help! Thank you very much!
> >
> > Here is the link to GFS data:
> > https://www.dropbox.com/s/8lombeolk4kr7ml/gfs.t18z.pgrb2.0p25.f024?dl=0
> > Here is the link to MATLAB result:
> > https://www.dropbox.com/s/j8h8u6249q97rw2/Wind-1829m.fig?dl=0
> > Here is the NCL script:
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>
> _______________________________________________
> 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/20151109/35e057b6/attachment.html 


More information about the ncl-talk mailing list