[ncl-talk] Plot *.dat format data

Dennis Shea shea at ucar.edu
Mon Apr 18 09:54:17 MDT 2016


I have an existing NCL script that reads the ascii and creates a single
netCDF file containing both variables. Also, I modified Mary's plot script
to read each variable and plot the data.

FYI: If you look at the 'Climate Data Guide:
https://climatedataguide.ucar.edu/

and search on SPARC you will see assorted comments on various SPARC data
sets.

---
It is likely, I will add a SPARC link onto NCL's Application page in the
near future.

Good luck




On Sat, Apr 16, 2016 at 3:30 PM, Mary Haley <haley at ucar.edu> wrote:

> 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
>>
>>
>
> _______________________________________________
> 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/20160418/72dca5b3/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc2nc.ncl
Type: application/octet-stream
Size: 4372 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160418/72dca5b3/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_sparc_data_custom.ncl
Type: application/octet-stream
Size: 4144 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160418/72dca5b3/attachment-0001.obj 


More information about the ncl-talk mailing list