[ncl-talk] warning:PlotManagerGetBB: Error setting view values for annotation

Beáta Szabó-Takács szabo.b at czechglobe.cz
Thu Jun 1 23:54:51 MDT 2017


Hi Mary,
Thank you very much for your suggestion. It fixed the bug.
Have a nice day,
Beata
From: Mary Haley [mailto:haley at ucar.edu]
Sent: Thursday, June 01, 2017 10:35 PM
To: Beáta Szabó-Takács <szabo.b at czechglobe.cz>
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] warning:PlotManagerGetBB: Error setting view values for annotation

Hi Beata,

The extra information you provided made it easy to debug this problem.

You are right that acos(1) should be valid.The issue is that even though the print statements are indicating the values are equal to 1, they are actually slightly greater than 1.

For example, taking acos of 1.00000001 will give you a nan, while a value of 1.0000001 won't:

ncl 3> print(acos(1.00000001))
(0)      0
ncl 4> print(acos(1.0000001))
(0)     nan
ncl 5>

The fix is to check CC for being > 1 and if it is, reset it to 1. You can add this one line to near the top of taylor_diagram in your taylor_diagram_lh.ncl file:


  CC = where(CC.gt.1,1,CC)



--Mary

On Thu, Jun 1, 2017 at 6:24 AM, Beáta Szabó-Takács <szabo.b at czechglobe.cz<mailto:szabo.b at czechglobe.cz>> wrote:

Dear Mary,

Meantime I found the bug. The matter is originated from the function:

 angle  = acos( CC(nc,:) ) in L141 in taylor_diagram_lh.ncl. If the value is equal or larger than 1 inside acos function the results will be nan. I printed the pattern_correlation values in power case. In summer season these values are smaller than 1:

Variable: CD_ccn

Type: float

Total Size: 20 bytes

            5 values

Number of Dimensions: 1

Dimensions and sizes:   [5]

Coordinates:

Number Of Attributes: 1

  _FillValue :  -999

(0)     0.9999999

(1)     0.9999999

(2)     0.9999999

(3)     0.9999999

(4)     0.9999999



but in winter season they are equal with 1:



Variable: CD_cc

Type: float

Total Size: 20 bytes

            5 values

Number of Dimensions: 1

Dimensions and sizes:   [5]

Coordinates:

Number Of Attributes: 1

  _FillValue :  -999

(0)     0.9691743

(1)      1

(2)      1

(3)      1

(4)      1



But I do not understand why the values cannot be 1.0 in acos function? In other programs e.g Maltlab or R the acos interval is [-1, 1].

Have a nice day,

Beata


From: Mary Haley [mailto:haley at ucar.edu<mailto:haley at ucar.edu>]
Sent: Wednesday, May 31, 2017 6:29 PM
To: Beáta Szabó-Takács <szabo.b at czechglobe.cz<mailto:szabo.b at czechglobe.cz>>

Subject: Re: [ncl-talk] warning:PlotManagerGetBB: Error setting view values for annotation

HI Beata,

I got the files, thanks.

Can you also email me the taylor_diagram_lh.ncl and taylor_metrics_table.ncl files you're using?

​--Mary
​


On Wed, May 31, 2017 at 12:12 AM, Beáta Szabó-Takács <szabo.b at czechglobe.cz<mailto:szabo.b at czechglobe.cz>> wrote:
Dear Mary,
Sorry, I forgot to add the reference (observed) data to the dictionary in the previous email. I attched it, as well.
Kind regards,
Beata

From: Mary Haley [mailto:haley at ucar.edu<mailto:haley at ucar.edu>]
Sent: Tuesday, May 30, 2017 8:41 PM
To: Beáta Szabó-Takács <szabo.b at czechglobe.cz<mailto:szabo.b at czechglobe.cz>>
Cc: ncl-talk (ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>) <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>>
Subject: Re: [ncl-talk] warning:PlotManagerGetBB: Error setting view values for annotation

Beáta,

The warning you're getting is a weird one that we don't see very often.

I can't remember at the moment what causes it, but after looking at your taylor_1.ncl script, I think the problem is likely in our taylor_diagram code and not your code. I think it's a weird case of taylor_diagram trying to modify a font height after the plot has already been drawn,

