You may not have the latest version of ncl so the ":=" may not work for
you. You can try defining a new array and then deleting the old one.
temp = dpcp(lat|:,lon|:,month|:)
delete(dpcp)
dpcp = temp
delete(temp)
Maria
> Hello Maria,
>
>     Thanks much for the suggestion.  But the result is as follows after I
> gave "dpcp := dpcp(lat|:,lon|:,month|:)".  Any thought?
>
> fatal:["Execute.c":7270]:performASSIGN_VAR_VAR_OP: dpcp is undefined
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 96 in
> file
> regrEnso.ncl
>
>     Thanks,
>
>             Yi-Chih
>
>
> On Thu, Dec 19, 2013 at 1:53 PM, <mgehne@ucar.edu> wrote:
>
>> Hi Yi-Chih,
>>
>> try replacing your line
>> dp(lat|:,lon|:,month|:) = dpcp(month|:,lat|:,lon|:)
>> with
>> dpcp := dpcp(lat|:,lon|:,month|:)
>>
>> This changes the order of dimensions of dpcp to match the order of
>> dimensions of dp.
>>
>> I hope this helps,
>> Maria
>>
>>
>> > 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
>> >
>>
>>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 19 09:39:26 2013
This archive was generated by hypermail 2.1.8 : Mon Jan 06 2014 - 13:02:23 MST