- 积分
- 328
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-6-7
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本人cmip5小白一枚,第一次用cmip5 的资料,对它的插值一窍不通,搜家园看到说ncl对cmip5的插值要用rcm2rgrid,但是出现了下面的错误:fatal:rcm2rgrid: The rightmost dimensions of fi must be nlat2d x nlon2d, where nlat2d and nlon2d are the dimensions of the lat2d/lon2d arraysfatal:["Execute.c":8638]:Execute: Error occurred at or near line 31
下面是我写的代码,麻烦各位大神帮我看看,是哪里的问题,
================================================================================
代码
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/csm/contributed.ncl"
begin
diri1="H:/work/data/CMIP5/historical/CMCC-CESM/"
fils1 = systemfunc("ls " + diri1 + "tos_Omon_CMCC-CESM_historical_r1i1p1_*-*")
;print(fils1)
f1=addfiles(fils1,"r")
ListSetType(f1,"cat")
tos=f1[:]->tos
;tos=lonPivot(tos,0.5)
printVarSummary(tos)
;print(tos)
;=============================插值================================
tos_lon=f1[:]->lon
tos_lat=f1[:]->lat
printVarSummary(tmp_lon)
print(tos_lon(0,0))
print(tos_lon(3873,181))
printVarSummary(tmp_lat)
print(tos_lat(0,0))
print(tos_lat(3873,181))
nlon=dimsizes(tos&i)
nlat=dimsizes(tos&j)
lon=fspan(tos_lon(0,0),tos_lon(3873,181),nlon)
lat=fspan(tos_lat(0,0),tos_lat(3873,181),nlat)
tos_new=rcm2rgrid(tos_lat,tos_lon,tos,lat,lon,0)
printVarSummary(tos_new)
end
===============================================================================
下面是资料说明
ncl 13> print(f1)
Variable: f1
Type: file
filename: tos_Omon_CMCC-CESM_historical_r1i1p1_185001-185512
path: H:/work/data/CMIP5/historical/CMCC-CESM/tos_Omon_CMCC-CESM_historical_r1i1p1_185001-185512.nc
file global attributes:
institution : CMCC - Centro Euro-Mediterraneo per i Cambiamenti Climatici, Bologna, Italy
institute_id : CMCC
experiment_id : historical
source : CMCC-CESM
model_id : CMCC-CESM
forcing : Nat,Ant,GHG,SA,Oz,Sl
parent_experiment_id : N/A
parent_experiment_rip : N/A
branch_time : 0
contact : Marcello Vichi (marcello.vichi@cmcc.it)
history : Model output postprocessed with Afterburner and CDO (https://code.zmaw.de/projects) 2012-08-22T10:29:27Z CMOR rewrote data to comply with CF standards and CMIP5 requirements.
comment : Equilibrium reached after more than 1500-year spin-up of the physics, 200-year spin-up of carbon content and 276 year at pre-industrial GHG concentrations after which data were output wit
h nominal date of January 1850.
references : model described in the documentation at http://www.cmcc.it/data-models/models
initialization_method : 1
physics_version : 1
tracking_id : 514477e5-91ea-49bb-9cb9-1e7b0305ab67
product : output
experiment : historical
frequency : mon
creation_date : 2012-08-22T10:29:27Z
Conventions : CF-1.4
project_id : CMIP5
table_id : Table Omon (27 April 2011) 340eddd4fd838d90fa9ffe1345ecbd73
title : CMCC-CESM model output prepared for CMIP5 historical
parent_experiment : N/A
modeling_realm : ocean
realization : 1
cmor_version : 2.7.1
dimensions:
time = 72 // unlimited
j = 149
i = 182
bnds = 2
vertices = 4
variables:
double time ( time )
bounds : time_bnds
units : days since 1850-01-01
calendar : standard
axis : T
long_name : time
standard_name : time
double time_bnds ( time, bnds )
integer j ( j )
units : 1
long_name : cell index along second dimension
integer i ( i )
units : 1
long_name : cell index along first dimension
float lat ( j, i )
standard_name : latitude
long_name : latitude coordinate
units : degrees_north
bounds : lat_vertices
float lon ( j, i )
standard_name : longitude
long_name : longitude coordinate
units : degrees_east
bounds : lon_vertices
float lat_vertices ( j, i, vertices )
units : degrees_north
float lon_vertices ( j, i, vertices )
units : degrees_east
float tos ( time, j, i )
standard_name : sea_surface_temperature
long_name : Sea Surface Temperature
comment : "this may differ from ""surface temperature"" in regions of sea ice."
units : K
original_name : sosstsst
original_units : degC
history : 2012-08-22T10:29:27Z altered by CMOR: Converted units from 'degC' to 'K'.
cell_methods : time: mean (interval: 1 month)
cell_measures : area: areacello
missing_value : 1e+20
_FillValue : 1e+20
associated_files : baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_ocean_fx_CMCC-CESM_historical_r0i0p0.nc areacello: areacello_fx_CMCC-CESM_historical_r0i0p0.n
c
coordinates : lat lon
|
|