Re: Draw regional figures using global data

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed, 25 Feb 2009 16:27:36 -0700

Hi Song Feng,

I think you just need to set mpCenterLonF to half way between your
minimum and maximum longitudes: 210 in this case.
Actually any value greater than the minimum and less than the maximum
will do.

Also if you want the map area to be limited to the region of
interest, then you should also set
mpLimitMode to "LatLon" and
the four resources mpMinLonF, mpMaxLonF, mpMinLatF, and mpMaxLatF.

Good luck.
  -dave

On Feb 25, 2009, at 3:32 PM, Song Feng wrote:

>
> Hi:
>
> I have a global dataset (see z(17,73,144)) and I'd like to draw
> figures only for the North Pacific and the North America. The
> figure I get covers the global with contour lines outside 0-80N and
> 120-300E were set as missing. The contours west of 180E are also
> separated from the contours east of 180E (see the attachment for
> example). Can anybody help me with this problem? The codes I used
> to draw the figure are listed below,
>
> wks = gsn_open_wks ("pdf", "test" ) ; define the name of the plot
> plot = new(3, graphic) ; create a plot array
> res1 = True
> res2 = True
> res3 = True
>
> res1_at_tiMainString = "El Nino years"
> res2_at_tiMainString = "La Nina years"
> res3_at_tiMainString = "Warm-Cold years"
>
> res1_at_gsnDraw = False ; don't draw
> res1_at_gsnFrame = False ; don't advance frame
> res1_at_gsnAddCyclic = False
> res1_at_gsnContourNegLineDashPattern = 14
> res1_at_gsnContourZeroLineThicknessF = 3
> res2_at_gsnDraw = False ; don't draw
> res2_at_gsnFrame = False ; don't advance frame
> res2_at_gsnAddCyclic = False
> res2_at_gsnContourNegLineDashPattern = 14
> res2_at_gsnContourZeroLineThicknessF = 3
> res3_at_gsnDraw = False ; don't draw
> res3_at_gsnFrame = False ; don't advance frame
> res3_at_gsnAddCyclic = False
> res3_at_gsnContourNegLineDashPattern = 14
> res3_at_gsnContourZeroLineThicknessF = 3
>
> plot(0) = gsn_csm_contour_map(wks,zw(2,{0:80},{120:300}), res1)
> plot(1) = gsn_csm_contour_map(wks,zc(2,{0:80},{120:300}), res2)
> plot(2) = gsn_csm_contour_map(wks,ztest(2,{0:80},{120:300}), res3)
> gsn_panel(wks,plot,(/3,1/),False) ; now draw as one plot
> <test.pdf>
> _______________________________________________
> 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 Wed Feb 25 2009 - 16:27:36 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 03 2009 - 09:53:57 MST