[ncl-talk] Multiple time series plot of same parametre but from different ascii files

Najib Yusuf najibgal at yahoo.com
Sat Apr 1 02:59:48 MDT 2017


Thank you Adam.I did sent as you advised.
Najib 

    On Friday, March 31, 2017 7:08 PM, Adam Phillips <asphilli at ucar.edu> wrote:
 

 Hi Najib,I have looked at your script and read your original query a few times now and I'm still not clear as to what you are trying to accomplish.  If you could provide a more detailed explanation about what you are trying to accomplish I think that would help the ncl-talk community in assisting you.Adam 
On Thu, Mar 30, 2017 at 2:43 AM, Najib Yusuf <najibgal at yahoo.com> wrote:

Thank you Adam.
The current version of the script in question is attached.
Thank you. Najib 

    On Wednesday, March 29, 2017 3:11 PM, Adam Phillips <asphilli at ucar.edu> wrote:
 

 Hi Najib,Please send the current version of your script to ncl-talk so all can see and offer assistance.Adam
On Mar 29, 2017, at 7:40 AM, Najib Yusuf <najibgal at yahoo.com> wrote:


 
Dear all,
Thank you Adam for the help. I change it as you pointed out but I still got a single plot.I don't understand where the problem might be. Please anyone help.Details in the previous messages.
Thank you.
Najib   

 On Tuesday, March 28, 2017 8:55 PM, Adam Phillips <asphilli at ucar.edu> wrote:
 

 Hi Najib,I see the issue. I did not see from your original ncl-talk posting that your n do loop is closed rather quickly between lines 26 and 28:do n= 0,nfiles-1      nfiles = nend do
A quick test shows that that syntax will result in nfiles = 0 and then the do loop concludes. I think what you want is to change your coding from this:
do n= 0,nfiles-1   nfiles = nend doprint(files(n))z1 = asciiread(files(n),(/nday+1/), "string")printVarSummary(z1)....wks = gsn_open_wks("png","AOT_550")....plot = gsn_csm_xy(wks, x, AOT_550, res)draw(plot)frame(wks)end 
to this:

do n= 0,nfiles-1
  print(files(n))  z1 = asciiread(files(n),(/nday+1/), "string")  printVarSummary(z1)
....
  wks = gsn_open_wks("png","AOT_550_"+ n)
....
  plot = gsn_csm_xy(wks, x, AOT_550, res)   draw(plot)  frame(wks)
end do
If after you implemented the above you are still having problems respond to the ncl-talk list.Adam



On Sun, Mar 26, 2017 at 12:55 AM, Najib Yusuf <najibgal at yahoo.com> wrote:

Dear ncl,
I effected the correction but still getting a single plot.Kindly assist.
Thank you.
Najib 

    On Friday, March 24, 2017 6:02 PM, Adam Phillips <asphilli at ucar.edu> wrote:
 

 Hi Najib,I think your script is close. You are redefining the workstation each time through your n do loop. Thus, each time through the do loop the output png file gets overwritten. Change this line:wks = gsn_open_wks("png","AOT_550")to this:wks = gsn_open_wks("png","AOT_550_"+ n)

and I think you will get what you want.
I hope that helps. If not, or if you have further questions, please respond to the ncl-talk email list and not to me personally.Adam

On Fri, Mar 24, 2017 at 3:47 AM, Najib Yusuf <najibgal at yahoo.com> wrote:


Dear ncl-talk,
I am trying as I'm still at the initial stage learning ncl going through user-guides tutorials etc. I want to plot multiple time series with the parametre from different files (AOT_550_2005 to AOT_550_2013). I have writing the codes (see attached file) but when I run it I got only one plot of AOT_550_2005 not with the remaining years.
Kindly assist on how the remaining years will appear on the plot.I also tried looping but the errors are getting much so I live it this way since there is no error.
Thank you
Najib
______________________________ _________________
ncl-talk mailing list
ncl-talk at ucar.edu
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 


   



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


   

______________________________ _________________
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





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


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170401/c24fe2cd/attachment.html 


More information about the ncl-talk mailing list