- 积分
- 540
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-10-8
- 最后登录
- 1970-1-1
|
发表于 2024-6-3 10:34:31
|
显示全部楼层
你好,不知道问题是否已经解决:
“emitted longwave <0; skin T may be wrong due to inconsistent
input of SHDFAC with LAI
245 203 SHDFAC= 0.0000000E+00 VAI= 0.0000000E+00 TV=
266.0056 TG= -10.11275
LWDN= -9999.000 FIRA= 9699.031 SNOWH= 0.0000000E+00
FATAL ERROR: STOP in Noah-MP”
这个报错应该是由于驱动数据在陆地表面为缺测导致的,只需要对驱动数据当中,landmask==1(陆地)的部分对缺测值进行填充即可。附可能用到的缺测值填充函数:
def replace_missing_values(array, missing_value):
array = np.nan_to_num(array, nan=missing_value)
rows, cols = array.shape
for i in range(rows):
for j in range(cols):
if array[i, j] == missing_value:
# Find valid neighbors
neighbors = []
if i > 0 and array[i-1, j] != missing_value:
neighbors.append(array[i-1, j])
if i < rows-1 and array[i+1, j] != missing_value:
neighbors.append(array[i+1, j])
if j > 0 and array[i, j-1] != missing_value:
neighbors.append(array[i, j-1])
if j < cols-1 and array[i, j+1] != missing_value:
neighbors.append(array[i, j+1])
# Replace missing value with a random valid neighbor
if neighbors:
array[i, j] = np.random.choice(neighbors)
else:
# If no valid neighbors found, replace with a random value
# Adjust the range as needed
array[i, j] = np.random.randint(1, 10)
return array
|
|