Re: winds from WRF not matching RAOB

From: steve kirby <thin_runner_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 21 2011 - 09:34:22 MDT

Hi Andrea,   Thanks - that's a good idea as far as verifying that you have the right coordinates.   But when I put it in my code as:    print("VERIFY LAT,LON VALUES")  print(XLAT(0,locY,locX)+ " " + XLONG(0,locY,locX))    I get:   fatal:Undefined identifier: (XLAT) is undefined, can't continue   Is my syntax wrong?  Do I need to load something else?   --Steve     From: "Hahmann, Andrea N." <ahah_at_risoe.dtu.dk> To: steve kirby <thin_runner_at_yahoo.com> Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu> Sent: Wednesday, September 21, 2011 12:57 AM Subject: Re: winds from WRF not matching RAOB Dear Steve To make sure I have the right grid point I always print out the latitude and longitude of the (i,j) ncl calculates.  Something like: print(XLAT(0,locY,locX)+"  "+XLONG(0,locY,locX)) In your notation and check that these values match my station coordinates. Andrea ---- Andrea N. Hahmann Senior Scientist Wind Energy Division Risų DTU Technical University of Denmark Risų National Laboratory for Sustainable Energy Frederikborgvej 399, P.O. Box 49 4000 Roskilde, Denmark Direct +45 4677 5471 Mobil: +45 2133 0550 ahah_at_risoe.dtu.dk http://www.risoe.dtu.dk From: steve kirby <thin_runner_at_yahoo.com<mailto:thin_runner_at_yahoo.com>> Reply-To: steve kirby <thin_runner_at_yahoo.com<mailto:thin_runner_at_yahoo.com>> Date: Tue, 20 Sep 2011 23:59:45 +0200 To: "ncl-talk_at_ucar.edu<mailto:ncl-talk_at_ucar.edu>" <ncl-talk_at_ucar.edu<mailto:ncl-talk_at_ucar.edu>> Subject: winds from WRF not matching RAOB Sorry  - forgot to note, in the attached figure, WRF winds are in orange; RAOB winds are in black --Steve ----- Forwarded Message ----- From: steve kirby <thin_runner_at_yahoo.com<mailto:thin_runner_at_yahoo.com>> To: "ncl-talk_at_ucar.edu<mailto:ncl-talk_at_ucar.edu>" <ncl-talk_at_ucar.edu<mailto:ncl-talk_at_ucar.edu>> Sent: Tuesday, September 20, 2011 3:54 PM Subject: [ncl-talk] winds from WRF not matching RAOB Hi, I'm doing some plots of RAOB's vs WRF and the WRF-extracted winds aren't matching the RAOB.  Here's the WRF portion -- ============================================================================================= load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ... a=addfile("./wrfout_d02_2010-07-16_20_00_00.nc","r"); ;get the variables wrftc=wrf_user_getvar(a,"tc",0) wrftd=wrf_user_getvar(a,"td",0) wrfp=wrf_user_getvar(a,"pressure",0) wrfz=wrf_user_getvar(a,"z",0) uvm=wrf_user_getvar(a,"uvmet",0) ;extract u and v from uvm array and convert to knots u=uvm(0,:,:,:)*1.94386 v=uvm(1,:,:,:)*1.94386 ;;;; ; get ij point in model domain for location of interest ; loc(1) is touth-north (y) and loc(0) is west-east (x) ; ensure this point is in the domain, as we are not checking ; we are interested in NCL array pointers, so subtract 1   loc=wrf_user_ll_to_ij(a,-106.93,32.28,True) ; it should read (a, lon,lat,True) is that right?   locX=loc(0)-1 locY=loc(1)-1 dataOpts_at_colTemperature<mailto:dataOpts_at_colTemperature> = "red" dataOpts_at_colDewPt<mailto:dataOpts_at_colDewPt> = "magenta" ;new location for winds (default is 45) dataOpts_at_xpWind<mailto:dataOpts_at_xpWind> = 40. dataOpts_at_colWindP<mailto:dataOpts_at_colWindP> = "orange" skewT_data = skewT_PlotData (wks,skewt_bkgd,wrfp(:,locY,locX),\                                             wrftc(:,locY,locX),\                                             wrftd(:,locY,locX),\                                             wrfz(:,locY,locX),\                                             u(:,locY,locX),\                                             v(:,locY,locX),\                                             dataOpts) draw(skewT_data) ===================================================================================================== QUESTION - Do I have it right, that in the wrf_user_ll_to_ij( ) call that I use longitude, latitude (in that order) to locate the point of interest? I have done a couple of other plots of WRF winds vs. RAOB and the winds are not matching up with those either, so I was wondering if I had something wrong in code. Thanks, Steve _______________________________________________ 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 Wed Sep 21 09:34:31 2011

This archive was generated by hypermail 2.1.8 : Mon Oct 10 2011 - 11:43:35 MDT