Minus: Dimension size, for dimension number 1, of operands does not match, can't continue

From: wei huang <whua27_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 05 2011 - 11:40:34 MDT

Hi,

I’m facing problem when I calculate the difference b/w the two variables
from different datasets

    U = u1New

    U = u-u1New
    printVarSummary(U),
where the variable u is from NCEP and u1New is from ECMWF data;

And the error is

fatal:Minus: Dimension size, for dimension number 1, of operands does not
match, can't continue

I have also used the function (i.e. linint2_Wrap) for solving the problem
but could not succeed and got error:

    u1New!0 = "time"

    u1New!1 = "lat"

    u1New!2 = "lon"

    newlat = fspan(-60.,60.,94)

    newlon = fspan(0.,355.5,192)

    newlat@units = "degrees_north"

    newlon@units = "degrees_east"

    u1New = linint2_Wrap (u1New&lon, u1New&lat, u1New, True, newlon,newlat,
0)

    printVarSummary(u1New)

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

Kindly, could anyone give me some clue to solving this problem.

Thanks advance,

wei

*******************************************

Variable: u

Type: float

Total Size: 866304 bytes

            216576 values

Number of Dimensions: 3

Dimensions and sizes: [time | 12] x [lat | 94] x [lon | 192]

Coordinates:

            time: [1840824..1848840]

            lat: [88.542..-88.542]

            lon: [ 0..358.125]

Number Of Attributes: 18

  long_name : Monthly Mean of Latent Heat Net Flux at Surface

  unpacked_valid_range : ( -2420, 2420 )

  actual_range : ( -265.7767, 618.1484 )

  units : mm/day

  _FillValue : -32767

  precision : 1

  least_significant_digit : 0

  GRIB_id : 121

  GRIB_name : LHTFL

  var_desc : Latent Heat Net Flux

  dataset : NCEP/DOE AMIP-II Reanalysis (Reanalysis-2) Monthly Averages

  level_desc : Surface

  statistic : Mean

  parent_stat : Individual Obs

  standard_name : surface_upward_latent_heat_flux

  cell_methods : time: mean (of each 6-hourly interval) mean (monthly
of 6-hourly means)

  valid_range : ( -2420, 2419.9 )

  missing_value : -32767

Variable: u1New

Type: float

Total Size: 1393920 bytes

            348480 values

Number of Dimensions: 3

Dimensions and sizes: [time | 12] x [lat | 121] x [lon | 240]

Coordinates:

            time: [964251..972267]

            lat: [-90..90]

            lon: [ 0..358.5]

Number Of Attributes: 4

  missing_value : -32767

  long_name : Total precipitation

  units : m

  _FillValue : -32767

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 5 11:40:41 2011

This archive was generated by hypermail 2.1.8 : Tue Jul 12 2011 - 15:03:53 MDT