[ncl-talk] plot a zoom map for regional curvilinear gridded data

Fearon, Dr. Matthew, Contractor, Code 7533 matthew.fearon.ctr at nrlmry.navy.mil
Wed Sep 12 11:00:11 MDT 2018


Thanks, Guido.
I just tried resetting the corner min/max for a subset and it appears to work correctly, although I’m still checking a few combinations.

I should I have mentioned in my original email that I am using PyNGL and not NCL which forces me to use sfY/X Array instead of assigning lat2d and lon2d as attributes. I probably should have sent my email to pyngl-talk, but I thought there might be enough overlap with the functionality/settings and more options for help.

Thank you for your help,
Matt


From: Guido Cioni [mailto:guidocioni at gmail.com]
Sent: Wednesday, September 12, 2018 9:18 AM
To: Fearon, Dr. Matthew, Contractor, Code 7533
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] plot a zoom map for regional curvilinear gridded data

Hello,
if you're using NCL to project the data onto lat-lon (mpres at tfDoNDCOverlay= False) you should be able to zoom-in into the data by defining the corners of the projection. if that does not work it means there is something wrong in the script or the way the variables are defined.
Furthermore, try to assign lon2d and lat2d as attributes to the variable that you're plotting and not to explicitly define them as sfXarray and sfYArray so that NCL knows how to plot your variable.



On 12. Sep 2018, at 08:30, Fearon, Dr. Matthew, Contractor, Code 7533 <matthew.fearon.ctr at nrlmry.navy.mil<mailto:matthew.fearon.ctr at nrlmry.navy.mil>> wrote:

Hi,

Was just curious if there’s a way to create a zoom map of regional gridded data. For example, I have a regional curvilinear model grid with 2d lat/longs that takes a stereographic projection. To map the full regional extent, I use the following set of resources. However, in order to plot a zoomed in area for this example, mp Min/Max Lat/LonF settings do not work and, I believe, sf Y/X End/Start SubsetV do not work either. Is the best approach to subset the data and the coordinates to new corners first using getind_latlon2d? And if I use this approach, does the new subset grid retain the original projection given that it will have new corners?

Thanks for the help,
Matt


    cnres at sfXArray                    = lon2d
    cnres at sfYArray                    = lat2d

    mpres at mpLimitMode               = "Corners"
    mpres at mpProjection                = "Stereographic"
    mpres at mpLeftCornerLatF        = lat[0,0]
    mpres at mpLeftCornerLonF       = lon[0,0]
    mpres at mpRightCornerLatF      = lat[ny-1,nx-1]
    mpres at mpRightCornerLonF     = lon[ny-1,nx-1]

    mpres at mpCenterLonF                = 11.
    mpres at tfDoNDCOverlay              = False
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


Guido Cioni
http://guidocioni.altervista.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180912/5fb5a096/attachment-0001.html>


More information about the ncl-talk mailing list