[ncl-talk] 回复: problems about converting ASCII to nc and plotting thenc file
Li Qi
liqi123sh at qq.com
Sat Oct 4 08:49:14 MDT 2014
very nice script and nicely explained...
Thank you very much!
By the way: Is there any tricky way to convert multiple ascii files to nc files?
Attached are the data.
------------------ 原始邮件 ------------------
发件人: "Dennis Shea";<shea at ucar.edu>;
发送时间: 2014年10月4日(星期六) 晚上9:33
收件人: "Li Qi"<liqi123sh at qq.com>;
抄送: "ncl-talk"<ncl-talk at ucar.edu>;
主题: Re: [ncl-talk] problems about converting ASCII to nc and plotting thenc file
[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/dfb62ad9/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070708_01.dat
Type: application/octet-stream
Size: 562693 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141004/dfb62ad9/attachment-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070708_02.dat
Type: application/octet-stream
Size: 562693 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141004/dfb62ad9/attachment-0004.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070708_03.dat
Type: application/octet-stream
Size: 562693 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141004/dfb62ad9/attachment-0005.obj
More information about the ncl-talk
mailing list