Unfortunately, I need your datasets in order to debug this.

Is it possible to provide all your data files?  If not, can you trim this example down a little and just provide some of the files?'

Or, if could simply write all the required variables to separate files, that way you don't have to provide the whole file.

For example, since you need all of these variables:

  p1 = a->pr
  p2 = b->pr
  p3 = c->pr
  p4 = d->pr
  p5 = e->pr
  p6 = f->pr
  p7 = g->pr
  p8 = h->pr
  p9 = i->pr
  p10 = j->pr
  p11 = k->pr
  p12 = l->pr
  p13 = m->pr
  p14 = n->pr
  p15 = o->pr
  p16 = q->pr
  p17 = a1->pr
  p18 = b1->pr
  p19 = c1->pr
  p20 = d1->pr
  p21 = e1->pr
  date = a->time

what you can do is add this code to your script to write out the required variables, and then send me all of the *nc files if they are not too large:

  p1_out = addfile("p1.nc<http://p1.nc>","c")
  p1_out->p1 = p1

  p2_out = addfile("p2.nc<http://p2.nc>","c")
  p2_out->p2 = p2

  p3_out = addfile("p3.nc<http://p3.nc>","c")
  p3_out->p3 = p3

  p4_out = addfile("p4.nc<http://p4.nc>","c")
  p4_out->p4 = p4

  p5_out = addfile("p5.nc<http://p5.nc>","c")
  p5_out->p5 = p5

  p6_out = addfile("p6.nc<http://p6.nc>","c")
  p6_out->p6 = p6

  p7_out = addfile("p7.nc<http://p7.nc>","c")
  p7_out->p7 = p7

  p8_out = addfile("p8.nc<http://p8.nc>","c")
  p8_out->p8 = p8

  p9_out = addfile("p9.nc<http://p9.nc>","c")
  p9_out->p9 = p9

  p10_out = addfile("p10.nc<http://p10.nc>","c")
  p10_out->p10 = p10

  p11_out = addfile("p11.nc<http://p11.nc>","c")
  p11_out->p11 = p11

  p12_out = addfile("p12.nc<http://p12.nc>","c")
  p12_out->p12 = p12

  p13_out = addfile("p13.nc<http://p13.nc>","c")
  p13_out->p13 = p13

  p14_out = addfile("p14.nc<http://p14.nc>","c")
  p14_out->p14 = p14

  p15_out = addfile("p15.nc<http://p15.nc>","c")
  p15_out->p15 = p15

  p16_out = addfile("p16.nc<http://p16.nc>","c")
  p16_out->p16 = p16

  p17_out = addfile("p17.nc<http://p17.nc>","c")
  p17_out->p17 = p17

  p18_out = addfile("p18.nc<http://p18.nc>","c")
  p18_out->p18 = p18

  p19_out = addfile("p19.nc<http://p19.nc>","c")
  p19_out->p19 = p19

  p20_out = addfile("p20.nc<http://p20.nc>","c")
  p20_out->p20 = p20

  p21_out = addfile("p21.nc<http://p21.nc>","c")
  p21_out->p21 = p21

  date_out = addfile("date.nc<http://date.nc>","c")
  date_out->date = date



Thanks,

--Mary



On Tue, May 30, 2017 at 7:14 AM, Beáta Szabó-Takács <szabo.b at czechglobe.cz<mailto:szabo.b at czechglobe.cz>> wrote:
Dear NCL Users,

I created a taylor diagram where some value are not visible and I got the following warning messages:

warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerGetBB: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerPreDraw: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerPreDraw: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerPreDraw: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerPreDraw: Error setting view values for annotation
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:PlotManagerSetValues: Error setting annotation values
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests
warning:TextItemSetValues: Can not change x,y,width,and height when other text attribute changes have been requested also, preceding with other text attribute requests

I think this message stream from the fact that some ratio value are too close to each other. I attached my script, the resulted taylor diagram and cam metric table about ratio.
Could someone suggest me a soultion?

Thank you for your help in advance!
Kind regards,
Beata

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto: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/20170602/926cde43/attachment.html 


More information about the ncl-talk mailing list