[ncl-talk] issue plotting netCDF4 file

David Brown dbrown at ucar.edu
Wed Sep 10 18:41:46 MDT 2014


Hi Neil,
The precip variable in this file contains NaNs. They must be replaced for
NCL's plotting functions to work properly.

Add the following to your code following after reading the precip variable:

cpc_precip = cpc_file->precip(:,:)
if (any(isnan_ieee(cpc_precip))) then
        replace_ieeenan(cpc_precip,cpc_precip at _FillValue,0)
end if

 -dave

On Wed, Sep 10, 2014 at 4:52 PM, Neil Berg <nberg at atmos.ucla.edu> wrote:

> Hello NCL talk,
>
> I'm having an issue correctly plotting the attached file of CPC
> precipitation.  I am using NCL v.5.2.0 and the netCDF file was created
> using the python-netCDF4 package.  I have successfully plotted other
> netCDF4 files, but this one is not turning out right for some reason.
>
> The contours are not quite what they should be and most notably, there
> should not be any contours over the ocean (only land data is real, ocean
> values should be treated as missing).  I've tried converting this file to
> netCDF4-classic, but the same issue results.
>
> Any help is greatly appreciated.
>
> Sincerely,
>
> Neil Berg
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20140910/067409ad/attachment.html 


More information about the ncl-talk mailing list