[gradsusr] how to interpolate vertical height values...
Jeff Duda
jeffduda319 at gmail.com
Thu Jan 24 11:33:58 EST 2013
The quickest way would be to use linear interpolation. To interpolate to
100 m, you would want to linearly interpolate between your 85 m and 420 m
surface. Setup a first degree polynomial y = Ax + b, where A and b are the
slope and y-intercept.
Slope = [var(z=420 m surface) - var(z=85 m surface)] / (420 m - 85 m)
Choose a point on the line, say x = 420 m surface, where y = var(z=420 m
surface). So b = y-Ax = var(z=420 m surface) - Slope*420 m. That gives
you the line equation. Then to plot data at 100 m, just display the
equation with the value of 100 m substituted for x.
Let's say you want to interpolate temperature, which is marked as tmpprs in
your data set. Assuming the height levels you listed are the only ones
available in your data, the commands would be
'define slope = (tmpprs(z=2)-tmpprs(z=1))/(420-85)'
'define intercept = tmpprs(z=2)-slope*420'
'd slope*100 + intercept'
Or you could define all of that in one line. It's your choice.
Jeff Duda
On Thu, Jan 24, 2013 at 2:50 AM, Kishore Babu <kishoreragi at gmail.com> wrote:
> Dear users,
>
> I have variables having height levels of 85,420,850,1670,4300,8000m.
>
> I want to interpolate to the levels of 100,500,1000,2000,5000,8000m.
>
> Could you please suggest some way to interpolate the variables in GrADS or
> other software?
>
> Thank you in advance,
>
> Regards,
>
> Kishore
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130124/274fb734/attachment-0003.html
More information about the gradsusr
mailing list