コード例 #1
0
ファイル: sp_extraction.py プロジェクト: Shenfang1993/SEIMS-1
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)
コード例 #2
0
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()
コード例 #3
0
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()
コード例 #4
0
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()
コード例 #5
0
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()
コード例 #6
0
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()
コード例 #7
0
ファイル: main.py プロジェクト: Shenfang1993/SEIMS-1
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))
コード例 #8
0
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()
コード例 #9
0
def main():
    """TEST CODE"""
    from seims.preprocess.config import parse_ini_configuration
    seims_cfg = parse_ini_configuration()
    SpatialDelineation.workflow(seims_cfg)
コード例 #10
0
def main():
    """TEST CODE"""
    from seims.preprocess.config import parse_ini_configuration
    seims_cfg = parse_ini_configuration()
    MergeSubbasins.merge_to_downstream_qswat(seims_cfg)
コード例 #11
0
def main():
    """TEST CODE"""
    from seims.preprocess.config import parse_ini_configuration
    seims_cfg = parse_ini_configuration()

    ImportMongodbClass.workflow(seims_cfg)