Page 1 of 1

Python interpolate U and V fields

PostPosted: Sat Mar 26, 2016 2:30 pm
by liam.till
Hi all, this is my first post but could do with some help.

I'm writing a Python script for a project and i'm having trouble interpolating the U and V fields to given pressure levels. My geopotential height seems to be working but when i interpolate U and V the direction appears to be completely smoothed out. Any ideas why this is, surely it should just interpolate the output as in speed and direction to another level. I'm using numpy.interp to do the interpolation, as this is what i've seen in other scripts.

I wouldn't have thought i would have to re calculate the direction after the interpolation?

This image show a plot of the U and V field at a level before interpolation;

This image shows the plot after interpolation of U and V:


Re: Python interpolate U and V fields

PostPosted: Fri Apr 08, 2016 7:13 pm
by liam.till

Wrote a weighted linear interpolation function instead of using numpy.

Fields now interpolate correctly