def test_instantiate(): c = topoflow_driver.topoflow_driver() c.CCA = False c.DEBUG = False #----------------------------------------- # This function adjusts for the platform # and can be changed in "tf_utils.py". #----------------------------------------- cfg_directory = tf_utils.TF_Test_Directory() cfg_prefix = tf_utils.TF_Test_Case_Prefix() c.site_prefix = 'Treynor' ############# #------------------------------------------- # Call initialize() and call update() once #------------------------------------------- ## print 'STATUS =', c.get_status() ## c.initialize( mode="driver" ) ## print 'STATUS =', c.get_status() ## time_sec = np.float64(0) ## c.update(time_sec) ## print 'STATUS =', c.get_status() c.run_model( cfg_directory=cfg_directory, cfg_prefix=cfg_prefix )
def test_instantiate(): c = topoflow_driver.topoflow_driver() c.CCA = False c.DEBUG = False # ----------------------------------------- # This function adjusts for the platform # and can be changed in "tf_utils.py". # ----------------------------------------- cfg_directory = tf_utils.TF_Test_Directory() cfg_prefix = tf_utils.TF_Test_Case_Prefix() c.site_prefix = "Treynor" ############# # ------------------------------------------- # Call initialize() and call update() once # ------------------------------------------- ## print 'STATUS =', c.get_status() ## c.initialize( mode="driver" ) ## print 'STATUS =', c.get_status() ## time_sec = np.float64(0) ## c.update(time_sec) ## print 'STATUS =', c.get_status() c.run_model(cfg_directory=cfg_directory, cfg_prefix=cfg_prefix)
from topoflow.components import soil_base # just functions called by infil_richards_1D soil = soil_base.soil_base() soil.initialize() ################################################################################## from topoflow.components import topoflow_driver import numpy as np topo = topoflow_driver.topoflow_driver() topo.Q_outlet = np.array(1) # numpy array topo.initialize(cfg_file = "cfg/Treynor_topoflow.cfg") topo.update() # topo.finalize() # prints reports and logs, wants to know variables from other components ################################################################################## from topoflow.components import d8_global d8 = d8_global.d8_component()
def __init__(self): self.bmi = topoflow_driver.topoflow_driver()