error about array rearrangement

From: Yi-Chih Huang <dscpln_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 18 2013 - 17:32:30 MST

Hello,

    I am trying to rearrange the array dpcp by "dp(lat|:,lon|:,month|:) =
dpcp(month|:,lat|:,lon|:)". The dimensions of dpcp and dp are as follows.
 I believe the command would be working; but it ended up an error message
"fatal:Dimension size mismatch, dimension (0) of left hand side reference
does not have the same size as the right hand side reference after
subscripting." I wonder what was the problem with the command?

    Thanks much,

             Yi-Chih

#####
Variable: dpcp
Type: float
Total Size: 19968 bytes
            4992 values
Number of Dimensions: 3
Dimensions and sizes: [month | 4] x [lat | 24] x [lon | 52]
Coordinates:
            month: [5..8]
            lat: [-28.75..28.75]
            lon: [31.25..158.75]
Number Of Attributes: 17
  _FillValue : -9.96921e+36
  parent_stat : Mean
  statistic : Mean
  level_desc : Surface
  dataset : GPCP Version 2.2 Combined Precipitation Dataset
  var_desc : Precipitation
  least_significant_digit : 2
  precision : 32767
  missing_value : -9.96921e+36
  actual_range : ( 0, 9.985388e+29 )
  scale_factor : 1
  add_offset : 0
  units : mm/day
  valid_range : ( 0, 100 )
  long_name : Average Monthly Rate of Precipitation
  time_op_ncl : Climatology: 26 years
  info : function clmMonLLT: contributed.ncl

Variable: dp
Type: float
Total Size: 19968 bytes
            4992 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 24] x [lon | 52] x [month | 4]
Coordinates:
Number Of Attributes: 1
  _FillValue : 9.96921e+36
fatal:Dimension size mismatch, dimension (0) of left hand side reference
does not have the same size as the right hand side reference after
subscripting.
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 114 in
file regrEnso.ncl

#####
  dpcp= pcpE - pcpm
  copy_VarMeta(pcpm,dpcp)
printVarSummary(dpcp)

  dp!0= "lat"
  dp!1= "lon"
  dp!2= "month"
printVarSummary(dp)
  dpcp= dim_standardize_n_Wrap(dpcp, 0, 0)
  dp(lat|:,lon|:,month|:) = dpcp(month|:,lat|:,lon|:)
  rc = regCoef(index,dp) ; rc(nlat,nlon)

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 18 17:32:40 2013

This archive was generated by hypermail 2.1.8 : Mon Jan 06 2014 - 13:02:23 MST