shancx 1.9.33.109__py3-none-any.whl → 1.9.33.218__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.
- shancx/{Dsalgor → Algo}/__init__.py +37 -1
- shancx/Calmetrics/__init__.py +78 -9
- shancx/Calmetrics/calmetrics.py +14 -0
- shancx/Calmetrics/rmseR2score.py +14 -3
- shancx/{Command.py → Cmd.py} +20 -15
- shancx/Config_.py +26 -0
- shancx/Df/__init__.py +11 -0
- shancx/Df/tool.py +0 -1
- shancx/NN/__init__.py +200 -11
- shancx/{path.py → Path1.py} +2 -3
- shancx/Plot/__init__.py +129 -403
- shancx/Plot/draw_day_CR_PNG.py +4 -21
- shancx/Plot/exam.py +116 -0
- shancx/Plot/plotGlobal.py +325 -0
- shancx/Plot/radarNmc.py +1 -48
- shancx/Plot/single_china_map.py +1 -1
- shancx/Point.py +46 -0
- shancx/QC.py +223 -0
- shancx/Read.py +17 -10
- shancx/Resize.py +79 -0
- shancx/SN/__init__.py +8 -1
- shancx/Time/timeCycle.py +97 -23
- shancx/Train/makelist.py +161 -155
- shancx/__init__.py +79 -232
- shancx/bak.py +78 -53
- shancx/geosProj.py +2 -2
- shancx/wait.py +35 -1
- {shancx-1.9.33.109.dist-info → shancx-1.9.33.218.dist-info}/METADATA +12 -4
- shancx-1.9.33.218.dist-info/RECORD +91 -0
- {shancx-1.9.33.109.dist-info → shancx-1.9.33.218.dist-info}/WHEEL +1 -1
- shancx/Plot/Mip.py +0 -42
- shancx/Plot/border.py +0 -44
- shancx/Plot/draw_day_CR_PNGUS.py +0 -206
- shancx/Plot/draw_day_CR_SVG.py +0 -275
- shancx/Plot/draw_day_pre_PNGUS.py +0 -205
- shancx/Plot/radar_nmc_china_map_compare1.py +0 -50
- shancx/makenetCDFN.py +0 -42
- shancx-1.9.33.109.dist-info/RECORD +0 -91
- /shancx/{3DJU → 3D}/__init__.py +0 -0
- /shancx/{Dsalgor → Algo}/Class.py +0 -0
- /shancx/{Dsalgor → Algo}/CudaPrefetcher1.py +0 -0
- /shancx/{Dsalgor → Algo}/Fake_image.py +0 -0
- /shancx/{Dsalgor → Algo}/Hsml.py +0 -0
- /shancx/{Dsalgor → Algo}/L2Loss.py +0 -0
- /shancx/{Dsalgor → Algo}/MetricTracker.py +0 -0
- /shancx/{Dsalgor → Algo}/Normalize.py +0 -0
- /shancx/{Dsalgor → Algo}/OptimizerWScheduler.py +0 -0
- /shancx/{Dsalgor → Algo}/Rmageresize.py +0 -0
- /shancx/{Dsalgor → Algo}/Savemodel.py +0 -0
- /shancx/{Dsalgor → Algo}/SmoothL1_losses.py +0 -0
- /shancx/{Dsalgor → Algo}/Tqdm.py +0 -0
- /shancx/{Dsalgor → Algo}/checknan.py +0 -0
- /shancx/{Dsalgor → Algo}/dsalgor.py +0 -0
- /shancx/{Dsalgor → Algo}/iouJU.py +0 -0
- /shancx/{Dsalgor → Algo}/mask.py +0 -0
- /shancx/{Dsalgor → Algo}/psnr.py +0 -0
- /shancx/{Dsalgor → Algo}/ssim.py +0 -0
- /shancx/{Dsalgor → Algo}/structural_similarity.py +0 -0
- /shancx/{Dsalgor → Algo}/tool.py +0 -0
- /shancx/Calmetrics/{matrixLib.py → calmetricsmatrixLib.py} +0 -0
- /shancx/{Diffmodel → Diffm}/Psamples.py +0 -0
- /shancx/{Diffmodel → Diffm}/__init__.py +0 -0
- /shancx/{Diffmodel → Diffm}/test.py +0 -0
- /shancx/{Board → tensBoard}/__init__.py +0 -0
- {shancx-1.9.33.109.dist-info → shancx-1.9.33.218.dist-info}/top_level.txt +0 -0
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import matplotlib.pyplot as plt
|
|
2
|
-
import datetime
|
|
3
|
-
from hjnwtx.colormap import cmp_hjnwtx
|
|
4
|
-
import time
|
|
5
|
-
import os
|
|
6
|
-
import time
|
|
7
|
-
import shutil
|
|
8
|
-
|
|
9
|
-
from dateutil.relativedelta import relativedelta
|
|
10
|
-
import glob
|
|
11
|
-
from config import logger
|
|
12
|
-
import argparse
|
|
13
|
-
import pandas as pd
|
|
14
|
-
import re
|
|
15
|
-
import netCDF4 as nc
|
|
16
|
-
from multiprocessing import Pool
|
|
17
|
-
from itertools import product
|
|
18
|
-
import numpy as np
|
|
19
|
-
import copy
|
|
20
|
-
import traceback
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
from multiprocessing import Process, Queue
|
|
24
|
-
|
|
25
|
-
import io
|
|
26
|
-
import cartopy.crs as ccrs
|
|
27
|
-
import cartopy.feature as cfeature
|
|
28
|
-
import cartopy.io.shapereader as shpreader
|
|
29
|
-
from hjnwtx.mkNCHJN import mkDir
|
|
30
|
-
|
|
31
|
-
shape_ = (1, 5701, 8501)
|
|
32
|
-
def add_china_map(ax):
|
|
33
|
-
# 在地图上添加地形特征
|
|
34
|
-
ax.add_feature(cfeature.COASTLINE, edgecolor='gray')
|
|
35
|
-
ax.add_feature(cfeature.BORDERS, linestyle=':', edgecolor='gray')
|
|
36
|
-
ax.add_feature(cfeature.LAKES, alpha=0.8)
|
|
37
|
-
# 添加省份轮廓
|
|
38
|
-
provinces = shpreader.natural_earth(resolution='10m', category='cultural', name='admin_1_states_provinces')
|
|
39
|
-
provinces_features = shpreader.Reader(provinces).geometries()
|
|
40
|
-
ax.add_geometries(provinces_features, ccrs.PlateCarree(), facecolor='none', edgecolor='gray', linestyle=':', linewidth=0.5, alpha=0.8)
|
|
41
|
-
|
|
42
|
-
def draw_subplot(args):
|
|
43
|
-
env = [-132.0, -47.0, 0, 57.0]
|
|
44
|
-
index, tp, vmax, vmin, cmap,time_index, name = args
|
|
45
|
-
# print(time_index)
|
|
46
|
-
# logger.info(f"Processing index: {index}")
|
|
47
|
-
# logger.info(time_index)
|
|
48
|
-
fig, ax = plt.subplots(figsize=(10, 10))
|
|
49
|
-
|
|
50
|
-
# 创建绘图和设置坐标系
|
|
51
|
-
# fig = plt.figure(figsize=(10, 8))
|
|
52
|
-
ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
|
|
53
|
-
|
|
54
|
-
# 设置图像显示的范围
|
|
55
|
-
ax.set_extent(env, ccrs.PlateCarree()) # 根据需要调整
|
|
56
|
-
|
|
57
|
-
# 添加中国地图的边界和特征,包括省份轮廓
|
|
58
|
-
add_china_map(ax)
|
|
59
|
-
tp = np.where(tp >= 0.1, tp, np.nan)
|
|
60
|
-
ax.imshow(tp, vmin=0, vmax=10, cmap=cmp_hjnwtx["pre_tqw"], transform=ccrs.PlateCarree(), extent=env, alpha=1)
|
|
61
|
-
|
|
62
|
-
# ax.imshow(tp, vmax=vmax, vmin=vmin, cmap=cmap)
|
|
63
|
-
ax.axis('off')
|
|
64
|
-
# ax.text(0.5, 0.5, str(index), transform=ax.transAxes, color='white', fontsize=20, ha='center', va='center')
|
|
65
|
-
ax.text(0.95, 0.95, f'{time_index}', transform=ax.transAxes, color='white', fontsize=20, ha='right', va='bottom')
|
|
66
|
-
ax.text(0.925, 0.925, f'{str(index)}', transform=ax.transAxes, color='white', fontsize=20, ha='right', va='top')
|
|
67
|
-
fig.tight_layout()
|
|
68
|
-
|
|
69
|
-
buf = io.BytesIO()
|
|
70
|
-
plt.savefig(buf, format='png')
|
|
71
|
-
buf.seek(0)
|
|
72
|
-
plt.close(fig)
|
|
73
|
-
return (index, buf) #返回两个数为元组
|
|
74
|
-
|
|
75
|
-
# 修改读取部分
|
|
76
|
-
def drawpic(tp, Count,timeList, name="temp"):
|
|
77
|
-
vmax = 70
|
|
78
|
-
vmin = 0
|
|
79
|
-
cmap = cmp_hjnwtx["radar_nmc"]
|
|
80
|
-
args_list = [ (index, tp[index, :, :], vmax, vmin, cmap,timeList[index], name) for index in range(2 * Count)]
|
|
81
|
-
|
|
82
|
-
with Pool(31) as pool:
|
|
83
|
-
results = pool.map(draw_subplot, args_list)
|
|
84
|
-
|
|
85
|
-
buffers = [result[1] for result in results]
|
|
86
|
-
combined_fig, axs = plt.subplots(2, Count, figsize=(10 * Count, 20))
|
|
87
|
-
for i in range(2):
|
|
88
|
-
for j in range(Count):
|
|
89
|
-
index = i * Count + j
|
|
90
|
-
ax = axs[i, j]
|
|
91
|
-
ax.imshow(plt.imread(buffers[index]), cmap=cmap)
|
|
92
|
-
ax.axis('off')
|
|
93
|
-
|
|
94
|
-
now_str = datetime.datetime.now().strftime("%Y%m%d%H%M")
|
|
95
|
-
plt.tight_layout()
|
|
96
|
-
outpath = f"./{timeList[0].strftime('%Y%m%d%H%M')}_MQPF/{name}_{now_str}.png"
|
|
97
|
-
mkDir(outpath)
|
|
98
|
-
plt.savefig(outpath)
|
|
99
|
-
plt.close(combined_fig)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
BASE_TARGET_PATH = "/mnt/wtx_weather_forecast/WTX_DATA/RADA/MQPF_GLB" #/mnt/wtx_weather_forecast/WTX_DATA/RADA/MQPF_PMSC
|
|
104
|
-
# BASE_TARGET_PATH = "/mnt/wtx_weather_forecast/WTX_DATA/RADA/MQPF_PMSC" #/mnt/wtx_weather_forecast/WTX_DATA/RADA/MQPF_PMSC
|
|
105
|
-
|
|
106
|
-
def get_mqpf_paths(UCTstr):
|
|
107
|
-
year = UCTstr[:4]
|
|
108
|
-
date = UCTstr[:8]
|
|
109
|
-
mqpfPath_pattern = os.path.join(BASE_TARGET_PATH,year, date,f"MSP2_WTX_AIW_QPF_L88_NA_{UCTstr}_00000-00300-00006.nc") #MSP2_WTX_AIW_QPF_L88_NA_202410222254_00000-00300-00006.nc
|
|
110
|
-
# mqpfPath_pattern = os.path.join(BASE_TARGET_PATH,year, date,f"MSP2_WTX_AIW_MQPF_L88_CHN_{UCTstr}_00000-00300-00006.nc")
|
|
111
|
-
|
|
112
|
-
return mqpfPath_pattern
|
|
113
|
-
|
|
114
|
-
def map_data(conf):
|
|
115
|
-
CST = conf[0]
|
|
116
|
-
UCT = CST + relativedelta(hours=-8)
|
|
117
|
-
UCTstr = UCT.strftime("%Y%m%d%H%M")
|
|
118
|
-
mqpfPath_pattern = get_mqpf_paths(UCTstr)
|
|
119
|
-
mqpfPath_list = glob.glob(mqpfPath_pattern)
|
|
120
|
-
if len(mqpfPath_list) == 0:
|
|
121
|
-
data_loss = re.findall(r"(2024\d{8}?)",mqpfPath_pattern)
|
|
122
|
-
print("data_loss",data_loss)
|
|
123
|
-
print("data_loss_path",mqpfPath_pattern)
|
|
124
|
-
tj_list.append(data_loss[0])
|
|
125
|
-
return np.full(shape_, np.nan)
|
|
126
|
-
else:
|
|
127
|
-
try:
|
|
128
|
-
with nc.Dataset(mqpfPath_list[0]) as dataNC:
|
|
129
|
-
mqpf = dataNC.variables["MQPF"][:]
|
|
130
|
-
mqpf = mqpf[:1]
|
|
131
|
-
if mqpf.shape != shape_:
|
|
132
|
-
logger.info(mqpf.shape )
|
|
133
|
-
logger.info(mqpfPath_list[0])
|
|
134
|
-
print("mqpf shape error",mqpf.shape)
|
|
135
|
-
mqpf = mqpf[:,:-1, :-1]
|
|
136
|
-
if mqpf.shape != shape_:
|
|
137
|
-
return np.full(shape_, np.nan)
|
|
138
|
-
else:
|
|
139
|
-
return mqpf
|
|
140
|
-
print("mqpf",UCTstr,mqpf.shape)
|
|
141
|
-
tj_list1.append(mqpfPath_pattern)
|
|
142
|
-
return mqpf
|
|
143
|
-
except Exception as e:
|
|
144
|
-
print(traceback.format_exc())
|
|
145
|
-
return np.full(shape_, np.nan)
|
|
146
|
-
|
|
147
|
-
def options():
|
|
148
|
-
parser = argparse.ArgumentParser(description='plot radar')
|
|
149
|
-
# parser.add_argument('--times', type=str, default='202406290000,202406300000')
|
|
150
|
-
parser.add_argument('--times', type=str, default='202407310000,202408010000')
|
|
151
|
-
parser.add_argument('--pac', type=str, default='100000')
|
|
152
|
-
# parser.add_argument('--combine', action='store_true', default=False)
|
|
153
|
-
parser.add_argument('--combine',action='store_true',default=False)
|
|
154
|
-
parser.add_argument('--isDebug',action='store_true',default=False)
|
|
155
|
-
parser.add_argument('--isDraw',action='store_true',default=False)
|
|
156
|
-
parser.add_argument('--freq', type=str, default="1h")
|
|
157
|
-
parser.add_argument('--tag',type=str, default=datetime.datetime.now().strftime("%Y%m%d%H%M"))
|
|
158
|
-
config= parser.parse_args()
|
|
159
|
-
print(config)
|
|
160
|
-
config.times = config.times.split(",")
|
|
161
|
-
config.pac = config.pac.split(",")
|
|
162
|
-
if len(config.times) == 1:
|
|
163
|
-
config.times = [config.times[0], config.times[0]]
|
|
164
|
-
config.times = [datetime.datetime.strptime(config.times[0], "%Y%m%d%H%M"),
|
|
165
|
-
datetime.datetime.strptime(config.times[1], "%Y%m%d%H%M")]
|
|
166
|
-
return config
|
|
167
|
-
if __name__ == '__main__':
|
|
168
|
-
cfg = options()
|
|
169
|
-
sCST = cfg.times[0]
|
|
170
|
-
eCST = cfg.times[-1]
|
|
171
|
-
sCSTstr = sCST.strftime("%Y%m%d")
|
|
172
|
-
tj_list = []
|
|
173
|
-
tj_list1= []
|
|
174
|
-
start = datetime.datetime.now()
|
|
175
|
-
logger.info(f"{sCST}")
|
|
176
|
-
logger.info(f"{eCST}")
|
|
177
|
-
logger.info(f"PNG")
|
|
178
|
-
timeList = pd.date_range(sCST,eCST,freq="360s",inclusive="left")
|
|
179
|
-
# for CST in timeList:
|
|
180
|
-
productList = product(timeList)
|
|
181
|
-
with Pool(31) as p:
|
|
182
|
-
Data = p.map(map_data,productList)
|
|
183
|
-
end = datetime.datetime.now()
|
|
184
|
-
print(start-end)
|
|
185
|
-
Data_con = np.concatenate(Data,axis=0)
|
|
186
|
-
loss_len = 240 - Data_con.shape[0]
|
|
187
|
-
sCSTstr = sCST.strftime("%Y%m%d")
|
|
188
|
-
eCSTstr = eCST.strftime("%Y%m%d")
|
|
189
|
-
# Data_con1 = Data_con.filled()
|
|
190
|
-
# np.save(f"data_{sCSTstr}_{eCSTstr}.npy",Data_con1)
|
|
191
|
-
Data_con_120 = copy.copy(Data_con)
|
|
192
|
-
drawpic(Data_con_120[:int(len(Data_con_120)/2)], int(len(Data_con_120)/4),timeList[:int(len(Data_con_120)/2)],name=f"temp120_{sCSTstr}_loss_{loss_len}_")
|
|
193
|
-
print("done 120")
|
|
194
|
-
end1 = datetime.datetime.now()
|
|
195
|
-
print(end1-end)
|
|
196
|
-
Data_con_240 = copy.copy(Data_con)
|
|
197
|
-
print(Data_con_240[120:].shape)
|
|
198
|
-
drawpic(Data_con_120[int(len(Data_con_120)/2):], int(len(Data_con_120)/4),timeList[int(len(Data_con_120)/2):],name=f"temp120_240_{sCSTstr}_{loss_len}_")
|
|
199
|
-
print(datetime.datetime.now()-end1)
|
|
200
|
-
print("done 120-240")
|
|
201
|
-
logger.info("success")
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
# "/mnt/wtx_weather_forecast/WTX_DATA/RADA/MQPF/2024/20240704/MSP2_WTX_AIW_REF_L88_CHN_202407040324_00000-00300-00006.nc"
|
|
205
|
-
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import matplotlib.pyplot as plt
|
|
2
|
-
import numpy as np
|
|
3
|
-
import datetime
|
|
4
|
-
from hjnwtx.colormap import cmp_hjnwtx # 假设这是您的自定义颜色映射库
|
|
5
|
-
import cartopy.crs as ccrs
|
|
6
|
-
import cartopy.feature as cfeature
|
|
7
|
-
import cartopy.io.shapereader as shpreader
|
|
8
|
-
from shancx import crDir
|
|
9
|
-
def drawpic_com(array_dt,array_dt1,name="temp"):
|
|
10
|
-
now_str = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
|
11
|
-
outpath = f"./radar_nmc/{name}_{now_str}.png"
|
|
12
|
-
crDir(outpath)
|
|
13
|
-
|
|
14
|
-
# 创建绘图和设置坐标系
|
|
15
|
-
fig = plt.figure(figsize=(10, 8))
|
|
16
|
-
ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
|
|
17
|
-
|
|
18
|
-
# 设置图像显示的范围
|
|
19
|
-
ax.set_extent([73, 135, 18, 54], ccrs.PlateCarree()) # 根据需要调整
|
|
20
|
-
|
|
21
|
-
# 添加中国地图的边界和特征,包括省份轮廓
|
|
22
|
-
add_china_map(ax)
|
|
23
|
-
|
|
24
|
-
# 添加数据层
|
|
25
|
-
if len(array_dt.shape) == 3:
|
|
26
|
-
for i, img_ch_nel in enumerate(array_dt):
|
|
27
|
-
ax.imshow(img_ch_nel, vmin=50, vmax=500, cmap=cmp_hjnwtx["radar_nmc"], transform=ccrs.PlateCarree(), extent=[73, 134.99, 12.21, 54.2])
|
|
28
|
-
plt.colorbar(ax.images[0], ax=ax, orientation='vertical')
|
|
29
|
-
plt.savefig(f"{outpath}_layer_{i}.png")
|
|
30
|
-
plt.clf() # 清除图形以绘制下一个通道图像
|
|
31
|
-
elif len(array_dt.shape) == 2:
|
|
32
|
-
ax.imshow(array_dt, vmin=0, vmax=100, cmap=cmp_hjnwtx["radar_nmc"], transform=ccrs.PlateCarree(), extent=[73, 134.99, 12.21, 54.2], alpha=1)
|
|
33
|
-
ax.imshow(array_dt1, vmin=0, vmax=100, cmap=cmp_hjnwtx["radar_nmc"], transform=ccrs.PlateCarree(), extent=[73, 134.99, 12.21, 54.2], alpha=0.3)
|
|
34
|
-
plt.colorbar(ax.images[0], ax=ax, orientation='vertical')
|
|
35
|
-
plt.savefig(outpath)
|
|
36
|
-
plt.close(fig)
|
|
37
|
-
|
|
38
|
-
def add_china_map(ax):
|
|
39
|
-
# 在地图上添加地形特征
|
|
40
|
-
ax.add_feature(cfeature.COASTLINE, edgecolor='gray')
|
|
41
|
-
ax.add_feature(cfeature.BORDERS, linestyle=':', edgecolor='gray')
|
|
42
|
-
ax.add_feature(cfeature.LAKES, alpha=0.8)
|
|
43
|
-
# 添加省份轮廓
|
|
44
|
-
provinces = shpreader.natural_earth(resolution='10m', category='cultural', name='admin_1_states_provinces')
|
|
45
|
-
provinces_features = shpreader.Reader(provinces).geometries()
|
|
46
|
-
ax.add_geometries(provinces_features, ccrs.PlateCarree(), facecolor='none', edgecolor='gray', linestyle=':', linewidth=0.5, alpha=0.8)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# 示例用法
|
shancx/makenetCDFN.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import xarray as xr
|
|
2
|
-
import numpy as np
|
|
3
|
-
def convert_longitude(nc_input_path, nc_output_path):
|
|
4
|
-
ds = xr.open_dataset(nc_input_path)
|
|
5
|
-
lon = 'lon'
|
|
6
|
-
if lon not in ds.coords:
|
|
7
|
-
raise ValueError("输入文件中没有'lon'坐标")
|
|
8
|
-
ds[lon] = xr.where(ds[lon] > 180, ds[lon] - 360, ds[lon])
|
|
9
|
-
ds = ds.sortby(lon)
|
|
10
|
-
ds = ds.sortby('lat', ascending=False)
|
|
11
|
-
ds.to_netcdf(nc_output_path)
|
|
12
|
-
print(f"成功将数据转换并保存到 {nc_output_path}")
|
|
13
|
-
convert_longitude('CMORPH2_0.25deg-30min_202410160100.RT.nc', 'CMORPH2_0.25deg-30min_202410160100.RT_N.nc')
|
|
14
|
-
|
|
15
|
-
import netCDF4 as nc
|
|
16
|
-
import numpy as np
|
|
17
|
-
with nc.Dataset(path) as dataNC:
|
|
18
|
-
hourlyPrecipRateGC = dataNC["hourlyPrecipRateGC"][:]
|
|
19
|
-
latArr = dataNC["Latitude"][:]
|
|
20
|
-
lonArr = dataNC["Longitude"][:]
|
|
21
|
-
latArr_flipped = latArr[::-1]
|
|
22
|
-
hourlyPrecipRateGC_flipped = hourlyPrecipRateGC[::-1, :]
|
|
23
|
-
|
|
24
|
-
with nc.Dataset(path) as dataNC:
|
|
25
|
-
ref = dataNC["var"][:][::-1] # 读取数据并翻转第一个维度(通常是纬度)
|
|
26
|
-
latArr = dataNC["lat"][:][::-1] # 翻转纬度数组
|
|
27
|
-
lonArr = dataNC["lon"][:] #
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
import netCDF4 as nc
|
|
31
|
-
with nc.Dataset(path) as dataNC:
|
|
32
|
-
# 翻转数据的纬度维度
|
|
33
|
-
ref = dataNC["var"][:][::-1] # 假设第一个维度是纬度
|
|
34
|
-
# 翻转纬度数组
|
|
35
|
-
latArr = dataNC["lat"][:][::-1]
|
|
36
|
-
# 经度转换:从 [0, 359] 转换为 [-179, 179]
|
|
37
|
-
lonArr = dataNC["lon"][:]
|
|
38
|
-
lonArr = ((lonArr + 180) % 360) - 180 # 将 [0, 359] 转换为 [-180, 180)
|
|
39
|
-
# 排序经度数组,并相应调整数据
|
|
40
|
-
lon_order = lonArr.argsort() # 获取排序索引
|
|
41
|
-
lonArr = lonArr[lon_order] # 按照索引重新排序经度数组
|
|
42
|
-
ref = ref[:, lon_order] # 重新排序数据的经度维度
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
shancx/Command.py,sha256=7YJZshsq3PFxXvxFz6A1Qy152dXBSEX0I-uBgzNXwL0,4528
|
|
2
|
-
shancx/Inst.py,sha256=Q8dULK2djqBU0JFyhMAf1mhWzFDwx9SaAJuTIO0AWig,751
|
|
3
|
-
shancx/Lib.py,sha256=GUAspllSxk39mvj-F1Q8Ys0EcY_lQfZPRGPE7L3x4SE,977
|
|
4
|
-
shancx/Read.py,sha256=keu2wDl_UHxnDFkodxVnSs7JqcjQ0qxCLXFCnX2g_yM,2805
|
|
5
|
-
shancx/ZR.py,sha256=5APchqVoI1G2MkrN9YJSWCwfLUygcSFIsUXSo9aq1Qg,341
|
|
6
|
-
shancx/__init__.py,sha256=S8X6KVrVQYUK42DHf2yOQiFKH9dLqE0YLg_Y_Z4ZRp4,17777
|
|
7
|
-
shancx/args.py,sha256=Nr80vgQpT3m31_crKGf5DvofCxyERJFbqJ1sHb1BIqs,1042
|
|
8
|
-
shancx/bak.py,sha256=MpQPlFQcEC9RkrIqv-pfIwfsiS8XXF9b6NQk0E3Mbj0,25207
|
|
9
|
-
shancx/cmp.py,sha256=cIQv-QTl-22FJa6tmHyBu_IQmMq5LnsQGGFK5jc5hMA,893
|
|
10
|
-
shancx/df2database.py,sha256=h9_n9tZBWKyGKnpGPRHPSZgMn5kylX0sV5APwmi2SHM,3315
|
|
11
|
-
shancx/geosProj.py,sha256=wG59grnnZ-KC3lYeuqswcq6v4LqmAzrX_5HJZ_t3bIU,2683
|
|
12
|
-
shancx/getResponse.py,sha256=QmJfa4czGCOiKb8RuCLXKE7AAKVADAptNiwn7v1tfbM,1055
|
|
13
|
-
shancx/info.py,sha256=0rk_L8Z5uj9RliaZrzT-CArH9ZObmdmcp-1RxAItL08,1122
|
|
14
|
-
shancx/makenetCDFN.py,sha256=6AYsVgpqs3UHX7UK8UaJoYolqynHrmwuJbtol3EU5-k,1780
|
|
15
|
-
shancx/netdfJU.py,sha256=96KR9NMLr2Kcs_OOMpX7QPujdWUj0GCEUIZ7_4_pBxw,7741
|
|
16
|
-
shancx/path.py,sha256=ki5AvsThCCsRkb8sKpGLekZ5DzTaSgmWw4OndD-G1lM,5339
|
|
17
|
-
shancx/sendM.py,sha256=CEpeHavseWILlfevhfOMYxYUIWhh4fCNkXGRsEjMxBE,3352
|
|
18
|
-
shancx/wait.py,sha256=VTikFTZ1q0PQHDVS9RhBH5-WtcvK3BGS6tUCHKaBjcg,7520
|
|
19
|
-
shancx/3DJU/__init__.py,sha256=pDFvW1OOEW-ueXH50NJIYdWlySHZU6sr5htzHUSeROo,1000
|
|
20
|
-
shancx/Board/__init__.py,sha256=ga2C5YyJITvvQA1ocpxna_KNFnNRJVwkTjLoIglLZUQ,993
|
|
21
|
-
shancx/Calmetrics/__init__.py,sha256=zYTwLxs0M427EIgMNtDbfE4pY-gnY1Zmex1YjixNOO4,701
|
|
22
|
-
shancx/Calmetrics/matrixLib.py,sha256=MO1E04hBjZZ93Uzlgth6ilNwmY666cjFR9SwOM6YN4I,6749
|
|
23
|
-
shancx/Calmetrics/rmseR2score.py,sha256=PXeF8iXH3NhKgE0ZxfhzjaobRhOsW77myYNEcvqJZj0,911
|
|
24
|
-
shancx/Clip/__init__.py,sha256=8JDd5X42LfAGVbd0Qk0Z1pXx7Qx3t6drVjoQNlhC8lg,1808
|
|
25
|
-
shancx/Df/DataFrame.py,sha256=KvwKPHmVxFLCPPyfesKjZl-Se1oAdGyLbbJoCjzP4YY,661
|
|
26
|
-
shancx/Df/__init__.py,sha256=pRkuvRn9pqt6wM-a0DztQpFqLvIFbfoT9DiDPIip0gI,597
|
|
27
|
-
shancx/Df/tool.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
28
|
-
shancx/Diffmodel/Psamples.py,sha256=9Uu5w-bsBaFvoTH6ZWU-8MOefkLUh6lYzhIlzO9O6D0,662
|
|
29
|
-
shancx/Diffmodel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
shancx/Diffmodel/test.py,sha256=uRldWrcqiZpHeBY9WD9gtsPsLWobDyt8Y02Zc3q_78o,8180
|
|
31
|
-
shancx/Doc/__init__.py,sha256=nLQzA4V8yA7KvzzVmV00Kfn57PK1bNi9P1EBYcsOHk4,7772
|
|
32
|
-
shancx/Dsalgor/Class.py,sha256=bxJ9JhIjoxl0hJfjO126YrnyHWDpxCEAZ7qcPs0Y0ic,377
|
|
33
|
-
shancx/Dsalgor/CudaPrefetcher1.py,sha256=mUVlS3txsriET26ZMZ6DYOnyzWr8Tz6wThifzWrC7k8,3951
|
|
34
|
-
shancx/Dsalgor/Fake_image.py,sha256=PEha7w0mMVEOodcAXEGNv_FvrWUipsqAJPkhTYDk6l4,1264
|
|
35
|
-
shancx/Dsalgor/Hsml.py,sha256=GzAMS30DxJm8_y8lq8bk-6F_3_Xah4eHdLqHuZQWenw,16874
|
|
36
|
-
shancx/Dsalgor/L2Loss.py,sha256=m68uMLLUfgvP066_gKaKvjWGmLTlbHQwGAKUmzIt4qQ,261
|
|
37
|
-
shancx/Dsalgor/MetricTracker.py,sha256=shXN8OUsmbFIAX0aC5hgf-hMuX5Jts3ebAbjYDgmce0,4268
|
|
38
|
-
shancx/Dsalgor/Normalize.py,sha256=arUrZ6d4L2DiJRSsefpAe3wvkeVICvvnJ6RbvMoyIDE,3191
|
|
39
|
-
shancx/Dsalgor/OptimizerWScheduler.py,sha256=oC7OmYCuYfVRVSzP2-zPvHB7lgmE4UuAUhdBPob87H0,1529
|
|
40
|
-
shancx/Dsalgor/Rmageresize.py,sha256=TQfVLnCLJYSLC88dI7x6IZJJv43s1zJYE9HzCZpPb0M,2979
|
|
41
|
-
shancx/Dsalgor/Savemodel.py,sha256=l4XfuNJ4WMfVy8qalH8AhtR3RsQmZfpJF53zIwQxrUs,1009
|
|
42
|
-
shancx/Dsalgor/SmoothL1_losses.py,sha256=P7YpSjrlIhyVgBxyxDxehuVtTbffbbrnKmuZ-Po-UvE,1056
|
|
43
|
-
shancx/Dsalgor/Tqdm.py,sha256=JZz8SwqQjql4eT0GUmFX6xAwLNEx1YwpGM2hL1LDyk8,2707
|
|
44
|
-
shancx/Dsalgor/__init__.py,sha256=16ZA9-QzkaQTXWLxi4gRuaXUUEE-2szAA8fc4u9bSBI,3324
|
|
45
|
-
shancx/Dsalgor/checknan.py,sha256=Oi7yU-UTSQgE4tgvuXTdgPmhlaus6G7gB2suaV7QgeQ,1188
|
|
46
|
-
shancx/Dsalgor/dsalgor.py,sha256=jNlD8TJuAOKT6H_8xc-l8sI-mXf8upemeA7Jpf5Eftk,398
|
|
47
|
-
shancx/Dsalgor/iouJU.py,sha256=pZYQ-KPE-hgsuPUL0KxZZcuemDCt_LWAyw9GuKgvZNE,3602
|
|
48
|
-
shancx/Dsalgor/mask.py,sha256=Dx7mLfcfEDIudu-DzdowFGoS1D3IxLHC8Mtw_kAen4w,1060
|
|
49
|
-
shancx/Dsalgor/psnr.py,sha256=mrepcNyWTdB5UrHXZpSvyLsbZ-i_evyZtAmk3mIOwT8,267
|
|
50
|
-
shancx/Dsalgor/ssim.py,sha256=eW_RXovDhVvwvFg2kEG_Xd3SasGKQt5BpQr6yNOiepk,2896
|
|
51
|
-
shancx/Dsalgor/structural_similarity.py,sha256=zc4wjCKVkkDgySneB1uPuBWu-9KVD5TXPLubXKhMR7o,10204
|
|
52
|
-
shancx/Dsalgor/tool.py,sha256=NpSoeX0r61k7_iBlMYCTv1IfcZQZv1sFecxJk_afa0g,26690
|
|
53
|
-
shancx/E/__init__.py,sha256=UJZugggSzsRkyT3Zi1R-1i-vfD5UnoNoEgCHEiS84bg,5393
|
|
54
|
-
shancx/Fillmiss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
-
shancx/Fillmiss/imgidwJU.py,sha256=CyP4ZlhPpXPqGVzzcLR7lohVl8bWjEceJLo7yvKgtEM,1708
|
|
56
|
-
shancx/Fillmiss/imgidwLatLonJU.py,sha256=ltYZj9CwN8cVs4Kow64oVN1EiBERgW9FceTUBFkCOAs,4314
|
|
57
|
-
shancx/Gpu/__init__.py,sha256=4Ahq04phTGVlFWN9Vih0WAh-IqFrhtwM5hj4G1IU2Dk,1950
|
|
58
|
-
shancx/H9/__init__.py,sha256=FCarcXfU2tVD2KrCGKNNUuL51zAWZYHV7lrP7gntvaI,4911
|
|
59
|
-
shancx/H9/ahi_read_hsd.py,sha256=bt9oOOARcXijmyGpmHYXj0NKnuTntZjqx0_tu6Vp2vs,33522
|
|
60
|
-
shancx/H9/ahisearchtable.py,sha256=e2kpz-P5npgL4gzNxn8igERJuWWIysvTNLkptr5_Zcc,9579
|
|
61
|
-
shancx/H9/geometry.py,sha256=ZoCfgP07ANqDxyLf8uFN016DPl7QqW9pAV3sr2ekCng,95893
|
|
62
|
-
shancx/Hug/__init__.py,sha256=NvcqXM0CSwXYtTr5yj4zfkag_7PZcI5tCsIHjuLNXTQ,3040
|
|
63
|
-
shancx/Mos/__init__.py,sha256=IDlCLNN6a_mguYmRcAPcevHSDaud5ZhvYNSuASqztcE,1563
|
|
64
|
-
shancx/NN/__init__.py,sha256=D9IIhoFW32DysN-SUBgXYIWqxNEpCCsBMX1gXD2QcqY,2121
|
|
65
|
-
shancx/Plot/GlobMap.py,sha256=WRvZOf5bo8IfECk1-sN4g6K0CrcJhSoEJAiLvZAWDwg,13021
|
|
66
|
-
shancx/Plot/Gray2RGB.py,sha256=yDXu1xWVi7OtrS8_ExxK_ev1988kj1ZxoNCWf-kl4Zc,2734
|
|
67
|
-
shancx/Plot/Mip.py,sha256=CaU932q_Lav_tu7YUj9ekSuJhChpuHlvIZFnWIZ2xZc,1670
|
|
68
|
-
shancx/Plot/__init__.py,sha256=NcblPcR505mCn2CuCcSQUGj4at3eR4NAretCncVQBl8,30230
|
|
69
|
-
shancx/Plot/border.py,sha256=o-iaHGdvxOQzfgBd3y66Sb0aXspYd4lAJbPUSkVFoPY,1928
|
|
70
|
-
shancx/Plot/draw_day_CR_PNG.py,sha256=j9WM9GMCB1it2IdFDRfMwcaSEbvyylRTX3pybBq2SKo,7708
|
|
71
|
-
shancx/Plot/draw_day_CR_PNGUS.py,sha256=rIkY2_B45SVYVP38xi_OfvCer3EFgf3iSww7KJVnx9c,8074
|
|
72
|
-
shancx/Plot/draw_day_CR_SVG.py,sha256=mLSZS9Mh40bIrVSSF8jjhU82PbOg6g1AOr9VW7hbCq0,9486
|
|
73
|
-
shancx/Plot/draw_day_pre_PNGUS.py,sha256=59uH_KPo7rzS6YsxkuQfB5fXooHmcELbK6ZlP2EbsdA,8077
|
|
74
|
-
shancx/Plot/radarNmc.py,sha256=97HUJWFtEFWorH1W7vkJUjUgQE7wY68m_CwsShQDoyw,3078
|
|
75
|
-
shancx/Plot/radar_nmc_china_map_compare1.py,sha256=26Y3Hi8YpK_oNj1CR4tFAeDv67b6if2Ip4o2leKutVY,2301
|
|
76
|
-
shancx/Plot/single_china_map.py,sha256=k3KnCaTaH_K5I7xdV275yzDIC6PZ4Jh7S5ac2W7AgkA,2078
|
|
77
|
-
shancx/RdPzl/__init__.py,sha256=I5Isz3KfDgFZAdlRk4D-Hvp-8xH4F2Dl0XGxYGzUcKc,1166
|
|
78
|
-
shancx/SN/__init__.py,sha256=oJAL9k0Ziib5kvLODiroSxpUdorIlmUwadcuDIk_Eic,2478
|
|
79
|
-
shancx/Time/GetTime.py,sha256=lFdjKpFHxOgvyCUzeGi8MrGUIEPrGzcaRX3CVZi8B4o,1262
|
|
80
|
-
shancx/Time/__init__.py,sha256=ftYQdlJotvBYGtMWtTnooUBJOvjNOsFJ9i5ACFTjtDU,3826
|
|
81
|
-
shancx/Time/timeCycle.py,sha256=ukbonYfbu6evQGKQJRyZI5YGEoiIHo7Razha86NrM-w,7391
|
|
82
|
-
shancx/Time/tool.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
|
-
shancx/Train/__init__.py,sha256=clWzZpsVEhJqEvRCDCEn3tZxrG-wf-BiiCsGvTTGR6I,2379
|
|
84
|
-
shancx/Train/makelist.py,sha256=Y8WF8kBIxeb5fmklk-NrBkITKluzGfxqkhk2ip0AOC0,7758
|
|
85
|
-
shancx/Train/multiGpu.py,sha256=D_oZeiSc7VWktpnVDwrFOC1CYZSt9rxOKY5lngE5vFg,820
|
|
86
|
-
shancx/Train/prepare.py,sha256=vL_8UOA66oZCBIwCICtihsGibivtNgaVJGulJxfNdn8,6793
|
|
87
|
-
shancx/Train/renet50.py,sha256=wEhYk1X96WE5zuqHqVxWLJa-A5jDNkz4z6edORNufnA,6428
|
|
88
|
-
shancx-1.9.33.109.dist-info/METADATA,sha256=W0fTJBxLhUqHej1EcEO-GxgaAhHvWSYtBxN3u1PFTyA,646
|
|
89
|
-
shancx-1.9.33.109.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
90
|
-
shancx-1.9.33.109.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
|
|
91
|
-
shancx-1.9.33.109.dist-info/RECORD,,
|
/shancx/{3DJU → 3D}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/shancx/{Dsalgor → Algo}/Hsml.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/shancx/{Dsalgor → Algo}/Tqdm.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/shancx/{Dsalgor → Algo}/mask.py
RENAMED
|
File without changes
|
/shancx/{Dsalgor → Algo}/psnr.py
RENAMED
|
File without changes
|
/shancx/{Dsalgor → Algo}/ssim.py
RENAMED
|
File without changes
|
|
File without changes
|
/shancx/{Dsalgor → Algo}/tool.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|