Re: Error: Dimension sizes on right hand side of assignment do not match sizes of left hand side

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 05 2013 - 19:31:53 MST

Line 108 is:

108 prob(:,:,:,nmo) = rtest(ccr(:,:,:,0:mxlag), Nr,0)

When you get an error like this with the line #, you should
add some debug type statements before the line with the error message;

      printVarSummary(prob(:,:,:,nmo)) ; this is 3d
      xxx = rtest(ccr(:,:,:,0:mxlag), Nr,0) ; how many dimensions?
      printVarSummary(xxx) ; what r the sizes?
                                       ; do they match prob(:,:,:,nmo)?

      prob(:,:,:,nmo) = rtest(ccr(:,:,:,0:mxlag), Nr,0)

On 3/5/13 4:29 AM, Nkese Mc Shine wrote:
> Dear All,
>
> I am trying to find the significant values of the monthly lag lead correlation of my monthly ssta data set and monthly precipitation anomalies data. However I am getting the error "Dimension sizes on right hand side of assignment do match sizes of left hand side" at the end. Attached is the script that I am using.
>
> Regards,
> Nkese.
>
> Copyright (C) 1995-2012 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.1.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> Variable: time1
> Type: double
> Total Size: 13344 bytes
> 1668 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 1668]
> Coordinates:
> time: [16383360..17601072]
> Number Of Attributes: 6
> long_name : Time
> bounds : time_bnds
> standard_name : time
> units : hours since 1-1-1 00:00:0.0
> actual_range : ( 16383360, 17601072 )
> delta_t : 0000-00-01 00:00:00
>
> Variable: sstnew
> Type: float
> Total Size: 432345600 bytes
> 108086400 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 180] x [lon | 360] x [time | 1668]
> Coordinates:
> lat: [89.5..-89.5]
> lon: [-179.5..179.5]
> time: [187001..200812]
> Number Of Attributes: 10
> description : HadISST 1.1 monthly average sea surface temperature
> actual_range : ( -1.8, 34.76296 )
> missing_value : -1e+30
> _FillValue : -1e+30
> scale_factor : 1
> cell_methods : time: lat: lon: mean
> add_offset : 0
> units : degC
> standard_name : sea_surface_temperature
> long_name : Monthly 1 degree resolution SST
> (0)
> (0) Monthly 1 degree resolution SST: min=-1.8 max=34.763
>
> Variable: sst_region
> Type: float
> Total Size: 45858336 bytes
> 11464584 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 82] x [lon | 191] x [time | 732]
> Coordinates:
> lat: [40.5..-40.5]
> lon: [-179.5..10.5]
> time: [194601..200612]
> Number Of Attributes: 10
> long_name : Monthly 1 degree resolution SST
> standard_name : sea_surface_temperature
> units : degC
> add_offset : 0
> cell_methods : time: lat: lon: mean
> scale_factor : 1
> _FillValue : -1e+30
> missing_value : -1e+30
> actual_range : ( -1.8, 34.76296 )
> description : HadISST 1.1 monthly average sea surface temperature
> (0)
> (0) Monthly 1 degree resolution SST: min=1.66987 max=32.8006
>
> Variable: sst_anom
> Type: float
> Total Size: 45858336 bytes
> 11464584 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 82] x [lon | 191] x [time | 732]
> Coordinates:
> lat: [40.5..-40.5]
> lon: [-179.5..10.5]
> time: [194601..200612]
> Number Of Attributes: 12
> anomaly_op_ncl : Annual Cycle Removed:function rmMonAnnCycLLT:contributed.ncl
> description : HadISST 1.1 monthly average sea surface temperature
> actual_range : ( -1.8, 34.76296 )
> missing_value : -1e+30
> _FillValue : -1e+30
> scale_factor : 1
> cell_methods : time: lat: lon: mean
> add_offset : 0
> units : degC
> standard_name : sea_surface_temperature
> long_name : Monthly 1 degree resolution SST
> reference : function rmMonAnnCycLLT in contrib.ncl
> (0)
> (0) Monthly 1 degree resolution SST: min=-4.30175 max=6.04899
>
> Variable: precipanom_data_ts
> Type: float
> Total Size: 2928 bytes
> 732 values
> Number of Dimensions: 1
> Dimensions and sizes: [732]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> warning:esccr: Non-fatal conditions encountered: all missing or constant values
>
> Variable: ccrmo1
> Type: float
> Total Size: 2255328 bytes
> 563832 values
> Number of Dimensions: 4
> Dimensions and sizes: [82] x [191] x [12] x [3]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
> (0)
> (0) min=-0.543301 max=0.549086
>
> Variable: ccrmo2
> Type: float
> Total Size: 2255328 bytes
> 563832 values
> Number of Dimensions: 4
> Dimensions and sizes: [82] x [191] x [12] x [3]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
> (0)
> (0) min=-0.543301 max=0.549086
> fatal:Dimension sizes on right hand side of assignment do not match dimension sizes of left hand side
>
> fatal:["Execute.c":7743]:Execute: Error occurred at or near line 108 in file hadsst3.ncl
>
>
> CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and/or privileged information. Any duplication, copying, distribution, dissemination, transmission, disclosure or use in any manner of this email (including any attachments) without the authorisation of the sender is strictly prohibited. If you receive this email (including any attachments) in error, please notify the sender and delete this email (including any attachments) from your system. Thank you.
>
>
>
>
> _______________________________________________
> 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 Tue Mar 5 19:31:55 2013

This archive was generated by hypermail 2.1.8 : Thu Mar 07 2013 - 08:55:58 MST