oafuncs 0.0.98.23__py3-none-any.whl → 0.0.98.24__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oafuncs/_script/data_interp_geo.py +108 -171
- oafuncs/oa_data.py +14 -13
- {oafuncs-0.0.98.23.dist-info → oafuncs-0.0.98.24.dist-info}/METADATA +1 -1
- {oafuncs-0.0.98.23.dist-info → oafuncs-0.0.98.24.dist-info}/RECORD +7 -7
- {oafuncs-0.0.98.23.dist-info → oafuncs-0.0.98.24.dist-info}/WHEEL +0 -0
- {oafuncs-0.0.98.23.dist-info → oafuncs-0.0.98.24.dist-info}/licenses/LICENSE.txt +0 -0
- {oafuncs-0.0.98.23.dist-info → oafuncs-0.0.98.24.dist-info}/top_level.txt +0 -0
@@ -1,139 +1,107 @@
|
|
1
|
+
import importlib.util
|
1
2
|
from typing import List, Union
|
2
3
|
|
3
4
|
import numpy as np
|
4
|
-
import importlib.util
|
5
5
|
|
6
6
|
from oafuncs.oa_tool import PEx
|
7
7
|
|
8
8
|
# 检查pyinterp是否可用
|
9
9
|
pyinterp_available = importlib.util.find_spec("pyinterp") is not None
|
10
10
|
|
11
|
-
# 仅在pyinterp可用时导入相关模块
|
12
11
|
if pyinterp_available:
|
13
12
|
import pyinterp
|
14
|
-
|
13
|
+
import pyinterp.backends.xarray as pyxr
|
14
|
+
import xarray as xr
|
15
15
|
|
16
16
|
|
17
|
-
def
|
17
|
+
def _fill_nan_with_nearest(data: np.ndarray, source_lons: np.ndarray, source_lats: np.ndarray) -> np.ndarray:
|
18
18
|
"""
|
19
|
-
|
20
|
-
参数: data_slice, origin_points, target_points, interpolation_method, target_shape, source_xy_shape
|
21
|
-
使用pyinterp进行地理插值
|
19
|
+
使用最近邻方法填充NaN值,适合地理数据。
|
22
20
|
"""
|
23
|
-
|
24
|
-
|
25
|
-
raise ImportError("pyinterp package is required for geographic interpolation")
|
26
|
-
|
27
|
-
data_slice, origin_points, target_points, interpolation_method, target_shape, source_xy_shape = args
|
28
|
-
|
29
|
-
# 处理无效数据点
|
30
|
-
valid_mask = ~np.isnan(data_slice.ravel())
|
31
|
-
if np.count_nonzero(valid_mask) < 10:
|
32
|
-
return np.full(target_shape, np.nanmean(data_slice))
|
33
|
-
|
34
|
-
# 准备有效数据点
|
35
|
-
valid_data = data_slice.ravel()[valid_mask]
|
36
|
-
valid_points = origin_points[valid_mask]
|
37
|
-
|
38
|
-
# 根据插值方法选择合适的策略
|
39
|
-
if origin_points.shape[0] == source_xy_shape[0] * source_xy_shape[1]: # 规则网格
|
40
|
-
try:
|
41
|
-
# 尝试使用规则网格插值
|
42
|
-
y_size, x_size = source_xy_shape
|
43
|
-
lons = origin_points[:, 0].reshape(y_size, x_size)[0, :]
|
44
|
-
lats = origin_points[:, 1].reshape(y_size, x_size)[:, 0]
|
45
|
-
|
46
|
-
# 检查网格数据的有效性
|
47
|
-
grid_data = data_slice.reshape(source_xy_shape)
|
48
|
-
nan_ratio = np.isnan(grid_data).sum() / grid_data.size
|
49
|
-
if nan_ratio > 0.5: # 如果超过50%是NaN,跳过规则网格插值
|
50
|
-
raise ValueError("Too many NaN values in grid data")
|
51
|
-
|
52
|
-
# 创建pyinterp网格 - 设置经度循环
|
53
|
-
is_global = np.abs((lons[-1] - lons[0]) % 360 - 360) < 1e-6
|
54
|
-
grid = pyinterp.Grid2D(
|
55
|
-
x=pyinterp.Axis(lons, is_circle=is_global), # 根据数据判断是否为全球网格
|
56
|
-
y=pyinterp.Axis(lats),
|
57
|
-
array=grid_data,
|
58
|
-
increasing_axes=(-2, -1), # 确保坐标轴方向正确
|
59
|
-
)
|
21
|
+
if not np.isnan(data).any():
|
22
|
+
return data
|
60
23
|
|
61
|
-
|
62
|
-
|
63
|
-
|
24
|
+
# 创建掩码,区分有效值和NaN值
|
25
|
+
mask = ~np.isnan(data)
|
26
|
+
if not np.any(mask):
|
27
|
+
return data # 全是NaN,无法填充
|
64
28
|
|
65
|
-
|
66
|
-
|
29
|
+
# 使用pyinterp的RTree进行最近邻插值填充NaN
|
30
|
+
try:
|
31
|
+
if not pyinterp_available:
|
32
|
+
raise ImportError("pyinterp not available")
|
67
33
|
|
68
|
-
|
34
|
+
# 获取有效数据点的位置和值
|
35
|
+
valid_points = np.column_stack((source_lons[mask].ravel(), source_lats[mask].ravel()))
|
36
|
+
valid_values = data[mask].ravel()
|
69
37
|
|
70
|
-
|
71
|
-
|
72
|
-
|
38
|
+
# 创建RTree
|
39
|
+
tree = pyinterp.RTree()
|
40
|
+
tree.insert(valid_points.astype(np.float64), valid_values.astype(np.float64))
|
73
41
|
|
74
|
-
|
75
|
-
|
76
|
-
pass
|
42
|
+
# 获取所有点的坐标
|
43
|
+
all_points = np.column_stack((source_lons.ravel(), source_lats.ravel()))
|
77
44
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
# 根据插值方法和有效点数量选择合适的插值策略
|
84
|
-
coords = pyinterp.geodetic.Coordinates(target_points[:, 0], target_points[:, 1], pyinterp.geodetic.System.WGS84)
|
85
|
-
|
86
|
-
if interpolation_method in ["cubic", "quintic"] and len(valid_data) > 100:
|
87
|
-
# 对于点数充足的情况,高阶插值使用径向基函数
|
88
|
-
result = mesh.radial_basis_function(
|
89
|
-
coords,
|
90
|
-
function="thin_plate", # 薄板样条,适合地理数据
|
91
|
-
epsilon=0.1, # 平滑参数
|
92
|
-
norm="geodetic", # 使用地理距离
|
93
|
-
within=False, # 允许外推
|
94
|
-
).reshape(target_shape)
|
95
|
-
else:
|
96
|
-
# 使用IDW,动态调整k值
|
97
|
-
k_value = max(min(int(np.sqrt(len(valid_data))), 16), 4) # 自适应近邻点数
|
98
|
-
result, _ = mesh.inverse_distance_weighting(
|
99
|
-
coords,
|
100
|
-
k=k_value,
|
101
|
-
p=2.0, # 平方反比权重
|
102
|
-
within=False, # 允许外推
|
103
|
-
).reshape(target_shape)
|
104
|
-
|
105
|
-
# 检查插值结果,如果有NaN,尝试使用最近邻补充
|
106
|
-
if np.isnan(result).any():
|
107
|
-
nan_mask = np.isnan(result)
|
108
|
-
nan_coords = pyinterp.geodetic.Coordinates(target_points[nan_mask.ravel(), 0], target_points[nan_mask.ravel(), 1], pyinterp.geodetic.System.WGS84)
|
109
|
-
nn_values, _ = mesh.k_nearest(nan_coords, k=1)
|
110
|
-
result[nan_mask] = nn_values
|
45
|
+
# 最近邻插值
|
46
|
+
filled_values = tree.query(all_points[:, 0], all_points[:, 1], k=1)
|
47
|
+
|
48
|
+
return filled_values.reshape(data.shape)
|
111
49
|
|
112
50
|
except Exception:
|
113
|
-
#
|
114
|
-
|
115
|
-
# 创建新的RTree对象尝试避免之前可能的问题
|
116
|
-
simple_mesh = RTree(pyinterp.geodetic.Coordinates(valid_points[:, 0], valid_points[:, 1], pyinterp.geodetic.System.WGS84), valid_data)
|
51
|
+
# 备选方案:使用scipy的最近邻
|
52
|
+
from scipy.interpolate import NearestNDInterpolator
|
117
53
|
|
118
|
-
|
54
|
+
points = np.column_stack((source_lons[mask].ravel(), source_lats[mask].ravel()))
|
55
|
+
values = data[mask].ravel()
|
56
|
+
|
57
|
+
if len(values) > 0:
|
58
|
+
interp = NearestNDInterpolator(points, values)
|
59
|
+
return interp(source_lons.ravel(), source_lats.ravel()).reshape(data.shape)
|
60
|
+
else:
|
61
|
+
return data # 无有效值可用于填充
|
119
62
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
63
|
+
|
64
|
+
def _interp_single_worker(*args):
|
65
|
+
"""
|
66
|
+
单slice插值worker,只使用pyinterp的bicubic方法,失败直接报错。
|
67
|
+
参数: data_slice, source_lons, source_lats, target_lons, target_lats
|
68
|
+
"""
|
69
|
+
if not pyinterp_available:
|
70
|
+
raise ImportError("pyinterp package is required for geographic interpolation")
|
71
|
+
|
72
|
+
data_slice, source_lons, source_lats, target_lons, target_lats = args
|
73
|
+
|
74
|
+
# 预处理:填充NaN值以确保数据完整
|
75
|
+
if np.isnan(data_slice).any():
|
76
|
+
data_filled = _fill_nan_with_nearest(data_slice, source_lons, source_lats)
|
77
|
+
else:
|
78
|
+
data_filled = data_slice
|
79
|
+
|
80
|
+
# 创建xarray DataArray
|
81
|
+
da = xr.DataArray(
|
82
|
+
data_filled,
|
83
|
+
coords={"latitude": source_lats, "longitude": source_lons},
|
84
|
+
dims=("latitude", "longitude"),
|
85
|
+
)
|
86
|
+
|
87
|
+
# 创建Grid2D对象
|
88
|
+
grid = pyxr.Grid2D(da)
|
89
|
+
|
90
|
+
# 使用bicubic方法插值
|
91
|
+
result = grid.bicubic(coords={"longitude": target_lons.ravel(), "latitude": target_lats.ravel()}, bounds_error=False, num_threads=1).reshape(target_lons.shape)
|
124
92
|
|
125
93
|
return result
|
126
94
|
|
127
95
|
|
128
|
-
def interp_2d_func_geo(
|
96
|
+
def interp_2d_func_geo(
|
97
|
+
target_x_coordinates: Union[np.ndarray, List[float]],
|
98
|
+
target_y_coordinates: Union[np.ndarray, List[float]],
|
99
|
+
source_x_coordinates: Union[np.ndarray, List[float]],
|
100
|
+
source_y_coordinates: Union[np.ndarray, List[float]],
|
101
|
+
source_data: np.ndarray,
|
102
|
+
) -> np.ndarray:
|
129
103
|
"""
|
130
|
-
使用pyinterp
|
131
|
-
|
132
|
-
特点:
|
133
|
-
- 正确处理经度跨越日期线的情况
|
134
|
-
- 自动选择最佳插值策略
|
135
|
-
- 处理规则网格和非规则数据
|
136
|
-
- 支持多维数据并行处理
|
104
|
+
使用pyinterp进行地理插值,只使用bicubic方法。
|
137
105
|
|
138
106
|
Args:
|
139
107
|
target_x_coordinates: 目标点经度 (-180 to 180 或 0 to 360)
|
@@ -141,95 +109,64 @@ def interp_2d_func_geo(target_x_coordinates: Union[np.ndarray, List[float]], tar
|
|
141
109
|
source_x_coordinates: 源数据经度 (-180 to 180 或 0 to 360)
|
142
110
|
source_y_coordinates: 源数据纬度 (-90 to 90)
|
143
111
|
source_data: 多维数组,最后两个维度为空间维度
|
144
|
-
interpolation_method: 插值方法:
|
145
|
-
- 'nearest': 最近邻插值
|
146
|
-
- 'linear'/'bilinear': 双线性插值
|
147
|
-
- 'cubic': 三次样条插值
|
148
|
-
- 'quintic': 五次样条插值
|
149
112
|
|
150
113
|
Returns:
|
151
114
|
np.ndarray: 插值后的数据数组
|
152
|
-
|
153
|
-
Examples:
|
154
|
-
>>> # 全球数据插值示例
|
155
|
-
>>> target_lon = np.arange(-180, 181, 1)
|
156
|
-
>>> target_lat = np.arange(-90, 91, 1)
|
157
|
-
>>> source_lon = np.arange(-180, 181, 5)
|
158
|
-
>>> source_lat = np.arange(-90, 91, 5)
|
159
|
-
>>> source_data = np.cos(np.deg2rad(source_lat.reshape(-1, 1))) * np.cos(np.deg2rad(source_lon))
|
160
|
-
>>> result = interp_2d_func_geo(target_lon, target_lat, source_lon, source_lat, source_data)
|
161
115
|
"""
|
162
|
-
# 确保pyinterp可用
|
163
116
|
if not pyinterp_available:
|
164
117
|
raise ImportError("pyinterp package is required for geographic interpolation")
|
165
118
|
|
166
|
-
#
|
119
|
+
# 验证纬度范围
|
167
120
|
if np.nanmin(target_y_coordinates) < -90 or np.nanmax(target_y_coordinates) > 90:
|
168
|
-
raise ValueError("
|
121
|
+
raise ValueError("Target latitude must be in range [-90, 90].")
|
169
122
|
if np.nanmin(source_y_coordinates) < -90 or np.nanmax(source_y_coordinates) > 90:
|
170
|
-
raise ValueError("
|
123
|
+
raise ValueError("Source latitude must be in range [-90, 90].")
|
171
124
|
|
172
|
-
#
|
173
|
-
|
174
|
-
|
175
|
-
|
125
|
+
# 确保使用numpy数组
|
126
|
+
source_x_coordinates = np.array(source_x_coordinates)
|
127
|
+
source_y_coordinates = np.array(source_y_coordinates)
|
128
|
+
target_x_coordinates = np.array(target_x_coordinates)
|
129
|
+
target_y_coordinates = np.array(target_y_coordinates)
|
130
|
+
|
131
|
+
# 创建网格坐标(如果是一维的)
|
132
|
+
if source_x_coordinates.ndim == 1:
|
176
133
|
source_x_coordinates, source_y_coordinates = np.meshgrid(source_x_coordinates, source_y_coordinates)
|
134
|
+
if target_x_coordinates.ndim == 1:
|
135
|
+
target_x_coordinates, target_y_coordinates = np.meshgrid(target_x_coordinates, target_y_coordinates)
|
177
136
|
|
178
137
|
# 验证源数据形状
|
179
138
|
if source_x_coordinates.shape != source_data.shape[-2:] or source_y_coordinates.shape != source_data.shape[-2:]:
|
180
|
-
raise ValueError("
|
181
|
-
|
182
|
-
# 准备坐标点并统一经度表示系统
|
183
|
-
target_points = np.column_stack((np.array(target_x_coordinates).ravel(), np.array(target_y_coordinates).ravel()))
|
184
|
-
origin_points = np.column_stack((np.array(source_x_coordinates).ravel(), np.array(source_y_coordinates).ravel()))
|
185
|
-
source_xy_shape = source_x_coordinates.shape
|
186
|
-
|
187
|
-
# 统一经度表示系统
|
188
|
-
origin_points = origin_points.copy()
|
189
|
-
target_points = target_points.copy()
|
190
|
-
|
191
|
-
# 检测经度系统并统一
|
192
|
-
src_lon_range = np.nanmax(origin_points[:, 0]) - np.nanmin(origin_points[:, 0])
|
193
|
-
tgt_lon_range = np.nanmax(target_points[:, 0]) - np.nanmin(target_points[:, 0])
|
194
|
-
|
195
|
-
# 如果数据接近全球范围并且表示系统不同,则统一表示系统
|
196
|
-
if (src_lon_range > 300 or tgt_lon_range > 300) and ((np.nanmax(target_points[:, 0]) > 180 and np.nanmin(origin_points[:, 0]) < 0) or (np.nanmax(origin_points[:, 0]) > 180 and np.nanmin(target_points[:, 0]) < 0)):
|
197
|
-
# 优先使用[0,360]系统,因为它不会在日期线处断开
|
198
|
-
if np.nanmax(target_points[:, 0]) > 180 or np.nanmax(origin_points[:, 0]) > 180:
|
199
|
-
# 转换为[0,360]系统
|
200
|
-
if np.nanmin(origin_points[:, 0]) < 0:
|
201
|
-
origin_points[:, 0] = np.where(origin_points[:, 0] < 0, origin_points[:, 0] + 360, origin_points[:, 0])
|
202
|
-
if np.nanmin(target_points[:, 0]) < 0:
|
203
|
-
target_points[:, 0] = np.where(target_points[:, 0] < 0, target_points[:, 0] + 360, target_points[:, 0])
|
204
|
-
else:
|
205
|
-
# 转换为[-180,180]系统
|
206
|
-
if np.nanmax(origin_points[:, 0]) > 180:
|
207
|
-
origin_points[:, 0] = np.where(origin_points[:, 0] > 180, origin_points[:, 0] - 360, origin_points[:, 0])
|
208
|
-
if np.nanmax(target_points[:, 0]) > 180:
|
209
|
-
target_points[:, 0] = np.where(target_points[:, 0] > 180, target_points[:, 0] - 360, target_points[:, 0])
|
139
|
+
raise ValueError("Shape of source_data does not match shape of source_x_coordinates or source_y_coordinates.")
|
210
140
|
|
211
141
|
# 处理多维数据
|
212
|
-
data_dims =
|
142
|
+
data_dims = source_data.ndim
|
213
143
|
if data_dims < 2:
|
214
|
-
raise ValueError(f"
|
144
|
+
raise ValueError(f"Source data must have at least 2 dimensions, but got {data_dims}.")
|
215
145
|
elif data_dims > 4:
|
216
|
-
raise ValueError(f"Source data has {data_dims} dimensions, but this function currently supports
|
146
|
+
raise ValueError(f"Source data has {data_dims} dimensions, but this function currently supports up to 4.")
|
217
147
|
|
148
|
+
# 扩展到4D
|
218
149
|
num_dims_to_add = 4 - data_dims
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
t, z, y, x = new_src_data.shape
|
150
|
+
source_data = source_data.reshape((1,) * num_dims_to_add + source_data.shape)
|
151
|
+
t, z, y, x = source_data.shape
|
223
152
|
|
224
153
|
# 准备并行处理参数
|
225
154
|
params = []
|
226
|
-
target_shape = target_y_coordinates.shape
|
227
155
|
for t_index in range(t):
|
228
156
|
for z_index in range(z):
|
229
|
-
params.append(
|
157
|
+
params.append(
|
158
|
+
(
|
159
|
+
source_data[t_index, z_index],
|
160
|
+
source_x_coordinates[0, :], # 假设经度在每行都相同
|
161
|
+
source_y_coordinates[:, 0], # 假设纬度在每列都相同
|
162
|
+
target_x_coordinates,
|
163
|
+
target_y_coordinates,
|
164
|
+
)
|
165
|
+
)
|
230
166
|
|
231
|
-
#
|
232
|
-
with PEx() as
|
233
|
-
|
167
|
+
# 并行执行插值
|
168
|
+
with PEx() as executor:
|
169
|
+
results = executor.run(_interp_single_worker, params)
|
234
170
|
|
235
|
-
|
171
|
+
# 还原到原始维度
|
172
|
+
return np.squeeze(np.array(results).reshape((t, z) + target_x_coordinates.shape))
|
oafuncs/oa_data.py
CHANGED
@@ -13,7 +13,6 @@ SystemInfo: Windows 11
|
|
13
13
|
Python Version: 3.11
|
14
14
|
"""
|
15
15
|
|
16
|
-
|
17
16
|
from typing import Any, List, Union
|
18
17
|
|
19
18
|
import numpy as np
|
@@ -22,7 +21,6 @@ import xarray as xr
|
|
22
21
|
from rich import print
|
23
22
|
from scipy.interpolate import interp1d
|
24
23
|
|
25
|
-
|
26
24
|
__all__ = ["interp_along_dim", "interp_2d", "interp_2d_geo", "ensure_list", "mask_shapefile"]
|
27
25
|
|
28
26
|
|
@@ -152,7 +150,7 @@ def interp_2d(
|
|
152
150
|
>>> print(result.shape) # Expected output: (3, 3)
|
153
151
|
"""
|
154
152
|
from ._script.data_interp import interp_2d_func
|
155
|
-
|
153
|
+
|
156
154
|
return interp_2d_func(
|
157
155
|
target_x_coordinates=target_x_coordinates,
|
158
156
|
target_y_coordinates=target_y_coordinates,
|
@@ -162,7 +160,14 @@ def interp_2d(
|
|
162
160
|
interpolation_method=interpolation_method,
|
163
161
|
)
|
164
162
|
|
165
|
-
|
163
|
+
|
164
|
+
def interp_2d_geo(
|
165
|
+
target_x_coordinates: Union[np.ndarray, List[float]],
|
166
|
+
target_y_coordinates: Union[np.ndarray, List[float]],
|
167
|
+
source_x_coordinates: Union[np.ndarray, List[float]],
|
168
|
+
source_y_coordinates: Union[np.ndarray, List[float]],
|
169
|
+
source_data: np.ndarray,
|
170
|
+
) -> np.ndarray:
|
166
171
|
"""
|
167
172
|
使用pyinterp进行地理插值,适用于全球尺度的地理数据与区域数据。
|
168
173
|
|
@@ -178,11 +183,7 @@ def interp_2d_geo(target_x_coordinates: Union[np.ndarray, List[float]], target_y
|
|
178
183
|
source_x_coordinates: 源数据经度 (-180 to 180 或 0 to 360)
|
179
184
|
source_y_coordinates: 源数据纬度 (-90 to 90)
|
180
185
|
source_data: 多维数组,最后两个维度为空间维度
|
181
|
-
interpolation_method: 插值方法:
|
182
|
-
- 'nearest': 最近邻插值
|
183
|
-
- 'linear'/'bilinear': 双线性插值
|
184
|
-
- 'cubic': 三次样条插值
|
185
|
-
- 'quintic': 五次样条插值
|
186
|
+
interpolation_method: 插值方法: 只会使用 'bicubic' 方法。
|
186
187
|
|
187
188
|
Returns:
|
188
189
|
np.ndarray: 插值后的数据数组
|
@@ -198,19 +199,19 @@ def interp_2d_geo(target_x_coordinates: Union[np.ndarray, List[float]], target_y
|
|
198
199
|
"""
|
199
200
|
# 使用importlib检查pyinterp是否可用,避免直接import导致的警告
|
200
201
|
import importlib.util
|
202
|
+
|
201
203
|
pyinterp_available = importlib.util.find_spec("pyinterp") is not None
|
202
|
-
|
204
|
+
|
203
205
|
if pyinterp_available:
|
204
206
|
# 只在pyinterp可用时才导入相关模块
|
205
207
|
from ._script.data_interp_geo import interp_2d_func_geo
|
206
|
-
|
208
|
+
|
207
209
|
return interp_2d_func_geo(
|
208
210
|
target_x_coordinates=target_x_coordinates,
|
209
211
|
target_y_coordinates=target_y_coordinates,
|
210
212
|
source_x_coordinates=source_x_coordinates,
|
211
213
|
source_y_coordinates=source_y_coordinates,
|
212
214
|
source_data=source_data,
|
213
|
-
interpolation_method=interpolation_method,
|
214
215
|
)
|
215
216
|
else:
|
216
217
|
print("[yellow]警告: pyinterp模块未安装,无法使用球面坐标插值。尝试使用平面插值作为备选方案。[/yellow]")
|
@@ -222,11 +223,11 @@ def interp_2d_geo(target_x_coordinates: Union[np.ndarray, List[float]], target_y
|
|
222
223
|
source_x_coordinates=source_x_coordinates,
|
223
224
|
source_y_coordinates=source_y_coordinates,
|
224
225
|
source_data=source_data,
|
225
|
-
interpolation_method=interpolation_method,
|
226
226
|
)
|
227
227
|
except Exception as e:
|
228
228
|
raise ImportError(f"pyinterp不可用且备选插值方法也失败: {e}")
|
229
229
|
|
230
|
+
|
230
231
|
def mask_shapefile(
|
231
232
|
data_array: np.ndarray,
|
232
233
|
longitudes: np.ndarray,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
oafuncs/__init__.py,sha256=T_-VtnWWllV3Q91twT5Yt2sUapeA051QbPNnBxmg9nw,1456
|
2
2
|
oafuncs/oa_cmap.py,sha256=pUFAGzbIg0WLxObBP2t_--ZIg00Dxdojx0y7OjTeqEo,11551
|
3
|
-
oafuncs/oa_data.py,sha256=
|
3
|
+
oafuncs/oa_data.py,sha256=QiIDwAy0Gqvv-ulWFcMk0nND81GU3Cf_xgGJtJ7p2mc,11397
|
4
4
|
oafuncs/oa_date.py,sha256=WhM6cyD4G3IeghjLTHhAMtlvJbA7kwQG2sHnxdTgyso,6303
|
5
5
|
oafuncs/oa_draw.py,sha256=IaBGDx-EOxyMM2IuJ4zLZt6ruHHV5qFStPItmUOXoWk,17635
|
6
6
|
oafuncs/oa_file.py,sha256=j9gXJgPOJsliu4IOUc4bc-luW4yBvQyNCEmMyDVjUwQ,16404
|
@@ -12,7 +12,7 @@ oafuncs/_data/hycom.png,sha256=MadKs6Gyj5n9-TOu7L4atQfTXtF9dvN9w-tdU9IfygI,10945
|
|
12
12
|
oafuncs/_data/oafuncs.png,sha256=o3VD7wm-kwDea5E98JqxXl04_78cBX7VcdUt7uQXGiU,3679898
|
13
13
|
oafuncs/_script/cprogressbar.py,sha256=UIgGcLFs-6IgWlITuBLaQqrpt4OAK3Mst5RlCiNfZdQ,15772
|
14
14
|
oafuncs/_script/data_interp.py,sha256=EiZbt6n5BEaRKcng88UgX7TFPhKE6TLVZniS01awXjg,5146
|
15
|
-
oafuncs/_script/data_interp_geo.py,sha256=
|
15
|
+
oafuncs/_script/data_interp_geo.py,sha256=edddYkI2D0X8VIIrVUILz7cBXnosbmV8wZehp3w04Jw,6540
|
16
16
|
oafuncs/_script/email.py,sha256=lL4HGKrr524-g0xLlgs-4u7x4-u7DtgNoD9AL8XJKj4,3058
|
17
17
|
oafuncs/_script/netcdf_merge.py,sha256=tM9ePqLiEsE7eIsNM5XjEYeXwxjYOdNz5ejnEuI7xKw,6066
|
18
18
|
oafuncs/_script/netcdf_modify.py,sha256=sGRUYNhfGgf9JV70rnBzw3bzuTRSXzBTL_RMDnDPeLQ,4552
|
@@ -39,8 +39,8 @@ oafuncs/oa_sign/__init__.py,sha256=QKqTFrJDFK40C5uvk48GlRRbGFzO40rgkYwu6dYxatM,5
|
|
39
39
|
oafuncs/oa_sign/meteorological.py,sha256=8091SHo2L8kl4dCFmmSH5NGVHDku5i5lSiLEG5DLnOQ,6489
|
40
40
|
oafuncs/oa_sign/ocean.py,sha256=xrW-rWD7xBWsB5PuCyEwQ1Q_RDKq2KCLz-LOONHgldU,5932
|
41
41
|
oafuncs/oa_sign/scientific.py,sha256=a4JxOBgm9vzNZKpJ_GQIQf7cokkraV5nh23HGbmTYKw,5064
|
42
|
-
oafuncs-0.0.98.
|
43
|
-
oafuncs-0.0.98.
|
44
|
-
oafuncs-0.0.98.
|
45
|
-
oafuncs-0.0.98.
|
46
|
-
oafuncs-0.0.98.
|
42
|
+
oafuncs-0.0.98.24.dist-info/licenses/LICENSE.txt,sha256=rMtLpVg8sKiSlwClfR9w_Dd_5WubTQgoOzE2PDFxzs4,1074
|
43
|
+
oafuncs-0.0.98.24.dist-info/METADATA,sha256=ZeGzkxArxlWU9YOHhouWFTTNffZrZVY64OrqNxXKQTc,4273
|
44
|
+
oafuncs-0.0.98.24.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
45
|
+
oafuncs-0.0.98.24.dist-info/top_level.txt,sha256=bgC35QkXbN4EmPHEveg_xGIZ5i9NNPYWqtJqaKqTPsQ,8
|
46
|
+
oafuncs-0.0.98.24.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|