Re: Question about gsn_polyline_ndc function

From: Sabeerali(sebi) <sabeerl_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 02 2010 - 21:52:09 MDT

Hi Adam,
   Thanks for your quick replay. Yes, I am using overlay plots..Also I set
gres@tfPolyDrawOrder = "PostDraw".. Still the problem is there. Is it
because of overlay..If it so what is the solution? .Appreciate your help.

plot1=gsn_csm_vector(wks,aveX1_12lag_backup,aveX2_12lag_backup,res)
base1=gsn_csm_contour_map_ce(wks,aveX1_12lag,res1)
overlay(base1,plot1)
plot(0)=base1

plot2=gsn_csm_vector(wks,aveX1_9lag_backup,aveX2_9lag_backup,res)
base2=gsn_csm_contour_map_ce(wks,aveX1_9lag,res1)
overlay(base2,plot2)
plot(1)=base2

gres=True
gres@tfPolyDrawOrder = "PostDraw"
gres@gsLineColor="red3"
gsn_polyline_ndc(wks,(/0.45,0.55/),(/0.0,0.99/),gres)

resP =True
gsn_panel(wks,plot,(/2,1/),resP)

On 2 June 2010 23:30, <ncl-talk-request@ucar.edu> wrote:

> Send ncl-talk mailing list submissions to
> ncl-talk@ucar.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> or, via email, send a message with subject or body 'help' to
> ncl-talk-request@ucar.edu
>
> You can reach the person managing the list at
> ncl-talk-owner@ucar.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ncl-talk digest..."
>
>
> Today's Topics:
>
> 1. questions, thanks (Yi Wang)
> 2. how to calculate the weights for 2-D Lanczos filter (Duchon,
> 1979) (moon)
> 3. Question about gsn_polyline_ndc function (Sabeerali(sebi))
> 4. Re: how to calculate the weights for 2-D Lanczos filter
> (Duchon, 1979) (Dennis Shea)
> 5. Re: questions, thanks (Adam Phillips)
> 6. Re: Question about gsn_polyline_ndc function (Adam Phillips)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 1 Jun 2010 17:43:08 -0500
> From: Yi Wang <yiwang6@hdfgroup.org>
> Subject: questions, thanks
> To: ncl-talk@ucar.edu
> Message-ID:
> <AANLkTinmaTI8fY_JvEv1-QU9Z81k3DQ2rCuBB1i7RKhB@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear friends,
>
> I met a problem when I used NCL. The warning is "ContourPlotInitialize: 0.0
> not currently supported as a missing value; expect inaccurate plot". Is
> there any kind friend can help me handle this problem? Thanks a lot. I
> attach the codes as below.
>
> Best,
> Yi
>
>
> load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ; This is an example of a 2-D data field.
> ; It is assumed users know how to obtain information such as _FillValue
> from
> HDFView.
> ; For information about HDFView, visit
> http://www.hdfgroup.org/hdf-java-html/hdfview/.
> begin
> eos_file=addfile("C1978303124834.L2_MLAC.hdf", "r") ; Read file.
> ; Since the file is not HDF-EOS2, it is not necessary to append .he2
> data=eos_file->nLw_443 ; read data field
> ; Here, because the file is not HDF-EOS2, it is not necessary to append the
> group name
> data@_FillValue=0b
> lat=eos_file->latitude
> lon=eos_file->longitude
> dimsize = dimsizes(data)
> numlat = dimsize(0)
> numlon = dimsize(1)
> ; define new latitude
> nlat=new( (/numlat,numlon/), float)
> mlon=new( (/numlat,numlon/), float)
>
> do i = 0, numlat-1
> do j =0, 246
> ;when j = 0
> if(j.eq.0)
> nlat(i,j) = lat(i,j)
> mlon(i,j) = lon(i,j)
> continue
> end if
> ;when j = 1, ..., 245
> if((j.ge.1).and.(j.le.245))
> count=8*(j-1)+1
> arr_fill=fspan(lat(i,(j-1)), lat(i, j), 9)
> nlat(i, count:count+7) = (/ arr_fill(1:8) /)
> arr_fill=fspan(lon(i,(j-1)), lon(i, j), 9)
> mlon(i, count:count+7) = (/ arr_fill(1:8) /)
> continue
> end if
> ;when j = 246
> if(j.eq.246)
> count=8*(j-1)+1
> array_fill=fspan(lat(i,(j-1)), lat(i, j), 8)
> nlat(i, count:count+6) = (/ array_fill(1:7) /)
> array_fill=fspan(lon(i,(j-1)), lon(i, j), 8)
> mlon(i, count:count+6) = (/ array_fill(1:7) /)
> continue
> end if
>
> end do
> end do
>
> data@lat2d=nlat
> data@lon2d=mlon
>
> xwks=gsn_open_wks("pdf","C1978303124834.L2_MLAC_nLw_443") ; open
> workstation
> res=True ; plot mods desired
> res@cnFillOn=True ; enable contour fill
> res@gsnMaximize=True; make plot large
> res@gsnPaperOrientation = "portrait" ; force portrait orientation
> res@cnLinesOn=False ; turn off contour lines
> res@cnLineLabelsOn = False; turn off contour line labels
> res@gsnSpreadColors=True ; use the entire color spectrum
> res@cnFillMode="RasterFill <res@cnFillMode=%22RasterFill>" ; faster
> res@lbOrientation="vertical <res@lbOrientation=%22vertical>" ; vertical
> labels
> res@cnMissingValFillPattern = 0 ; missing value pattern is set to
> "SolidFill"
> res@cnMissingValFillColor=0; white color for missing values
> res@lbLabelAutoStride = True ; ensure no label overlap
>
>
> gsn_define_colormap(xwks,"BlAqGrYeOrReVi200") ; define colormap
>
> res@tiMainString="C1978303124834.L2_MLAC.hdf<res@tiMainString
> =%22C1978303124834.L2_MLAC.hdf>"
> ; create title
> res@gsnCenterString="nLw_443 <res@gsnCenterString=%22nLw_443>" ; create
> center text
> plot=gsn_csm_contour_map_ce(xwks,data,res) ; plot on world map first
>
>
>
> delete(plot) ; cleaning up resources used
> delete(nlat)
> delete(mlon)
> delete(xwks)
> delete(data)
> delete(res)
> delete(eos_file)
> end
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20100601/ff7014be/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 02 Jun 2010 18:23:14 +0800
> From: moon <nightmoon35@gmail.com>
> Subject: how to calculate the weights for 2-D Lanczos
> filter (Duchon, 1979)
> To: ncl-talk@ucar.edu
> Message-ID: <op.vdn4g0z9gbhnh9@guanyue>
> Content-Type: text/plain; format=flowed; delsp=yes; charset=gbk
>
> Dear All,
>
> Does anyone know how to calculate 2-D Lanczos filter using function
> "filwgts_lanczos"?
> Thanks for your help in advance.
>
> Best
> moon
> 2010/6/2
> --
> ?? Opera ????????????: http://www.opera.com/mail/
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 2 Jun 2010 17:07:29 +0530
> From: "Sabeerali(sebi)" <sabeerl@gmail.com>
> Subject: Question about gsn_polyline_ndc function
> To: ncl-talk@ucar.edu
> Message-ID:
> <AANLkTilTqz18-JMMJyEt5blCHdHSNvCjaBpIWZIb2QbB@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Everyone,
>
> I have four contour plot panelled in four raw (/4,1/). I want
> to draw a line from top plot to bottom plot..So I used
> gsn_polyline_ndc(wks,(/0.45,0.55/),(/0.0,0.99/),gres)..It draws the line
> from top plot to bottom plot..But the line is not appearing over the
> contour
> plot..In between two contour plot line is appearing. Any help would be
> appreciated.
>
> Thanks in advance
>
>
> --
> **********************************
> Sabeerali
> Climate and Global Modeling Division
> Indian Institute of Tropical Meteorology
> Pashan, Pune, 411 008
> ****************************************
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20100602/d5d5ac04/attachment.html
>
> ------------------------------
>
> Message: 4
> Date: Wed, 02 Jun 2010 08:07:19 -0600
> From: Dennis Shea <shea@ucar.edu>
> Subject: Re: how to calculate the weights for 2-D Lanczos
> filter (Duchon, 1979)
> To: moon <nightmoon35@gmail.com>
> Cc: ncl-talk@ucar.edu
> Message-ID: <4C066597.3090607@ucar.edu>
> Content-Type: text/plain; charset=x-gbk; format=flowed
>
> Hopefully, someone has a code.
> ---
> If not, a reference is:
>
> Journal of Applied Meteorology 1979; 18: 1016-1022
> Claude E. Duchon
>
> Lanczos Filtering in One and Two Dimensions
>
> ===
> The acknowledgements indicates there is a (?fortran?) code
> available from thr author.
>
> Good luck
>
>
> On 6/2/10 4:23 AM, moon wrote:
> > Dear All,
> >
> > Does anyone know how to calculate 2-D Lanczos filter using function
> > "filwgts_lanczos"?
> > Thanks for your help in advance.
> >
> > Best
> > moon
> > 2010/6/2
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 02 Jun 2010 10:11:58 -0600
> From: Adam Phillips <asphilli@ucar.edu>
> Subject: Re: questions, thanks
> To: ncl-talk@ucar.edu
> Message-ID: <4C0682CE.7020008@ucar.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Yi,
> Simply set data@_FillValue = 1.e20 or some other value other than 0
> right before you create the plot. The warning message is simply saying
> that NCL does not like the _FillValue attribute of an array to be
> plotted to be = 0.
>
> data@_FillValue = 1.e20
> plot=gsn_csm_contour_map_ce(xwks,data,res) ; plot on world map first
> Adam
>
>
> On 06/01/2010 04:43 PM, Yi Wang wrote:
> > plot=gsn_csm_contour_map_ce(xwks,data,res) ; plot on world map first
>
> --
> __________________________________________________
> Adam Phillips
> asphilli@ucar.edu
> National Center for Atmospheric Research tel: (303) 497-1726
> Climate and Global Dynamics Division fax: (303) 497-1333
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 02 Jun 2010 10:20:12 -0600
> From: Adam Phillips <asphilli@ucar.edu>
> Subject: Re: Question about gsn_polyline_ndc function
> To: ncl-talk@ucar.edu
> Message-ID: <4C0684BC.7050205@ucar.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Sabeerali,
> Are plots(1:2) some type of overlay plot, or are you setting any
> DrawOrder resource to "PostDraw"? Otherwise this type of behavior would
> not be expected.
>
> Try setting gres@tfPolyDrawOrder = "PostDraw"
> This resource is discussed here:
> http://www.ncl.ucar.edu/Applications/draworder.shtml
> Best regards,
> Adam
>
> On 06/02/2010 05:37 AM, Sabeerali(sebi) wrote:
> > Hi Everyone,
> >
> > I have four contour plot panelled in four raw (/4,1/). I
> > want to draw a line from top plot to bottom plot..So I used
> > gsn_polyline_ndc(wks,(/0.45,0.55/),(/0.0,0.99/),gres)..It draws the
> > line from top plot to bottom plot..But the line is not appearing over
> > the contour plot..In between two contour plot line is appearing. Any
> > help would be appreciated.
> >
> > Thanks in advance
> >
> >
> > --
> > **********************************
> > Sabeerali
> > Climate and Global Modeling Division
> > Indian Institute of Tropical Meteorology
> > Pashan, Pune, 411 008
> > ****************************************
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> __________________________________________________
> Adam Phillips
> asphilli@ucar.edu
> National Center for Atmospheric Research tel: (303) 497-1726
> Climate and Global Dynamics Division fax: (303) 497-1333
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>
>
> ------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> End of ncl-talk Digest, Vol 79, Issue 3
> ***************************************
>

-- 
**********************************
Sabeerali
Climate and Global Modeling Division
Indian Institute of Tropical Meteorology
Pashan, Pune, 411 008
****************************************

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 2 21:52:16 2010

This archive was generated by hypermail 2.1.8 : Mon Jun 07 2010 - 16:48:44 MDT