Commit c8e22fbe authored by CEVAER's avatar CEVAER
Browse files

Set max radius to 500km

parent 7a2e8df5
......@@ -53,13 +53,14 @@ def var_orientation(var, idx_azim, teta_shape):
def to_polar(ds, lon_center, lat_center):
data_shape = ds["wind_speed"].shape
max_radius = int(np.sqrt(data_shape[0] ** 2 + data_shape[1] ** 2) / 2)
#max_radius = int(np.sqrt(data_shape[0] ** 2 + data_shape[1] ** 2) / 2)
# Find indexes in data array of the lon/lat center
xloc, yloc = find_nearest_2d(ds.lon, ds.lat, lon_center, lat_center)
pix_dist = pixel_distance(ds, xloc, yloc)
#print(pix_dist)
max_radius = 500000 / pix_dist
# Coordinates array
theta = np.linspace(0, 360, num=data_shape[0])
rads = np.linspace(0, max_radius, num=data_shape[1])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment