Re: XY Plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue May 07 2013 - 08:47:12 MDT

Dear Sachin,

I responded to both of your questions yesterday, and one of them was this question. Are you receiving these responses?

You can see the response in our archives:

http://www.ncl.ucar.edu/Support/talk_archives/2013/1336.html

This should at least partially address the problem you are having below.

You have been posting variations of the same program multiple times, but it's not clear to me that you are getting any of our answers.

Here are some of our other responses to your questions:

http://www.ncl.ucar.edu/Support/talk_archives/2013/1335.html
http://www.ncl.ucar.edu/Support/talk_archives/2013/1315.html
http://www.ncl.ucar.edu/Support/talk_archives/2013/1307.html
http://www.ncl.ucar.edu/Support/talk_archives/2013/1268.html
http://www.ncl.ucar.edu/Support/talk_archives/2013/1148.html

Please email me separately (do not include ncl-talk) and let me know if you are getting these emails.

Thank you,

--Mary

On May 7, 2013, at 3:02 AM, nand_s wrote:

> Hello Recipient,
>
> After many trials of merging the profile into one XY plot, I failed. Can anyone please help me out and find out for me what has happened to this code and what are the changes needed in order to make it compile successfully. The code is given below and the image for the error its generating is also given below:
>
> Please find the three “.nc” files attached in this mail, which are the profiles of one float named as “R5900666” and I want to merge the graph projected by each profile into one XY plot. Can anybody asiist me as soon as possible?
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ;************************************************
> begin
> ;************************************************
> ; get list of files
> ;************************************************
> diri = "pacific-12-2012/pacific/2012/12/" ; input directory
> fili = systemfunc("cd "+diri+" ; ls nodc_R5900666_*.nc")
> print(fili)
> nfili = dimsizes(fili)
> ;************************************************
> ; plot resources
> ;************************************************
> res = True ; plot mods desired
> res@trYReverse = True ; reverse Y-axis
> res@xyLineThicknessF = 2 ; choose dash patterns
> res@gsnDraw = False
> res@gsnFrame = False
> resP = True
> resP@gsnMaximize = True
> plot1 = new(nfili,"graphic")
> plot2 = new(nfili, "graphic")
> ;************************************************
> ; read in data: there is only 1 time, 1 lat, 1 lon
> ;************************************************
>
> do nf=0,nfili-1
> f = addfile (diri+fili(nf),"r")
> t = f->temperature(0,:,0,0)
> s = f->salinity(0,:,0,0)
>
> if (nf.ne.0) then
> overlay(plot1(0),plot1(nf))
> overlay(plot1(0),plot2(nf)) …………………………………Error generated in here as given in the image below
> end if
>
> sfx = get_file_suffix(fili(nf),0)
> pname = sfx@fBase
> wks = gsn_open_wks ("ps",pname)
> res@xyLineColor = (/"blue"/)
> plot1(nf) = gsn_csm_xy (wks,t,t&pressure,res) ; create plot
> res@xyLineColor = (/"red"/)
> plot2(nf) = gsn_csm_xy (wks,s,s&pressure,res) ; create plot
> delete([/t,s/])
> end do
> resP@txString = fili(nf)
> gsn_panel(wks,(/plot1(0),plot2(0)/),(/2,1/),resP)
> end
>
>
> The Error image is given below:
>
> <image001.png>
>
>
> Thanks and best regards.
>
> Sachin Ravilesh Nand | Software Engineer (Consultant)
> B.C.A (Bangalore University-India)
> European Union Global Climate Change Alliance Project.
> Pacific Centre for Environment and Sustainable Development.
> University of the South Pacific.
> E: sachin.nand@usp.ac.fj
> T: (+679) 32 32205
>
> <nodc_R5900666_286.nc><nodc_R5900666_287.nc><nodc_R5900666_288.nc>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 7 08:47:33 2013

This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:19:28 MDT