Re: fatal:Dimension sizes of left hand side and right hand side of assignment do not match

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 02 2014 - 15:29:20 MDT

Vanucia,

Can add:

printVarSummary(new_lon)
printVarSummary(new_lat)
printVarSummary(new_var)

before line:

file_create->media = new_var

and send the output to us?

Thanks,

Wei

On Mon, Jun 2, 2014 at 6:19 AM, Vanúcia Schumacher <
vanucia-schumacher@hotmail.com> wrote:

> I tried to change the resolution of the data to 2 degrees and I'm unable
> to find the solution error:
>
> fatal:Could not create (teste2.nc)
> fatal:Dimension sizes of left hand side and right hand side of assignment
> do not match
>
> 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"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>
> begin
> file_name =
> addfile("sit_OImon_CanCM4_decadal1980_r1i1p1_198101-199012.nc", "r")
> var = file_name->sit
> file_create = addfile("teste2.nc", "c")
> new_lon = fspan(0, 357, 180)
> new_lat = fspan(-87.86, 87.86, 90)
> new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)
> new_var!0 ="lat"
> new_var!1 = "lon"
> new_var&lat = new_lat
> new_var&lon = new_lon
> new_var&lat@units = "degrees_north"
> new_var&lon@units = "degrees_east"
> file_create->media = new_var
> end
>
> print data:
>
> dimensions:
> time = 120 // unlimited
> lat = 64
> lon = 128
> bnds = 2
> variables:
> double time ( time )
> bounds : time_bnds
> units : days since 1850-1-1
> calendar : 365_day
> axis : T
> long_name : time
> standard_name : time
>
> double time_bnds ( time, bnds )
>
> double lat ( lat )
> bounds : lat_bnds
> units : degrees_north
> axis : Y
> long_name : latitude
> standard_name : latitude
>
> double lat_bnds ( lat, bnds )
>
> double lon ( lon )
> bounds : lon_bnds
> units : degrees_east
> axis : X
> long_name : longitude
> standard_name : longitude
>
> double lon_bnds ( lon, bnds )
>
> float sit ( time, lat, lon )
> standard_name : sea_ice_thickness
> long_name : Sea Ice Thickness
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 2 15:29:52 2014

This archive was generated by hypermail 2.1.8 : Tue Jun 03 2014 - 11:40:09 MDT