def main(): args = radstore_client.parse_cmdline(sys.argv, cmd=False) if 'query' in args: q = simplejson.loads(args['query']) prods = radstore_client.Product.query().filter(type='vol.slice:latlon:csv', **q).all() process(prods) print "done."
def main(): args = radstore_client.parse_cmdline(sys.argv, cmd=False) if 'query' in args: q = simplejson.loads(args['query']) typ = q.get('type','vol.slice:geotiff').split(':')[0] prods = radstore_client.Product.query().filter(**q).all() process(prods, typ, forced='forced' in args) print "done."
def main(): cmd, args = radstore_client.parse_cmdline(sys.argv) if cmd == 'to_latlon': print "to_latlon %s" % args['source'] prod = radstore_client.Product.get(args['source']) convert(prod) elif cmd == 'to_latlon_multiple': q = json.loads(params['query']) for prod in radstore_client.Product.query().filter(type='vol', **q).all(): print "to_latlon %s" % prod._id convert(prod)
def main(): cmd, args = radstore_client.parse_cmdline(sys.argv) # clean all #os.system('rm fs/*') if cmd == "import_file": upload(args['file']) elif cmd == "import_dir": pattern = os.path.join(args['dir'], args.get('pattern', '')) for fname in glob.glob(pattern): try: upload(fname) except Exception, e: print "ERROR: %s" % e
def main(): cmd, args = radstore_client.parse_cmdline(sys.argv) # clean all #os.system('rm fs/*') if cmd == "import_file": upload(args['file']) elif cmd == "import_dir": pattern = os.path.join(args['dir'],args.get('pattern','')) for fname in glob.glob(pattern): try: upload(fname) except Exception,e: print "ERROR: %s" % e
def main(): args = radstore_client.parse_cmdline(sys.argv, cmd=False) if 'id' in args: print "convert to csv: %s" % args['id'] prod = radstore_client.Product.get(args['id']) convert(prod) elif 'query' in args: q = simplejson.loads(args['query']) for prod in radstore_client.Product.query().filter(type='vol', **q).all(): if radstore_client.Product.query().filter(datetime=prod.datetime, variable=prod.variable,type='vol.slice:latlon:csv').exists(): print "\texists" continue try: print "convert to csv: %s" % prod._id convert(prod) except KeyboardInterrupt: return except: pass
def main(): cmd,args = radstore_client.parse_cmdline(sys.argv) if cmd == 'multislice': aggregate_multislice(**args)
def main(): cmd,args = radstore_client.parse_cmdline(sys.argv) if cmd == 'aggregate': aggregate(**args)