def test_instantiate():

    c = channels_dynamic_wave.channels_component()
    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 = float64(0)
##    c.update(time_sec)
##    print 'STATUS =', c.get_status()

    c.run_model( cfg_directory=cfg_directory,
                 cfg_prefix=cfg_prefix )
示例#2
0
def test_instantiate():

    c = channels_dynamic_wave.channels_component()
    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 = float64(0)
    ##    c.update(time_sec)
    ##    print 'STATUS =', c.get_status()

    c.run_model(cfg_directory=cfg_directory, cfg_prefix=cfg_prefix)
示例#3
0
wave.GW = 0
wave.IN = 0
wave.MR = 0
wave.rho_H2O = 1000
wave.S_free = S_free
wave.update()

wave.finalize()


##################################################################################

from topoflow.components import channels_dynamic_wave

# Dynamic Wave
wave = channels_dynamic_wave.channels_component()

wave.initialize(cfg_file="cfg/Treynor_channels_dynamic_wave.cfg")

# declared variable dinv inside chanels_dynamic_wave.py - don't know what this is and not defined in ANY file in the repo
wave.P_rain = 100
wave.SM = 0
wave.ET = 0
wave.GW = 0
wave.IN = 0
wave.MR = 0
wave.rho_H2O = 1000
wave.S_free = S_free
wave.update()

wave.finalize()