Hi Gökhan,
wrf_contour simply draws the contours, with no map projection. wrf_map_overlays is what takes the contours and overlays them on a map.
If you really are only interested in wrf_contour and want to specify the data coordinates, then you need to read XLAT and XLONG off the file (I'm assuming you are plotting lat/lon data), and then set the special sfXArray and sfYArray resources.
Here's a working script that you can try, using the HGT variable on a wrf output file.
Try it both with and without the sfX/YArray settings, to see what happens to the plot. The "trGridType" setting is necessary in order to get tickmarks. If you were putting this over a map (via wrf_map_overlays), then you wouldn't need trGridType:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
a = addfile("wrfout.nc","r")
hgt = wrf_user_getvar(a,"HGT",0)
wks = gsn_open_wks("x11","mapgrid")
res = True
res@sfXArray = wrf_user_getvar(a,"XLONG",0)
res@sfYArray = wrf_user_getvar(a,"XLAT",0)
res@trGridType = "TriangularMesh"
plot = wrf_contour(a,wks,hgt,res)
draw(plot)
frame(wks)
end
On Feb 27, 2014, at 5:43 AM, Gökhan Sever <gokhansever@gmail.com> wrote:
> Hello,
>
> Is there a way to specify X,Y coordinates of data surface within wrf_contour? [https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_contour.shtml]
>
> Similar to how is done in matplotlib's contour function [http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.contour]
>
> Thanks.
>
>
> --
> Gökhan
> _______________________________________________
> 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 Thu Feb 27 10:04:34 2014
This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST