Re: WRF data along a sonde track in WRF

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 28 2013 - 12:15:20 MDT

No idea why you feel "spline interpolation" is better
than (say) linear or log-linear interpolation.

[1]
http://www.ncl.ucar.edu/Document/Functions/Built-in/int2p_n.shtml
   Pressure Known => pin
   T Known => xin
   Pressure Mandatory => pout
   linlog = 1 or 0
     pdim = 0

[2] Spline:
http://www.ncl.ucar.edu/Document/Functions/Built-in/ftcurv.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/csa1.shtml

On 8/28/13 12:05 PM, Celeste Mulena wrote:
> Sorry, add question
>
> Dear -wrfhelp- and ncl-users
>> About spline interpolation WRF vertical profiles.. I have the following
>> data. See image.
>>
>> I need to apply a spline interpolation-extrapolation to
>> calculate Temperature (air or dew-point )? suggestion.?.. In ncl, I couln't
>> do it..
>> Thanks
>> I really appreciate your help.
>>
>> Celeste
>>
>>
>> [image: Imágenes integradas 1]
>>
>>
>>
>> 2013/8/28 WRF Help <wrfhelp@ucar.edu>
>>
>>> Hi Celeste.
>>>
>>> We would be glad do help. What exactly is going wrong with the code? Can
>>> you send an example?
>>>
>>> -wrfhelp-
>>>
>>>
>>> On Tue, 27 Aug 2013 08:56:34 -0600
>>> Mary Haley <haley@ucar.edu> wrote:
>>>
>>>> Hi Celeste,
>>>>
>>>> This question is more appropriate for wrfhelp@ucar.edu, whom I've CC'ed
>>>> here.
>>>> You may need to give them more information about how "wrf_interp1d" is
>>>> not 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.
>>>>>
>>>>> 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<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> *Celeste Mulena*
>> *Bioing. Grupo de Estudios Ambientales y Atmosféricos*
>> *-CONICET-*
>>
>> celeste.mulena@gmail.com
>>
>
>
>
>
>
> _______________________________________________
> 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 Aug 28 12:15:20 2013

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