- 积分
- 973
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-10-27
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
大侠们好:
我才开始学NCL,有一个简单问题想请教大家,大家帮我看看错在哪里吧,谢谢啊。
经过WRF之后,得到了很多output,比如wrfout_d03*这类的,但是他们没有自带后缀。
我就用NCL最简单的命令去读取这些东西,script如下:
begin
f = addfile("/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_01:00:00.nc","r")
T = f->T
printVarSummary(T)
end
这样是可以的,会显示如下:Variable: T
Type: float
Total Size: 1154736 bytes
288684 values
Number of Dimensions: 4
Dimensions and sizes: [Time | 1] x [bottom_top | 27] x [south_north | 99] x [west_east | 108]
Coordinates:
Number Of Attributes: 6
FieldType : 104
MemoryOrder : XYZ
description : perturbation potential temperature (theta-t0)
units : K
stagger :
coordinates : XLONG XLAT
然后我又进行修改,改成
begin
diri = "/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/"
fils = systemfunc ("ls " +diri+ "wrfout_d03_2008-11-01_1*.nc")
f = addfiles(fils,"r")
T = f->T
printVarSummary(T)
end
结果就不行了。
错误如下:ls: /nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_1*.nc: No such file or directory
warning:Argument 0 of the current function or procedure was coerced to the appropriate type and thus will not change if the function or procedure modifies its value
fatal:(-2147483647) has no file extension, can't determine type of file to open
fatal:["NclVar.c":1376]:Assignment type mismatch, right hand side can't be coerced to type of left hand side
fatal:Execute: Error occurred at or near line 12 in file file.ncl
或者我把 fils = systemfunc ("ls " +diri+ "wrfout_d03_2008-11-01_1*.nc") 改成 fils = systemfunc ("ls " +diri+ "wrfout_d03_2008-11-01_1*") ,也不行,错误如下:
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_19:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_18:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_17:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_16:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_15:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_14:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_13:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_12:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_11:00:00) has no file extension, can't determine type of file to open
fatal:(/nuwa_cluster/home/rcecstu03/RunLiu/WRF/run/PRD/wrfout_d03_2008-11-01_10:00:00) has no file extension, can't determine type of file to open
fatal:(f) does not reference a file
fatal:Execute: Error occurred at or near line 13 in file file.ncl
我要怎么办呢?那些文件加上后缀说没有该文件,不加后缀又说没有扩展名,我究竟如何解决这个问题呢?
谢谢你们啊。 |
|