[ncl-talk] unregulated daily data plotting

Adam Phillips asphilli at ucar.edu
Fri Mar 27 13:28:05 MDT 2015


Hi Hesham,
Due to the fact that you are reading in an ascii file, are working on daily
data, and wish to plot customized time ranges, this is a case where
conceptually what you ask for sounds simple but in reality it is not.

I have come up with an example code that (somewhat) does what you want. You
will have to modify the attached script to suit your own needs. I cannot
spend any more time on this. You will also have to take a close look at the
coding to verify that the data is being read in and used correctly.

I used a number of functions to parse and prepare the ascii data for
plotting: str_squeeze, str_split, str_split_csv, tofloat, toint and
sprinti. I also used cd_inv_calendar to prepare a time array that could be
used with the time_axis_labels procedure so that you would get nicer tick
mark labels. Note that you will likely need to play with time_axis_labels
somewhat to get the tick mark labels where you want them:

http://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml

Finally, note that you can set the range of times to be plotted by setting
stime/etime. You can plot any range of times from a few days to a few
months.

I have attached the code and an example graphic here. If you have any
further questions please respond to the ncl-talk email list and not to me
personally. That way others can see the dialog and can assist.
Good luck,
Adam

On Tue, Mar 24, 2015 at 8:45 AM, Hesham Afify <algocomp at gmail.com> wrote:

> Hi All
> I have some observational daily data for a couple of years, this data have
> many changes in regularity by the mean it toke on daily, one per three
> days, and one per six days patterns, have some missed periods.
> the point here that I want to plot this data and my inquiry about that is
> how to plot this data in daily, weekly, and monthly basis.
> a sample of this data is attached
>
> best regards
> Hesham
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150327/a90260bb/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ncl
Type: application/octet-stream
Size: 1864 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150327/a90260bb/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 20269 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150327/a90260bb/attachment.png 


More information about the ncl-talk mailing list