- 积分
- 15695
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-3-8
- 最后登录
- 1970-1-1
|
发表于 2018-11-19 16:01:46
|
显示全部楼层
本帖最后由 subtropical 于 2018-11-19 16:30 编辑
您好 我要把wrfout里面的变量写成.bin二进制文件(为了方面业务运行再绘制成图形),我看NCL官网,然后学着用ncl函数
fbinrecwrite (file_out,-1, (/ times /))
fbinrecwrite (file_out,-1, (/ LAT(0,:,:) /))
fbinrecwrite (file_out,-1, (/ LON(0,:,:) /))
fbinrecwrite (file_out,-1, (/ vis(0,:,:) /))
其中lat,lon,还有变量vis都是(times(1),lat(288),lon(288))
然后顺序再用ncl读取
a = fbinrecread (fili, 0, 1, "integer") ; 1st record is zero
x = fbinrecread (fili, 1, (/ 288,288 /), "float") ; 2nd one
y = fbinrecread (fili, 2, (/ 288,288 /), "float") ; 3rd record is two
z = fbinrecread (fili, 3, (/ 288,288 /), "float") ; 4th record is three
读了之后,我print看了下,x,y,z好像都是正确的存储,但是我就简单的画张图
fatal:Argument type mismatch on argument (0) of (wrf_contour) can not coerce
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 62 in file read_bin_vis1.ncl
请问要怎么改?
不太懂要怎么给变添加属性之类的,为了方便画图,有例子可以参考下吗?,谢谢
还有我为了简单,先写了一个时次的,那很多个时次的话,变量要怎么写呢?
|
|