Re: warning:ContourPlotDraw: data boundary is out of range

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 25 2014 - 10:18:07 MDT

When you set sfXArray and sfYArray (and same for vfX/YArray), you can’t set the trX/YMin/MaxF resources to values outside the range of your coordinates. This is because NCL can’t make any assumptions about how to extrapolate the size of your axes outside the range of your data. If you want your axes to go beyond the extent of your coordinate arrays, then you will need to create a new data array that has extra elements in the dimension that you want to extend, and then set those extra elements to missing. I know there’s an example of this, but I have to run out the door and can’t find it at the moment.

The “data boundary is out of range” I believe indicates that you are choosing contour levels that do not fit within the range of your data. Look at the min/max of the data you are trying to contour and make sure your contour levels are appropriate for this range.

—Mary

On Mar 24, 2014, at 7:32 AM, Verena Lili <verena.prick@gmail.com> wrote:

> Hallo NCL,
> Why does the "overlay" function seems not really working here. I always got this error,
>
> warning:VectorPlotSetValues: current transformation requires trXMinF to be within data coordinate range: resetting
> warning:IrTransSetValues: X minimum less than minimum value of coordinate points array, defaulting
> warning:ContourPlotSetValues: current transformation requires trXMinF to be within data coordinate range: resetting
> warning:IrTransSetValues: X minimum less than minimum value of coordinate points array, defaulting
> warning:ContourPlotDraw: data boundary is out of range
>
> ======================================================
> res = True
> res@tiMainString = " "
> res@tiYAxisString = "Height [hPa]"
> res@tiXAxisString = "Latitude [deg]"
>
> res@vfXArray = lats / 180 * PI * A
> res@tmXBMode = "explicit"
> res@tmXBValues = (/ 0.,30.,60. /) / 180. * PI * A
> res@tmXBLabels = (/ 0,30,60 /)
> res@trXMinF = 0/ 180. * PI * A
> res@trXMaxF = 88/ 180. * PI * A
> res@tmXBLabelFont = 21
> res@tmXBLabelFontHeightF = 0.02
> res@tmYLLabelFont = 21
> res@tmYLLabelFontHeightF = 0.02
> res@tiXAxisFontHeightF = 0.02
> res@tiYAxisFontHeightF =0.02
>
> res@vfYArray = -H * log(levs/PS)
> res@gsnYAxisIrregular2Linear = True
> res@trYReverse = False
> res@trYMaxF = -H * log(1e2/PS)
> res@tmYLMode = "explicit"
> res@tmYLValues = -H * log((/ 1e5, 1e4, 1e3, 1e2 /)/PS)
> res@tmYLLabels = (/ "10~S~3~N~", "10~S~2~N~", "10~S~1~N~", "10~S~0~N~"/)
> res@tmYLMinorValues = -H * log((/ 8e4,5e4,2e4,8e3,5e3,2e3,8e2,5e2,2e2,8e1,5e1,2e1 /)/PS)
>
>
> res@vcRefMagnitudeF = 10000000. ; vec magnitude
> res@vcRefLengthF = .025 ; size of ref vector
> res@vcLineArrowColor = "black" ; white vectors
> res@vcMinDistanceF = .001 ; thins arrows near pole
>
>
> ; res@vcGlyphStyle = "CurlyVector" ; turns on curley
> res@vcRefAnnoOn = True
> res@vpHeightF = 0.55
> res@vpWidthF = 0.44
> res@vcRefAnnoString1 = "* $VMG$"
> res@vcRefAnnoString2 = "m**3/s**2"
> res@vcRefAnnoString2On = True
> ; res@vcRefAnnoZone = 3
>
>
> ;================SHADING===============
>
> xres = True
> xres@cnFillOn = True
> xres@cnMonoFillColor = False
> xres@cnLinesOn = False
> xres@cnInfoLabelOn = False
> xres@cnLineLabelsOn = False
> xres@pmLabelBarDisplayMode = "Always"
> xres@gsnYAxisIrregular2Log = True
> xres@tiYAxisString = "Height [hPa]"
> xres@tiXAxisString = "Latitude [deg]"
> xres@tmXBLabelFont = 21
> xres@tmXBLabelFontHeightF = 0.02
> xres@tmYLLabelFont = 21
> xres@tmYLLabelFontHeightF = 0.02
> xres@tiXAxisFontHeightF = 0.02
> xres@tiYAxisFontHeightF =0.02
> xres@sfXArray = lats
> xres@sfYArray = levs
> xres@lbPerimOn = False
> xres@cnLevelSelectionMode = "ManualLevels"
> xres@cnMinLevelValF = -2
> xres@cnLevelSpacingF = .1
> xres@cnMaxLevelValF = 2
> xres@trYReverse = True
> ;xres@trYMinF = 1e0
> xres@trXMinF = 0
> xres@trXMaxF = 88
> xres@tmYLMode = "explicit"
> xres@tmYLValues = (/ 1e5, 1e4, 1e3, 1e2/)
> xres@tmYLLabels = (/ "10~S~3~N~", "10~S~2~N~", "10~S~1~N~", "10~S~0~N~"/)
> xres@tmYLMinorValues = (/ 8e4,5e4,2e4,8e3,5e3,2e3,8e2,5e2,2e2,8e1,5e1,2e1/)/PS
>
> xres@tmXBMode = "explicit"
> xres@tmXBValues = (/ 0.,30.,60./)
> xres@tmXBLabels = (/ 0,30.,60. /)
> xres@vpHeightF = 0.55
> xres@vpWidthF = 0.44
>
> res@gsnFrame = False
> xres@gsnFrame = False
> res@gsnDraw = False
> xres@gsnDraw = False
>
>
> vc = gsn_vector(wks2,fuy3,fuz3,res)
> over = gsn_contour(wks2,ep_div3,xres)
> overlay(vc,over)
> draw(vc)
>
>
>
>
> --
> Regards,
> Dr. Verena.
> School of Marine and Atmospheric Sciences
> Stony Brook University
> homepage: http://www.somas.stonybrook.edu/
> _______________________________________________
> 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 Mar 25 12:09:56 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT