我一直在处理Landlab和Python,所以我不是专家用户。我试图运行一个模型,其目的是将现有的DEM导入网格,但它没有成功。 这是代码:
from landlab import RasterModelGrid
from landlab.io import read_esri_ascii
mg = RasterModelGrid((4852, 7894), 40)
z = mg.add_zeros('node', 'elevation')
(mg, z) = read_esri_ascii('DEM40_Sicilia_only_landlab.asc',name='elevation')
它给了我这个错误:
File "C:\Users\claudio\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 202: character maps to <undefined>
有谁知道解决问题的答案?