[ncl-talk] Trying to zoom in on Texas from WRF data, but am having issues with data scaling to map projection (Andrew Schwartz)

Mary Haley haley at ucar.edu
Tue Mar 14 10:16:18 MDT 2017


Hi Ryan,

I'm a bit surprised this works, because if you are plotting data in the
native projection using wrf_xxxx routines, you still need to subset
dbz_plane so that it draws the correct subset of dbz_plane over the
subsetted map domain.

The WRF folks have a "zoom" example of their own where they do this.
Please see:

http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/SPECIAL/wrf_Zoom.htm

If you click on "wrf_Zoom.ncl", you will see this code:

    dims = dimsizes(ter)
    ; As an example, we are looking for the lower right 1/4 of the domain
    x_start = dims(1)/2
    x_end   = dims(1)-1
    y_start = 0
    y_end   = dims(0)/2

    mpres1 at ZoomIn = True
    mpres1 at Xstart = x_start
    mpres1 at Ystart = y_start
    mpres1 at Xend = x_end
    mpres1 at Yend = y_end

    tc_zoom  = tc(:,y_start:y_end,x_start:x_end)
    tc_zoom at description = tc at description + " - Lower right of domain"
    ter_zoom = ter(y_start:y_end,x_start:x_end)
    ter_zoom at description = ter at description + " - Lower right of domain"

This code is simply zooming in on the lower right quadrant of the WRF
domain, but it uses the same ZoomIn and X/Y/Start/End resources to set up
the correct parameters for plotting.

--Mary




On Mon, Mar 13, 2017 at 10:10 PM, Ryan Connelly <rconne01 at gmail.com> wrote:

> Hi Andrew,
>
> I do the same thing using "Corners" mode and the corresponding
> RightCornerLatF, etc., as you do.  However, I create the contour variable
> using wrf_contour, and then plot that contour variable using
> wrf_map_overlays, with the first res argument (fourth overall) being a plot
> res for things like annotated polylines and such, which would be empty but
> =True, and the second res argument (fifth overall) being the map res that
> is used to define the corners.
>
> Something like:
>
>
> contour = wrf_contour(a,wks,dbz_plane(:,:),opts)
> ...
> plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
>
>
> This instead of gsn_csm_contour.  I can't claim it's a beter way of doing
> it, or that it addresses the specific problem, but hopefully this
> alternative method will make it work!
>
> Ryan
>
> --
> Ryan Connelly
> M.S. Student in Atmospheric Sciences, Stony Brook University
> B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso
> University
> rconne01 at gmail.com
> ryan.connelly at stonybrook.edu
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20170314/61d88d93/attachment.html 


More information about the ncl-talk mailing list