Hello Recipient,
Thank you very much, I really appreciate your assistance. I have gone through each and every response I have got from NCL developers but I was bit confused at some response that's why what ever addition to the code I was given by NCL developers I use to paste it in my original NCL code and run it but still all the time its generating some errors. This is the original code and i wanted to request for the code which can merge the profiles of a single float. The given code generates separate graph's for different profiles.
>
> 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_288.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
>
>
>
> plot = new (2, "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.eq.0) then
>
> printVarSummary(t)
>
> printVarSummary(s)
>
> end if
>
>
>
> ;************************************************
>
> ; plotting parameters
>
> ;************************************************
>
> sfx = get_file_suffix(fili(nf),0)
>
> pname = sfx@fBase
>
>
>
> wks = gsn_open_wks ("ps",pname)
>
> res@xyLineColors = (/"blue"/)
>
> plot(0) = gsn_csm_xy (wks,t,t&pressure,res) ; create plot
>
> res@xyLineColors = (/"red"/)
>
> plot(1) = gsn_csm_xy (wks,s,s&pressure,res) ; create plot
>
>
>
> resP@txString = fili(nf)
>
> gsn_panel(wks,plot,(/2,1/),resP) ; now draw as one plot
>
>
>
> delete([/t,s/]) ; may change size next file
>
> end do
>
>
>
> end
>
>
> is there any way I can plot the attached profile in one xy plot?
>
> It would be grateful if you can provide me with the assistance as soon as possible.
>
> Thanks
> Sachin.
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<mailto:sachin.nand@usp.ac.fj>
T: (+679) 32 32205
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:19:28 MDT