- 积分
- 5151
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-3-30
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2015-1-8 16:16:50
|
显示全部楼层
非常不好意思,真是刚刚学。但是我改过了以后,生成的wrf.nc里面没有数据(如果不做插值)。做插值后就不生成wrf.nc了
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
a = addfile("wrfout_d01_2014-04-01_00:00:00.nc","r")
U=wrf_user_getvar(a,"tc",-1)
nz=38
ny=90
nx=90
nt=493
ntim = -1
U_in=new((/nz,ny,nx,nt/),"float")
H=wrf_user_getvar(a,"height",ntim)
U_in=wrf_user_intrp3d(U,H,"h",100,0.,False)
;nz=30
ncf = addfile("wrf.nc","c")
;filedimdef( ncf, "time", -1,Ture )
dim_names = (/ "lon", "lat", "lev", "time" /)
dim_sizes = (/ nx , ny , nz , nt /)
dimUnlim = (/ False , False, False , False /)
filedimdef( ncf, dim_names, dim_sizes, dimUnlim )
;printVarSummary(U_in)
end
错误
fatal:Number of dimensions on right hand side do not match number of dimension in left hand side
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 15 in file read.ncl |
|