[ncl-talk] Subregion for a polar plot

David Brown dbrown at ucar.edu
Fri Oct 3 15:07:26 MDT 2014


Hi Ipshita,

The routine gsn_csm_contour_map_polar is a specialized routine that draws a
circular stereographic projection with the center of the plot at either the
north or the south pole. The only lat/lon limit resource that makes sense
in this context is mpMinLatF, which can limit the plot from its maximal
possible extent which I think is the equator.

If you want to limit the plot to a specific region you should use a
different routine, probably the more general gsn_csm_contour_map. And
instead of limiting using the lat and lon resources (which for
non-rectangular projections will probably include a larger area than you
want), you might want to try
using the "Corners" limit mode. It might not be what you really want, but
here is the same projection using the general map routine:

res at mpCenterLatF = 90
res at mpProjection = "stereographic"
plot = gsn_csm_contour_map(wks,we,res)


Add these resources to restrict the plot to a region:

  res at mpLimitMode = "corners"
  res at mpLeftCornerLatF = 40
  res at mpLeftCornerLonF = 10
  res at mpRightCornerLatF = 60
  res at mpRightCornerLonF = 30

You will probably need to play with these to get what you are really
looking for.
 -dave


On Fri, Oct 3, 2014 at 11:00 AM, Ipshita Majhi <ipmajhi at alaska.edu> wrote:

> Dear NCL,
>
> I want to extract a region from my polar plot and plot it. I read one
> example
>
> http://www.ncl.ucar.edu/Applications/Scripts/maponly_2.ncl
>
> I applied it to polar plot but it is not working. There is approach of
> polygon and other things for polar plot is it possible to have a section
> extracted using min and max latitude. I would be grateful is somebody could
> assist me.
>
>
> ;*******************************************
> ;This is to extract different regions of snow cover and the region
>
> ;10/02/2014
> ;Western Eurasia 10W-30E , All of Eurasia, 0-190 E, 20-90 N, Southern
> Eurasia 0-190 E, 20-50 N, Himalayas 60-105 E, 30-45 N
>
> ;*******************************************
> 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"
> ;*******************************************
>
> a =addfile("~/Documents/Snow_cover_IMS/nhsce_v01r01_19661004_20140602.nc
> ","r")
>
> sce=a->snow_cover_extent(:,:,:)
> lat=a->latitude
> lon=a->longitude
>
>
> sce at lat2d=lat
> sce at lon2d=lon
>
> ;Now trying to get the region of interests
> ;Western Europe(we)
>
> we=sce(40:60,10:30,:)
>
> ;All of Europe
>
> print(dimsizes(we))
>
> ;Plotting the region and creating a box there
>
> ;*;************************************************
>
>   wks = gsn_open_wks("ps","Snow_IMS_Polar_Color")               ; open a
> ps file
>
>   res                             = True
>
>   res at mpFillOn                    = False        ; turn off gray fill
>   res at mpOutlineBoundarySets       = "National"   ; turn on country
> boundaries
>   res at mpGeophysicalLineColor      = "Navy"       ; color of cont. outlines
>   res at mpGeophysicalLineThicknessF = 1.5          ; thickness of
> outlines
>   res at gsnPolar                    ="NH"
>   res at mpMaxLatF                   = 40
>   res at mpMinLatF                   = 60
>   res at mpMaxLonF                   = 30
>   res at mpMinLonF                   = 10
>
>
>   plot = gsn_csm_contour_map_polar(wks,we,res)
>
> ;********************************************************
>
> Best Regards
> Ipshita
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141003/34fec43a/attachment.html 


More information about the ncl-talk mailing list