[ncl-talk] Plot *.dat format data
Mary Haley
haley at ucar.edu
Sat Apr 16 15:30:14 MDT 2016
Xi,
I noticed that this website provided ASCII data, so I chose to use that
instead of the binary data:
ftp://sparc-ftp1.ceda.ac.uk/sparc/ref_clim/randel/temp_wind/
It's pretty easy to read this data using NCL's "asciiread" function:
temp = asciiread("temp.ascii",(/33,41,12/),"float") ; lev x lat x time
wind = asciiread("wind.ascii",(/46,41,12/),"float")
Note the ordering is opposite of the Fortran code they provide in the
README file.
I've attached two scripts, one that does a very basic read of your data and
a series of plots, and one that is much more customized, in that it creates
the time, lat, and level coordinates for your data and does a 3 x 4 panel
plot of both sets of variables.
If you are new to NCL, please see:
DKRZ: NCL Tutorial Version 1.1
<https://dl.dropboxusercontent.com/u/8357888/homepage/tutoriais/ncl/NCL_Tutorial_V1.1.pdf>
--Mary
On Sat, Apr 16, 2016 at 12:50 PM, Xi Chang <xi.chang01 at gmail.com> wrote:
> Dear NCL,
>
> Im wondering how to plot the zonal mean wind and temperature
> from SPARC dataset here
> http://www.sparc-climate.org/data-center/data-access/reference-climatologies/randels-climatologies/temperature-wind-climatology/
> with a format *wind.dat* dan *temp.dat* using NCL?
>
> Anyhelp would be really appreciated.
>
> Thanks
> Xi Chang.
>
>
>
>
>
> _______________________________________________
> 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/20160416/b50ee3e2/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_sparc_data_simple.ncl
Type: application/octet-stream
Size: 1648 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160416/b50ee3e2/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_sparc_data_custom.ncl
Type: application/octet-stream
Size: 6362 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160416/b50ee3e2/attachment-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc_custom_temp.png
Type: image/png
Size: 408889 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160416/b50ee3e2/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc_custom_wind.png
Type: image/png
Size: 507321 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160416/b50ee3e2/attachment-0003.png
More information about the ncl-talk
mailing list