google-code-export / ccc-gistemp

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

Station selection in gridding step sometimes incorrectly misses stations. #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Gavin Schmidt writes in e-mail:

the 'large regions' are not
defined to be quite large enough to catch all stations within the
radius.

In GISTEMP_sources, this is defined in to.SBBXgrid.f subroutine
GRIDEA, and in the ccc-gistemp-0.6.1 code it is in step3.py, function
iter_subbox_grid. It's easiest to modify the ccc code, and a change to
enlarge the regions (not that this is necessarily optimal), could be
swapping this:

       extent = [box[0] - arcdeg,
                 box[1] + arcdeg,
                 box[2] - 0.5* (box[3] - box[2]),
                 box[3] + 0.5* (box[3] - box[2])]
       if box[0] <= -90 or box[1] >= 90:
           # polar
           extent[2] = -180.0
           extent[3] = +180.0

to:

       extent = [box[0] - 2*arcdeg,
                 box[1] + 2*arcdeg,
                 -180.0 ),
                 +180.0 )]

(this ensures that the great circle of radius arcdeg is always
enclosed within extent - you could come up with a stricter formula
though).

The differences are in the hundredths of a degree on the monthly
plots, and do make the odd difference to the global or hemispheric
means. Nothing discernable though.

Original issue reported on code.google.com by d...@ravenbrook.com on 30 Nov 2010 at 3:22

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
An investigation reveals that in fact, we can never incorrectly miss a station. 
see blog post: http://clearclimatecode.org/gavins-bug/

I removed the code anyway. r668.

Original comment by d...@ravenbrook.com on 7 Jan 2011 at 5:29

GoogleCodeExporter commented 9 years ago
I created Issue 102 to describe the underlying bug: that the code is unclear.  
(It's fixed).

Original comment by d...@ravenbrook.com on 10 Jan 2011 at 8:45