WRF data along a sonde track in WRF

From: Celeste Mulena <celeste.mulena_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 26 2013 - 18:38:41 MDT

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.

a = addfile("wrfout1.nc","r")
    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

  ; Radiosonde observation
    radiosonde = asciiread("raob_soundings7876.txt",(/15,7/),"float")
    z_raob = radiosonde(:,2) ; height in radiosonde

    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
Received on Mon Aug 26 18:38:51 2013

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