[ncl-talk] help

Mary Haley haley at ucar.edu
Mon Aug 10 12:00:31 MDT 2015


Hi George,

Are you positive that the "time" dimensions on both files are the same
length? The error message is indicating otherwise.

You first call this:

  TIME = a->time

and then later:

  TIME = b->time

and the error is telling you that you are trying to assign some values to
the "TIME" array, which already exists, but with an array of a different
size.

You can force TIME to be a new array, by using the reassignment operator:

TIME := b->time

However, you should become familiar with your data before you start reading
and plotting it.  We always recommend that you use the "printVarSummary"
procedure to look at your data. You could do something like this, just for
debugging purposes:

printVarSummary(a->TIME)    ; Compare the output; are these two
printVarSummary(b->TIME)    ; arrays the same length?

Also, as a side, I noticed you are also calling this:

   time = a->time                                ; (time) ==> YYMM
   ntim = dimsizes(time)

...

   time = b->time                                ; (time) ==> YYMM
   ntim = dimsizes(time)

There's really no need to read the "time" arrays in twice. You can use the
original TIME array to get the size:

   ntim = dimsizes(TIME)
--Mary

On Sat, Aug 8, 2015 at 9:36 AM, george luke otieno <gotieno2000 at gmail.com>
wrote:

> Dear All
>
> I want to plot two variables *precip* and *precip1* from GPCP and GPCC, i
> see some cases in the ncl scripts where resources are set for each
> variable(Precip and Precip1) ,must i set resources for each variable. I am
> trying to use same resources for the variable but am being told
>
> "....Dimension sizes of left hand side and right hand side of assignment
> do not match..." especially  for reading GPCP data section...at line 54
>
> yet the datasets have same dimension
>
> attached below is my script
>
>
>
> Best Regards
> George Otieno
>
> Intergrated Climate System Modelling Lab.
> Department of Environmental Atmospheric Sciences
> 608-737, Room 4302, Chungmu-Building
> Pukyong National University,
> 45,Yongso-ro,Nam-gu, Busan, South Korea
> Tel. +82-51-629-6643
> Fax+82-51-629-7991
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150810/d219bc97/attachment.html 


More information about the ncl-talk mailing list