Re: limiting a polar stereographic plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 27 2012 - 09:05:08 MST

Hi Dave,

If you are just trying to limit the polar stereographic projection, you can set res@mpMaxLatF to some value less than 0, but greater than -90.

If you don't have any metadata information, then you likely will not be able to do a native map plot, since you won't have the necessary map parameters.

However, since you have the 2D lat/lon, you can use whatever map projection you want, including "CylindricalEqualArea", "Mercator", etc. You need to set:

    res@sfXArray = lon2d ; or whatever your longitude variable is called
    res@sfYArray = lat2d ; or whatever your latitude variable is called
 
You will also need:

   res@gsnAddCyclic = False ; Don't add a longitude cyclic point.

To zoom in on the map, depending on what type of projection you use, you can try:

  res@mpMinLatF = min(lat2d)
  res@mpMaxLatF = max(lat2d)
  res@mpMinLonF = min(lon2d)
  res@mpMaxLonF = max(lon2d)

or

   res@mpLimitMode = "Corners"
   res@mpLeftCornerLatF = lat2d(0,0)
   res@mpLeftCornerLonF = lon2d(0,0)
   res@mpRightCornerLatF = lat2d(nlat-2,nlon-2)
   res@mpRightCornerLonF = lon2d(nlat-2,nlon-2)

Finally, make sure you *don't* have tfDoNDCOverlay set (it defaults to False, and setting it to True means you want to do a native projection).

--Mary

On Nov 26, 2012, at 5:58 PM, David B. Reusch wrote:

> I am trying to create plots of a subset from a WRF grid and am unhappy with my results. The metadata variables normally used with the wrfxx plotting functions (i.e., that are created by WRF) are long gone due to a number of postprocessing steps so those options are probably out. I still have 2-d lat and lon and the data appear to plot correctly with a polar stereographic gsn_csm_map_polar call -- I just need to zoom in (i.e., limit) the plot to where I have data. The plot below shows the default (only?) result with this approach.
> <ccceahaa.png>
> This is not entirely a new situation/problem (i.e., I've had success in the past with a masked LambertConformal) but my old solutions don't seem to be working and I need some advice. The plot below is based on prior techniques and has a number of drawbacks: (1) too much white space, (2) possible spatial distortion?, (3) I'd like it flipped top-to-bottom, i.e. S Pole at top.
> <dbajbghb.png>
> In a "perfect" world, I'd be happy with something more like what ncview can produce (this is orography, the other two are temperature-related), i.e., a rectangular, non-distorted, white-space free plot (below). My efforts to do things as a native projection failed spectacularly, though it seemed reasonable to think that was the approach to take to "look like ncview".
> <cdeccfbh.png>
>
> Script and data are theoretically available but the former is not pretty (and it's very long since it's doing lots of other things).
>
> For completeness, this is a Mac (10.6) and the latest NCL.
>
> Thanks,
> Dave
> --
> Associate Research Professor of Climatology
> Dept of Earth and Environmental Science
> MSEC 304; 801 Leroy Place
> New Mexico Tech
> Socorro, NM 87801
> _______________________________________________
> 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 Nov 27 09:05:18 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST