- 积分
- 1901
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-1-6
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 xuebiz 于 2016-10-10 10:06 编辑
overlay功能例子中
http://www.ncl.ucar.edu/Applications/Scripts/overlay_12.ncl
数据在官网下了,是wrfout_d01_2003-07-15_00_00_00.txt,用ncdump可以打开开内容,也改名了.nc和无后缀都不行。。。
想不通。。。
---------------------------------------------------------------------------------
文件名为wrfout_d01_2003-07-15_00_00_00.nc时,运行及输出:
#ncl test-overlay_12.ncl
Copyright (C) 1995-2014 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.2.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:["FileSupport.c":3605]:_NclFindFileExt: Requested file <wrfout_d01_2003-07-15_00:00:00.nc> or <wrfout_d01_2003-07-15_00:00:00> does not exist
fatal:["FileSupport.c":3973]:(wrfout_d01_2003-07-15_00:00:00.nc) has no file extension, can't determine type of file to open
fatal:file (a) isn't defined
fatal:["Execute.c":8567]:Execute: Error occurred at or near line 30 in file test-overlay_12.ncl
--------------------------------------------------------------------------------
文件名为wrfout_d01_2003-07-15_00_00_00时,运行及输出:
$ ncl test-overlay_12.ncl
Copyright (C) 1995-2014 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.2.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:["FileSupport.c":3973]:(wrfout_d01_2003-07-15_00:00:00) has no file extension, can't determine type of file to open
fatal:file (a) isn't defined
fatal:["Execute.c":8567]:Execute: Error occurred at or near line 30 in file test-overlay_12.ncl
-----------------------------------------------------------------------------------
文件名为wrfout_d01_2003-07-15_00_00_00.txt时,运行及输出:
$ ncl test-overlay_12.ncl
Copyright (C) 1995-2014 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.2.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:["FileSupport.c":3605]:_NclFindFileExt: Requested file <wrfout_d01_2003-07-15_00:00:00.txt> or <wrfout_d01_2003-07-15_00:00:00> does not exist
fatal:["FileSupport.c":3973]:(wrfout_d01_2003-07-15_00:00:00.txt) has no file extension, can't determine type of file to open
fatal:file (a) isn't defined
fatal:["Execute.c":8567]:Execute: Error occurred at or near line 30 in file test-overlay_12.ncl
-----------------------------------------------------------------------------------
代码第25行起部分如下:
begin
;---Open file. You may need to include ".nc" at the end.
a = addfile("wrfout_d01_2003-07-15_00:00:00.nc","r")
;---Read variables directly (can also use "wrf_user_getvar")
hgt = a->HGT(0,:,:) ; terrain, 0 is the first time step
lat = a->XLAT(0,:,:) ; latitude
lon = a->XLONG(0,:,:) ; longitude
znu = a->ZNU ; eta values
dbz = wrf_user_getvar(a,"dbz",0) ; reflectivity
nlev = 1
print("Plotting at level " + znu(0,nlev))
|
|