urls_eng = find_urls(base, '.*2S_eng.nc$') urls_sci = find_urls(base, '.*10S_sci.nc$') urls = urls_eng + urls_sci files = [] if len(urls) > 0: for url in sorted(urls): file = '/'.join(url.split('/')[-3:]) files.append(file) setattr(cl, p + '_files', files) setattr(cl, p + '_startDatetime', startdate) setattr(cl, p + '_endDatetime', enddate) except FileNotFound: continue # Execute the load cl.process_command_line() if cl.args.test: cl.loadTethys(stride=100) else: cl.loadTethys() # Add any X3D Terrain information specified in the constructor to the database - must be done after a load is executed cl.addTerrainResources() print "All Done."
urls = urls_eng + urls_sci files = [] if len(urls) > 0 : for url in sorted(urls): file = '/'.join(url.split('/')[-3:]) files.append(file) setattr(cl, p + '_files', files) setattr(cl, p + '_startDatetime', startdate) setattr(cl, p + '_endDatetime', enddate) except FileNotFound: continue # Execute the load cl.process_command_line() if cl.args.test: cl.loadTethys(stride=100) else: cl.loadTethys() # Add any X3D Terrain information specified in the constructor to the database - must be done after a load is executed cl.addTerrainResources() print "All Done."