[ncl-talk] problems about converting ASCII to nc and plotting the nc file

Dennis Shea shea at ucar.edu
Sat Oct 4 07:33:44 MDT 2014


[1] lat, lon, rain are all one-dimensional (1D)
[2] You are setting

     rain at lat2d = lat
     rain at lon2d= lon

    The reserved attributes @lat2d and @lon2d require two-dimensional
arrays.
    That is what the 2d means.

[3] You do not need to create a netCDF file for plotting.
      You can read the ascii and plot

See attached.

--
Responses to ncl-talk only. Please no personal salutation.

On Sat, Oct 4, 2014 at 2:14 AM, Li Qi <liqi123sh at qq.com> wrote:

> Dear NCL,
>
> I have an ASCII file having dimensions [lon,lat],
>
> then I'd like to convert it to nc file and plot it.
>
> Attached please find the data and scripts.
>
> However, when I plot it, I got error warnings and no contours appeared on
> the map.
>
> (0)     Error: scalar_field: If the input data is 1-dimensional, you must
> set sfXArray and sfYArray to 1-dimensional arrays of the same length.
> warning:create: Bad HLU id passed to create, ignoring it
> warning:ContourPlotSetValues: Data values out of range of levels set by
> EXPLICITLEVELS mode
>
> Could you please to help me?
>
> Any advice will be greatly appreciated!
>
> Best,
>
> LI Qi‍
>
> _______________________________________________
> 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/20141004/7a8e7183/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ascii2plot.ncl
Type: application/octet-stream
Size: 3896 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141004/7a8e7183/attachment.obj 


More information about the ncl-talk mailing list