google-code-export / ccc-gistemp

Automatically exported from code.google.com/p/ccc-gistemp
Other
0 stars 0 forks source link

vischeck falls over when series is empty. #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example, running with only SCAR READER data (antarctic) will result in an 
empty global series:

$ nice python tool/run.py -p data_sources='scar' -s 0,1,3,5
====> STEPS 0, 1, 3, 5  ====
No ocean data; using land data only
Load SCAR records
Step 0: closing output file.
Step 1: closing output file.
Region (+64/+90 S/N -180/-090 W/E): 100 empty cells.
Region (+64/+90 S/N -090/+000 W/E): 100 empty cells.
Region (+64/+90 S/N +000/+090 W/E): 100 empty cells.
Region (+64/+90 S/N +090/+180 W/E): 100 empty cells.
Region (+44/+64 S/N -180/-135 W/E): 100 empty cells.
Region (+44/+64 S/N -135/-090 W/E): 100 empty cells.
Region (+44/+64 S/N -090/-045 W/E): 100 empty cells.
Region (+44/+64 S/N -045/+000 W/E): 100 empty cells.
Region (+44/+64 S/N +000/+045 W/E): 100 empty cells.
Region (+44/+64 S/N +045/+090 W/E): 100 empty cells.
Region (+44/+64 S/N +090/+135 W/E): 100 empty cells.
Region (+44/+64 S/N +135/+180 W/E): 100 empty cells.
Region (+24/+44 S/N -180/-150 W/E): 100 empty cells.
Region (+24/+44 S/N -150/-120 W/E): 100 empty cells.
Region (+24/+44 S/N -120/-090 W/E): 100 empty cells.
Region (+24/+44 S/N -090/-060 W/E): 100 empty cells.
Region (+24/+44 S/N -060/-030 W/E): 100 empty cells.
Region (+24/+44 S/N -030/+000 W/E): 100 empty cells.
Region (+24/+44 S/N +000/+030 W/E): 100 empty cells.
Region (+24/+44 S/N +030/+060 W/E): 100 empty cells.
Region (+24/+44 S/N +060/+090 W/E): 100 empty cells.
Region (+24/+44 S/N +090/+120 W/E): 100 empty cells.
Region (+24/+44 S/N +120/+150 W/E): 100 empty cells.
Region (+24/+44 S/N +150/+180 W/E): 100 empty cells.
Region (+00/+24 S/N -180/-158 W/E): 100 empty cells.
Region (+00/+24 S/N -158/-135 W/E): 100 empty cells.
Region (+00/+24 S/N -135/-112 W/E): 100 empty cells.
Region (+00/+24 S/N -112/-090 W/E): 100 empty cells.
Region (+00/+24 S/N -090/-068 W/E): 100 empty cells.
Region (+00/+24 S/N -068/-045 W/E): 100 empty cells.
Region (+00/+24 S/N -045/-022 W/E): 100 empty cells.
Region (+00/+24 S/N -022/+000 W/E): 100 empty cells.
Region (+00/+24 S/N +000/+022 W/E): 100 empty cells.
Region (+00/+24 S/N +022/+045 W/E): 100 empty cells.
Region (+00/+24 S/N +045/+068 W/E): 100 empty cells.
Region (+00/+24 S/N +068/+090 W/E): 100 empty cells.
Region (+00/+24 S/N +090/+112 W/E): 100 empty cells.
Region (+00/+24 S/N +112/+135 W/E): 100 empty cells.
Region (+00/+24 S/N +135/+158 W/E): 100 empty cells.
Region (+00/+24 S/N +158/+180 W/E): 100 empty cells.
Region (-24/-00 S/N -180/-158 W/E): 65 empty cells.
Region (-24/-00 S/N -158/-135 W/E): 42 empty cells.
Region (-24/-00 S/N -135/-112 W/E): 70 empty cells.
Region (-24/-00 S/N -112/-090 W/E): 85 empty cells.
Region (-24/-00 S/N -090/-068 W/E): 100 empty cells.
Region (-24/-00 S/N -068/-045 W/E): 100 empty cells.
Region (-24/-00 S/N -045/-022 W/E): 100 empty cells.
Region (-24/-00 S/N -022/+000 W/E): 100 empty cells.
Region (-24/-00 S/N +000/+022 W/E): 100 empty cells.
Region (-24/-00 S/N +022/+045 W/E): 100 empty cells.
Region (-24/-00 S/N +045/+068 W/E): 100 empty cells.
Region (-24/-00 S/N +068/+090 W/E): 100 empty cells.
Region (-24/-00 S/N +090/+112 W/E): 100 empty cells.
Region (-24/-00 S/N +112/+135 W/E): 100 empty cells.
Region (-24/-00 S/N +135/+158 W/E): 100 empty cells.
Region (-24/-00 S/N +158/+180 W/E): 95 empty cells.
Region (-44/-24 S/N -180/-150 W/E): 25 empty cells.
Region (-44/-24 S/N -150/-120 W/E): 37 empty cells.
Region (-44/-24 S/N -120/-090 W/E): 48 empty cells.
Region (-44/-24 S/N -090/-060 W/E): 27 empty cells.
Region (-44/-24 S/N -060/-030 W/E): 96 empty cells.
Region (-44/-24 S/N -030/+000 W/E): 37 empty cells.
Region (-44/-24 S/N +000/+030 W/E): 26 empty cells.
Region (-44/-24 S/N +030/+060 W/E): 62 empty cells.
Region (-44/-24 S/N +060/+090 W/E): 35 empty cells.
Region (-44/-24 S/N +090/+120 W/E): 47 empty cells.
Region (-44/-24 S/N +120/+150 W/E): 54 empty cells.
Region (-44/-24 S/N +150/+180 W/E): 54 empty cells.
Region (-64/-44 S/N -180/-135 W/E): 66 empty cells.
Region (-64/-44 S/N -135/-090 W/E): 96 empty cells.
Region (-64/-44 S/N -090/-045 W/E): 6 empty cells.
Region (-64/-44 S/N -045/+000 W/E): 20 empty cells.
Region (-64/-44 S/N +000/+045 W/E): 45 empty cells.
Region (-64/-44 S/N +045/+090 W/E): 1 empty cell.
Region (-64/-44 S/N +090/+135 W/E): 62 empty cells.
Region (-64/-44 S/N +135/+180 W/E): 1 empty cell.
Region (-90/-64 S/N -180/-090 W/E): 2 empty cells.
Region (-90/-64 S/N -090/+000 W/E): 0 empty cells.
Region (-90/-64 S/N +000/+090 W/E): 0 empty cells.
Region (-90/-64 S/N +090/+180 W/E): 0 empty cells.

Step3: closing output file
Step5: Closing box file
... running vischeck
Traceback (most recent call last):
  File "tool/run.py", line 280, in <module>
    sys.exit(main())
  File "tool/run.py", line 265, in main
    for _ in data:
  File "tool/run.py", line 116, in vischeck
    out = open(os.path.join('result', 'google-chart.url'), 'w'))
  File "/Users/drj/ccc-gistemp/tool/vischeck.py", line 344, in chartit
    url = asgooglechartURL(map(anom, fs), options)
  File "/Users/drj/ccc-gistemp/tool/vischeck.py", line 127, in asgooglechartURL
    ymin,ymax = reasonable_yscale(data)
  File "/Users/drj/ccc-gistemp/tool/vischeck.py", line 222, in reasonable_yscale
    datamin = min(allvalues)
ValueError: min() arg is an empty sequence

Original issue reported on code.google.com by d...@ravenbrook.com on 17 Dec 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Problem is that the series that vischeck is trying to plot is empty.  This 
shouldn't cause vischeck to fall over, and i guess it should produce an empty 
graph.

Original comment by d...@ravenbrook.com on 17 Dec 2010 at 10:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r648.

Original comment by d...@ravenbrook.com on 17 Dec 2010 at 11:53