# Re: WRF data along a sonde track in WRF

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 27 2013 - 08:56:34 MDT

Hi Celeste,

This question is more appropriate for wrfhelp@ucar.edu, whom I've CC'ed here.
working.

--Mary

On Aug 26, 2013, at 6:38 PM, Celeste Mulena wrote:

> Hi!
>
> Is anybody able to give me any suggestions and help in how I might interpolate WRF data along a sonde track in WRF?
> The wrf_interp1d (lineal interpolation) work bad... skewts plot show other values.
>
> time = 0
>
> ; Temperature
> t = a->T(time,:,:,:) ; perturbation potential temperature (theta-300)
> theta = t + 300. ; potential temperature
> p = a->P(time,:,:,:)
> pb = a->PB(time,:,:,:)
> pf = p + pb ; full pressure
> tk = wrf_tk (pf, theta) ; temperature in Kelvin
>
> ; Height in the model
> ph = a->PH(time,:,:,:) ; perturbation geopotential
> phb = a->PHB(time,:,:,:) ; base-state geopotential
> tmp = (ph+phb)/9.81 ; On full (w) levels
> dimv = dimsizes(tmp)
> z = 0.5*(tmp(0:dimv(0)-2,:,:)+tmp(1:dimv(0)-1,:,:)) ; On half (mass) levels
> z@description = "height"
> z@units = "m"
>
> lat = a->XLAT(time,:,:) ; latitude
> lon = a->XLONG(time,:,:) ; longitude
>
>
> z_raob@_FillValue = -999.99 ; missing value
> print(z_raob)
> ; Station information (OUN - Norman, OK)
> olat = -33.65
> olon = -71.61
>
> ; Find the closest point to the radiosonde site in WRF grids
> obsij = wrf_latlon_to_ij(lat,lon,olat,olon)
> obsi = obsij(0)
> obsj = obsij(1)
>
> tin = tk(:,obsi,obsj)-273
> zin = z(:,obsi,obsj)
>
> ; Interpolation
> t_wrf = wrf_interp_1d (tin,zin,z_raob)
> t_wrf@_FillValue = -999.99
> print(t_wrf)
>
> Thanks
>
>
> celeste
>
>
>
> _______________________________________________
> 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 Tue Aug 27 08:56:42 2013

This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT