Python interpolate U and V fields

Any other graphics packages not listed above.

Python interpolate U and V fields

Postby liam.till » Sat Mar 26, 2016 2:30 pm

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;
Image

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

Thanks
Liam
liam.till
 
Posts: 4
Joined: Sat Mar 26, 2016 2:21 pm

Re: Python interpolate U and V fields

Postby liam.till » Fri Apr 08, 2016 7:13 pm

SOLVED

Wrote a weighted linear interpolation function instead of using numpy.

Fields now interpolate correctly
liam.till
 
Posts: 4
Joined: Sat Mar 26, 2016 2:21 pm

Re: Python interpolate U and V fields

Postby winash12 » Sun Apr 17, 2016 12:27 am

bilinear , cubic interpolation as well.
winash12
 
Posts: 44
Joined: Thu May 29, 2014 2:56 am


Return to Others

Who is online

Users browsing this forum: No registered users and 0 guests