[ncl-talk] Trying to plot wrfout with Mercator projection, gives LCC anyway

Mary Haley haley at ucar.edu
Tue Jan 17 14:20:10 MST 2017


Hi Ryan,

The WRF plotting routines want to plot data in the native projection on the
file, and won't let you set a different map projection. This is actually
why the file handle ("a" in your case) is the first argument to
wrf_map_overlays, because it queries the file for the map projection
information and sets it.

It looks like your WRF data may be on an LCC projection, and so that's what
it's trying to use.

If you really want to set your own map projection, then I suggest you use
gsn_csm_contour_map.  To do this, you will need to read in XLAT and XLONG
off the file, and attach them as attributes called "lat2d" and "lon2d".

See example #10 at:

http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml#ex10

The first frame shows how to plot data using the native projection on the
WRF output file. The second frame, which is the one you want, shows how to
read XLAT/XLONG off the file.  You want to follow this example, and then
set your map resources as you indicated.

A more simple example is the first one at:

http://www.ncl.ucar.edu/Applications/wrfgsn.shtml

See the first frame of this example (not the second one, which uses
wrf_xxxx to plot).

It plots the data on a Cylindrical Equidistant map, but you can change this
to mercator.

--Mary


On Tue, Jan 17, 2017 at 12:29 PM, Ryan Connelly <rconne01 at gmail.com> wrote:

> I'm following this page as a guide: http://www.ncl.ucar.
> edu/Applications/wrfmerc.shtml
>
> I've added the following lines to my script:
>
> ; Plotting options for limited area Mercator projection plot consistent
> across domains
>
>   mpres at tfDoNDCOverlay        = True        ; set True for native
> (direct) mapping
>
>   mpres at mpProjection      = "Mercator"
>   mpres at mpLimitMode           = "Corners"
>   mpres at mpRightCornerLatF = 41.22405
>   mpres at mpLeftCornerLonF = -72.25338
>   mpres at mpLeftCornerLatF = 36.38864
>   mpres at mpRightCornerLonF = -78.62663
>
> And I call the plot like this:
>  plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
>
> I get the correct lat,lon corners, but on an LCC plot, not a Mercator.
> Please advise.
>
> 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/20170117/2d88dce7/attachment.html 


More information about the ncl-talk mailing list