comparison globalneighbors/grid.py @ 16:4583d0d9331a

stub command line entry for gridding neighbors
author Jeff Hammel <k0scist@gmail.com>
date Sun, 25 Jun 2017 15:03:54 -0700
parents 21095c9006e5
children 2fef925fbf37
comparison
equal deleted inserted replaced
15:21095c9006e5 16:4583d0d9331a
1 #!/usr/bin/env python
2
3 """
4 grid locations, for speed and fidelity
5 """
6
1 import math 7 import math
8 import sys
9 from .cli import CitiesParser
10 from .locations import locations
2 11
3 class LatLonGrid(object): 12 class LatLonGrid(object):
4 13
5 lat_range = (-90., 90) 14 lat_range = (-90., 90)
6 lon_range = (-180., 180) # however, this wraps around 15 lon_range = (-180., 180) # however, this wraps around
69 class GriddedLocations(object): 78 class GriddedLocations(object):
70 79
71 def __init__(self, locations): 80 def __init__(self, locations):
72 raise NotImplementedError('TODO') 81 raise NotImplementedError('TODO')
73 82
74 def main( 83 def main(args=sys.argv[1:]):
84 """CLI"""
85
86 # parse command line
87 parser = CitiesParser(description=__doc__)
88 options = parser.parse_args(args)
89
90 # read locations
91 city_locations = locations(parser.read_cities())
92
93 if __name__ == '__main__':
94 main()
95