[ncl-talk] assignment type missmatch
김가은
gaeun.kim0921 at gmail.com
Wed Aug 31 05:07:26 MDT 2016
Hi
I have been tried 'copy_VarCoords' several times and in this way it
normally works. but this time I cannot!
below is ncl script I wrote:
begin
shp1 = "/home/pknu/pknuicon/util/KOR_adm/KOR_adm1.shp"
o = addfile("/home/pknu/pknuicon/util/GLOBAL_FRLAND.nc","r")
oro = o->fr(0,:,:)
a1 = addfile("./ensmean/icon_T2M_2016SON_compare.grb","r")
i_data = a1->TMP_P1_L103_GLL0
time=a1->initial_time0_hours
lon=a1->lon_0
lat=a1->lat_0
nlon=dimsizes(lon)
nlat=dimsizes(lat)
lon at units="degrees_east"
lat at units="degrees_north"
i_data&lon_0=lon
i_data&lat_0=lat
i_data&initial_time0_hours=time
i_temp = i_data
do n = 1, 3
i_temp(n-1,:,:) = i_data(n-1,:,:)
i_temp(n-1,:,:) = i_temp(n-1,:,:) - 273.16
i_temp(n-1,:,:) = where(oro.gt.0.5,i_temp(n-1,:,:),i_temp at _FillValue)
end do
printVarSummary(i_temp)
b1 = addfile("./gme_out/gme_T2M_2016SON_compare.grb","r")
g_data = b1->T_GDS0_HTGL
printVarSummary(g_data)
copy_VarCoords(i_temp, g_data)
g_temp = g_data
do n = 1, 3
g_temp(n-1,:,:) = g_data(n-1,:,:)
g_temp(n-1,:,:) = g_temp(n-1,:,:) - 273.16
g_temp(n-1,:,:) = where(oro.gt.0.5,g_temp(n-1,:,:),g_temp at _FillValue)
end do
temp_diff = i_temp - g_temp
temp_diff at units = "degree C"
and I keep getting this error message:
Variable: i_data
Type: float
Total Size: 4870800 bytes
1217700 values
Number of Dimensions: 3
Dimensions and sizes: [initial_time0_hours | 3] x [lat_0 | 451] x [lon_0 |
900]
Coordinates:
initial_time0_hours: [1899264..1900728]
lat_0: [-90..90]
lon_0: [ 0..359.6]
Number Of Attributes: 12
center : Offenbach (RSMC)
production_status : Operational products
long_name : Temperature
units : K
_FillValue : 1e+20
grid_type : Latitude/longitude
parameter_discipline_and_category : Meteorological products, Temperature
parameter_template_discipline_category_number : ( 1, 0, 0, 0 )
level_type : Specified height level above ground (m)
level : 2
forecast_time : 0
forecast_time_units : hours
Variable: g_data
Type: float
Total Size: 4870800 bytes
1217700 values
Number of Dimensions: 3
Dimensions and sizes: [forecast_time0 | 3] x [g0_lat_1 | 451] x [g0_lon_2 |
900]
Coordinates:
forecast_time0: [1008..2472]
g0_lat_1: [-90..90]
g0_lon_2: [ 0..359.6]
Number Of Attributes: 10
center : Offenbach (RSMC)
long_name : temperature
units : K
_FillValue : 1e+20
level_indicator : 105
gds_grid_type : 0
parameter_table_version : 2
parameter_number : 11
level : 2
initial_time : 07/21/2016 (00:00)
fatal:["NclVar.c":1382]:Assignment type mismatch, right hand side can't be
coerced to type of left hand side
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 195 in
file $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 40 in file
6.compare_monthly.ncl
thanks for your help!
Gaeun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160831/672f3ecd/attachment.html
More information about the ncl-talk
mailing list