- 积分
- 79
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-12-6
- 最后登录
- 1970-1-1
![未绑定新浪微博用户 新浪微博达人勋](source/plugin/sina_login/img/gray.png)
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
使用NCL的ESMF_regrid将CESM不规则网格数据插值到1°*1°出现如下报错
fatal:Could not create (source_grid_file.nc)
warning:FileSetFileOption: invalid file or format
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 1646 in file /NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 3882 in file /NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 4010 in file /NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 88 in file TEMP_global_annual.ncl
运行代码如下:
TEMP4=new((/1032,180,360/),"double")
; read variables with multi-files
;in = addfiles(file_names(0:1), "r")
do i=1,file_num-1
in = addfile (file_names(i), "r")
type1 = systemfunc("aa="+file_names(i) +" ; echo ${aa#*g16.}")
type2 = systemfunc("aa="+type1+" ; echo ${aa%.pop*}")
if i .eq. 0 then
TEMP = in ->TEMP(840:,0,:,:)
time = in->time(840:)
else
TEMP = in ->TEMP(:,0,:,:)
time = in->time
end if
printVarSummary(TEMP)
lat_in = in->TLAT
lon_in = in->TLONG
lev = in->z_t
delete(in)
lon = lonGlobeF(360, "lon", "longitude", "degrees_east")
lat = latGlobeF(180, "lat", "latitude", "degrees_north")
Opt = True
Opt@DstGridLat = lat
Opt@DstGridLon = lon
Opt@ForceOverwrite = True
Opt@RemoveSrcFile = True
Opt@RemoveDstFile = True
Opt@RemveoWgtFile = True
Opt@RemovePETLog = True
Opt@SrcRegional = False ; These are necessary
Opt@DstRegional = True
if (typeof(lon_in).eq."double") then
lat_mid=doubletofloat(lat_in)
lon_mid=doubletofloat(lon_in)
copy_VarAtts(lat_in, lat_mid)
copy_VarAtts(lon_in, lon_mid)
; printVarSummary(lon_mid)
Opt@SrcGridLat := lat_mid
Opt@SrcGridLon := lon_mid
delete(lon_mid)
delete(lat_mid)
else
Opt@SrcGridLat := lat_in
Opt@SrcGridLon := lon_in
end if
TEMP1=TEMP(0,:,:)
printVarSummary(TEMP1)
Opt@SrcGridMask = where(.not.ismissing(TEMP1),1,0) ; use SrcMask2D in NCL V6.2.1 and earlier
; Opt@InterpMethod = "conserve" ; Default is bilinear
TEMP4 = ESMF_regrid(TEMP,Opt) ; Do the regridding 得到TEMP(time,lat,lon)
求大神给看看是什么问题。
|
|