Skip to content

Instantly share code, notes, and snippets.

@eightysteele
Created August 13, 2011 22:55
Show Gist options
  • Select an option

  • Save eightysteele/1144340 to your computer and use it in GitHub Desktop.

Select an option

Save eightysteele/1144340 to your computer and use it in GitHub Desktop.
[dict(cellkey=k, doc=simplejson.dumps(cells[k])) for k in cells.keys()]
@tucotuco
Copy link
Copy Markdown

for row in dr:
    cellkey = row.get('CellKey')
    if not cells.has_key(cellkey):
        cells[cellkey] = {
            '_id': cellkey,
            't': options.key,  # tile number
            'b': getboundingbox(cellkey, cells_per_degree), # boundingbox 
            'v': {}  # dictionary of variables (tmean1,...tmin1,...tmax1,...alt,...prec1,...bio1,...)
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment