Hello,
I am using NCL to produce surface-level WRF model output for a given lat/lon point. I am using NCL v. 5.2.0, and have installed NCL v. 5.2.0 on a Mac (OS X 10.5.4) and on a PC (Windows Vista 64-bit). I have noticed, however, while running NCL that it is not treating the surface terrain correctly. As an example, in producing surface point output for an ASOS station at Danville VA (KDAN), I have noticed that the terrain height produced from NCL is 341 meters, while the observed station elevation is around 170 meters. This consequently has negative consequences on the accuracy of the surface weather data I am getting from my WRF files. I have checked the WRF files themselves using IDV to ensure that the terrain is correct within the wrfout* files, and they are. I have run NCL, using the same file, on both the Mac and PC and have come up with the same result. I am using Lambert conformal map projection when producing my WRF files, but I don't believe that is a problem in this case. I have attached the NCL script file I am using to produce my point output, as well as a sample of the NCL output itself, below. What is causing this problem, and how can I fix it?
Thanks in advance for your time,
Elliot Tardif.
NCL script I'm using is given as follows:
begin
;DEFINE OPENING FILES
a = addfile("wrfout_sample.nc","r") ;defining the file to be added in
;-------------------------------
;DEFINE TIMES
res = True
res@returnInt = True
times = wrf_user_list_times(a)
ntimes = dimsizes(times)
;----------------------
;DEFINE LOCATION
loc = wrf_user_ll_to_ij(a, -79.336, 36.573,res)
locX = loc(0) - 1
locY = loc(1) - 1
print(locX)
print(locY)
;----------------------
;DEFINE ATMOSPHERIC VARIABLES
td2 = wrf_user_getvar(a,"td2",-1)
tc2 = wrf_user_getvar(a,"T2",-1) ; T2 in Kelvin
tc2 = tc2 - 273.15 ; T2 in C
u10 = wrf_user_getvar(a,"U10",-1) ; u at 10 m, mass point
u10 = u10 * 1.94386 ; convert to knots
v10 = wrf_user_getvar(a,"V10",-1) ; v at 10 m, mass point
v10 = v10 * 1.94386 ; convert to knots
psfc = wrf_user_getvar(a,"PSFC",-1)
psfc = psfc / 100
precip_exp = wrf_user_getvar(a,"RAINNC",-1)
precip_con = wrf_user_getvar(a,"RAINC", -1)
precip_tot = precip_exp + precip_con
hgt = wrf_user_getvar(a,"ter",-1)
;---------------------------
;DEFINE ARRAY AND PRINT THE DATA
dimtd2= dimsizes(td2)
gtd2 = dimtd2(0)
data = new(gtd2,"string")
n = -1
do nt=0, ntimes-1, 1
n = n + 1
data(n) = sprinti("%0.3i", (n))
data(n) = data(n) + sprintf("%7.3f", tc2(n,locX,locY))
data(n) = data(n) + sprintf("%7.3f", td2(n,locX,locY))
data(n) = data(n) + sprintf("%10.5f", u10(n,locX,locY))
data(n) = data(n) + sprintf("%10.5f", v10(n,locX,locY))
data(n) = data(n) + sprintf("%16.3f", psfc(n,locX,locY))
data(n) = data(n) + sprintf("%10.3f", precip_tot(n,locX,locY))
data(n) = data(n) + sprintf("%10.3f", hgt(n,locX,locY))
end do
asciiwrite("wrfout_KDAN.txt", data)
end
Here is a sample of the output from the above program:
000 2.711 2.726 -0.69524 -0.12440 981.227 0.000 341.977
001 3.665 2.643 -1.50709 0.84538 980.236 0.000 341.977
002 3.702 2.687 -1.55680 0.73297 979.061 0.000 341.977
003 3.741 2.780 -1.74506 0.74930 977.958 0.000 341.977
004 3.945 2.957 -1.36460 0.93940 977.420 0.000 341.977
005 4.216 3.225 -1.22440 0.97439 976.941 0.000 341.977
006 4.526 3.667 -1.05991 1.47378 976.562 0.015 341.977
007 5.458 4.591 -1.14547 2.24159 975.954 0.107 341.977
008 6.597 5.614 -1.50793 2.70870 975.397 0.573 341.977
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 5 15:24:01 2010
This archive was generated by hypermail 2.1.8 : Fri Jul 09 2010 - 16:06:22 MDT