爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4481|回复: 9

求助关于convert2nc

[复制链接]
发表于 2018-1-31 07:09:43 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
王老师,您好!
我用convert2nc把ARL数据转化成netcdf,但可能数据太大,显示错误‘java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Variable starting pos=2153582780 may not exceed 2147483647’。我把version设置成'netcdf4',显示错误‘java.lang.UnsupportedOperationException: java.lang.UnsupportedOperationException: Couldn't load NetCDF C library (see log for details).’。请问这个问题有什么解决办法吗?谢谢!
密码修改失败请联系微信:mofangbao
发表于 2018-1-31 12:39:56 | 显示全部楼层
你更新一下MeteoInfo中这个文件试试: midata.py (28.03 KB, 下载次数: 7)
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-1-31 23:45:54 | 显示全部楼层
本帖最后由 aankai 于 2018-1-31 23:59 编辑
MeteoInfo 发表于 2018-1-31 12:39
你更新一下MeteoInfo中这个文件试试:

路径:MeteoInfo -> pylib -> mipylib -> dataset

谢谢您的回复,不过替换了文件之后还是提示同样的错误
为了方便您测试,我之前上传了一个ARL文件。您可以尝试把它转换成netcdf格式,谢谢!

链接: https://pan.baidu.com/s/1hub7VFI 密码: q6zf
密码修改失败请联系微信:mofangbao
发表于 2018-2-1 08:26:47 | 显示全部楼层
aankai 发表于 2018-1-31 23:45
谢谢您的回复,不过替换了文件之后还是提示同样的错误
为了方便您测试,我之前上传了一个ARL文件。您可 ...

忘了跟你说convert2nc函数要加largefile=True参数。比如:

convert2nc(arlfilename, ncfilename, largefile=True)
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-2-1 13:22:27 | 显示全部楼层
MeteoInfo 发表于 2018-2-1 08:26
忘了跟你说convert2nc函数要加largefile=True参数。比如:

convert2nc(arlfilename, ncfilename, larg ...

我之前也试过加这个,但显示错误“convert2nc() got an unexpected keyword argument 'largefile'”
密码修改失败请联系微信:mofangbao
发表于 2018-2-1 13:39:44 | 显示全部楼层
aankai 发表于 2018-2-1 13:22
我之前也试过加这个,但显示错误“convert2nc() got an unexpected keyword argument 'largefile'”

所以让你更新那个文件呀
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-2-1 13:50:45 | 显示全部楼层
MeteoInfo 发表于 2018-2-1 13:39
所以让你更新那个文件呀

已经更新过了啊
密码修改失败请联系微信:mofangbao
发表于 2018-2-2 13:26:18 | 显示全部楼层
aankai 发表于 2018-2-1 13:50
已经更新过了啊

请下载MeteoInfo 1.4.7R13版本处理这个问题。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-2-3 06:12:11 | 显示全部楼层
MeteoInfo 发表于 2018-2-2 13:26
请下载MeteoInfo 1.4.7R13版本处理这个问题。

非常感谢王老师,这次可以了。原来是largefile=largefile,我还以为largefile=bigfile里的bigfile是通用的变量。每次向您提问都要您修改源代码,真是麻烦您了!
密码修改失败请联系微信:mofangbao
发表于 2020-7-21 10:50:29 | 显示全部楼层
本帖最后由 杜不苦 于 2020-7-21 10:53 编辑
MeteoInfo 发表于 2018-2-1 08:26
忘了跟你说convert2nc函数要加largefile=True参数。比如:

convert2nc(arlfilename, ncfilename, larg ...

我之前的报错是
Traceback (most recent call last):
  File "<iostream>", line 5, in <module>
  File "D:\Tools\MeteoInfo_2.2.1\MeteoInfo\pylib\mipylib\dataset\midata.py", line 651, in convert2nc
    if var.datatype == DataType.STRUCTURE:
AttributeError: 'DimVariable' object has no attribute 'datatype'

老师,我加入largefile = ture之后,还是有这个报错啊
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表