interpolating at 10m, 40m and 50m

From: sangeeta maharjan <sangeetamaharjan_at_nyahnyahspammersnyahnyah>
Date: Sun May 12 2013 - 06:05:08 MDT

Hi NCL users,

My namelist.input has evert=34. Few lines from my script ,

Z = wrf_user_getvar(f,"height", -1) ;m Model Height
Zter = wrf_user_getvar(f,"ter" , -1) ;m Terrain Height
Zcat = Z(:,0:nlvmax-1,:,:)

do kk = 0, nlvmax-1
Zcat(:,kk,:,:) = Zcat(:,kk,:,:) - Zter
end do
-------------------------------------------------------------------------------------
The output of print(Zcat(0,:,30,30))
(0) 28.29236
(1) 97.27979
(2) 191.2666
(3) 310.3904
(4) 459.679
(5) 650.2472
(6) 884.7971
(7) 1187.365
---------------------------------------------------------------------------------------
I wanted to interpolate my data at 10m, 40m and 50m respectively. My
sample script for interpolating at those points are
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
; Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
res@Footer = False

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
a=addfile("/simulation_data/Days4/wrfout_d03_2012-04-15_00:00:00.nc","r")
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file

; The specific height levels that we want the data interpolated to.
height_levels = (/ 10., 40.,50./) ; height levels to plot - in meter
nlevels = dimsizes(height_levels) ; number of height levels

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do it = 0,ntimes-1 ; TIME LOOP
print("Working on time: " + times(it) )
res@TimeLabel = times(it) ; Set Valid time to use on plots

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
tc = wrf_user_getvar(a,"tc",it) ; T in C
u = wrf_user_getvar(a,"ua",it) ; u averaged to mass points
v = wrf_user_getvar(a,"va",it) ; v averaged to mass points
p = wrf_user_getvar(a, "pressure",it) ; pressure is our vertical coordinate
z = wrf_user_getvar(a, "z",it) ; grid point height
rh = wrf_user_getvar(a,"rh",it) ; relative humidity

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
level =0 ; just one level for the georeferenced plot
height = height_levels(level)

p_plane = wrf_user_intrp3d( p,z,"h",height,0.,False)
tc_plane = wrf_user_intrp3d(tc,z,"h",height,0.,False)
rh_plane = wrf_user_intrp3d(rh,z,"h",height,0.,False)
u_plane = wrf_user_intrp3d( u,z,"h",height,0.,False)
v_plane = wrf_user_intrp3d( v,z,"h",height,0.,False)

end do ; END OF LOOP
print(tc_plane)
end
As I execute the script changing variable level to 0,1,2 seperately
butI found each tc_plane is assigned with _FillValue ( 9.96921e+36).
same with rest of the variables.

Thanks.
Sangeeta Maharjan.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun May 12 06:05:22 2013

This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:19:28 MDT