def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() main_db = conn[seims_cfg.spatial_db] extract_spatial_parameters(seims_cfg, main_db)
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() ImportWeightData.workflow(seims_cfg, conn) client.close()
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() main_db = conn[seims_cfg.spatial_db] ImportParam2Mongo.workflow(seims_cfg, main_db) client.close()
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() maindb = conn[seims_cfg.spatial_db] ImportReaches2Mongo.generate_reach_table(seims_cfg, maindb) client.close()
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() maindb = conn[seims_cfg.spatial_db] scenariodb = conn[seims_cfg.bmp_scenario_db] ImportScenario2Mongo.scenario_from_texts(seims_cfg, maindb, scenariodb) client.close()
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() hydroclim_db = conn[seims_cfg.climate_db] site_m = HydroClimateUtilClass.query_climate_sites(hydroclim_db, 'M') site_p = HydroClimateUtilClass.query_climate_sites(hydroclim_db, 'P') client.close()
def workflow(): """Main entrance for the whole preprocessing workflow""" start_time = time.time() # Parse Configuration file seims_cfg = parse_ini_configuration() # Spatial delineation by TauDEM SpatialDelineation.workflow(seims_cfg) # Import to MongoDB database ImportMongodbClass.workflow(seims_cfg) end_time = time.time() print("SEIMS preprocess done, time-consuming: %.2f seconds." % (end_time - start_time))
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration from seims.preprocess.db_mongodb import ConnectMongoDB seims_cfg = parse_ini_configuration() client = ConnectMongoDB(seims_cfg.hostname, seims_cfg.port) conn = client.get_conn() db = conn[seims_cfg.climate_db] import time st = time.time() ImportMeteoData.workflow(seims_cfg, db) et = time.time() print et - st client.close()
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration seims_cfg = parse_ini_configuration() SpatialDelineation.workflow(seims_cfg)
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration seims_cfg = parse_ini_configuration() MergeSubbasins.merge_to_downstream_qswat(seims_cfg)
def main(): """TEST CODE""" from seims.preprocess.config import parse_ini_configuration seims_cfg = parse_ini_configuration() ImportMongodbClass.workflow(seims_cfg)