[ncl-talk] Trying to plot wrfout with Mercator projection, gives LCC anyway
Ryan Connelly
rconne01 at gmail.com
Tue Jan 17 14:33:49 MST 2017
Hi Mary,
Thanks for getting back to me. I suspected that was the problem, but in
trying to use gsn_csm_contour_map, I encounter this error:
fatal:Argument type mismatch on argument (1) of (gsn_csm_contour_map) can
not coerce
Argument (1) is contour, which is defined as
contour = gsn_csm_contour(wks,dbz_plane(:,:),opts)
Thanks,
Ryan
On Tue, Jan 17, 2017 at 4:20 PM, Mary Haley <haley at ucar.edu> wrote:
> 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
>>
>>
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/27ba2c4b/attachment.html
More information about the ncl-talk
mailing list