-
Hello, I have been working with the interpolate_to_grid function, and I have created a 5 km surface temperature grid using Barnes interpolation from METAR observations. The problem I am facing is that it takes some time for the interpolation to run, so I was hoping to reduce runtime by using the boundary_coords argument. However, I have not found much documentation or examples on how to use it. When I tried it myself, the shape of the returned grid was (1,1). tgridx, tgridy, TF2 = interpolate_to_grid(x_masked, y_masked, TF, interp_type='barnes', gamma=0.5, kappa_star=5,m inimum_neighbors=3, search_radius=400000, hres=5000, boundary_coords={'west': 130, 'south': 15,'east': 60, 'north': 55}) My question is, how is the boundary_coords argument used in the interpolate_to_grid function? I'm trying to create a boundary around the United States. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, I figured it out. The boundary coordinates are from the x and y coordinates in the function, in my case, it's x_masked and y_masked. So my boundary is between np.min(x_masked) - np.max(x_masked) and np.min(y_masked) - np.max(y_masked). My x_masked and y_masked variables are grid points, but I was using longitude and latitude values. |
Beta Was this translation helpful? Give feedback.
Hey, I figured it out.
The boundary coordinates are from the x and y coordinates in the function, in my case, it's x_masked and y_masked.
So my boundary is between np.min(x_masked) - np.max(x_masked) and np.min(y_masked) - np.max(y_masked).
My x_masked and y_masked variables are grid points, but I was using longitude and latitude values.