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(): d = diversions_fraction_method.diversions_component() d.CCA = False d.DEBUG = False #----------------------------------------- # This function adjusts for the platform # and can be changed in "tf_utils.py". #----------------------------------------- cfg_directory = tf_utils.TF_Test_Directory() os.chdir(cfg_directory) cfg_prefix = tf_utils.TF_Test_Case_Prefix() d.site_prefix = 'Treynor' ############# ## d.run_model( cfg_directory=cfg_directory, ## cfg_prefix=cfg_prefix ) d.initialize(cfg_prefix=cfg_prefix, mode="driver") print 'use_sources =', d.use_sources print 'use_sinks =', d.use_sinks print 'use_canals =', d.use_canals print ' ' print 'source_file =', d.source_file print 'sink_file =', d.sink_file print 'canal_file =', d.canal_file print 'Finished with unit_test().'
def test_instantiate(): c = channels_base.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 = c.initialize_scalar() ## c.update(time_sec) ## print 'STATUS =', c.get_status() c.run_model(cfg_directory=cfg_directory, cfg_prefix=cfg_prefix) print(' ') print('------------------------------------------------------') print(' WARNING! Running unit_test() for channels_base.py') print(' so all velocities will be zero.') print('------------------------------------------------------') print(' ')
def test_instantiate(soil_type='sandy_loam'): soil = soil_base.soil_base(soil_type=soil_type) soil.CCA = False soil.DEBUG = False #----------------------------------------- # This function adjusts for the platform # and can be changed in "tf_utils.py". #----------------------------------------- cfg_directory = tf_utils.TF_Test_Directory() os.chdir(cfg_directory) cfg_prefix = tf_utils.TF_Test_Case_Prefix() soil.site_prefix = 'Treynor' ############# soil.initialize(cfg_prefix=cfg_prefix, REPORT=True) print('soil_type =', c.soil_type) print('Note: t_r < t_H < t_w < t_f < t_i < t_u < t_s') print(' ') print('theta_r =', soil.theta_r) # ("absolute" min) print('theta_H =', soil.theta_H) # (achievable min) print('theta_w =', soil.theta_w) print('theta_f =', soil.theta_f) print('theta_i =', soil.theta_i) print('theta_u =', soil.theta_u) # (max possible) print('theta_s =', soil.theta_s) print(' ') print('K_s =', soil.K_s) print('K(theta_s) =', soil.K_of_theta(soil.theta_s)) print(' ') print('K_i =', soil.K_i) print('K(theta_i) =', soil.K_of_theta(soil.theta_i)) print(' ')
def test_instantiate(): c = infil_green_ampt.infil_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' ############# c.run_model(cfg_directory=cfg_directory, cfg_prefix=cfg_prefix)
def test_instantiate(): ec = evap_base.evap_component() ec.CCA = False ec.DEBUG = False #----------------------------------------- # This function adjusts for the platform # and can be changed in "tf_utils.py". #----------------------------------------- cfg_directory = tf_utils.TF_Test_Directory() os.chdir(cfg_directory) cfg_prefix = tf_utils.TF_Test_Case_Prefix() ec.site_prefix = 'Treynor' ############# ec.run_model(cfg_directory=cfg_directory, cfg_prefix=cfg_prefix)
def test_instantiate(): g = evap_energy_balance.evap_component() g.CCA = False g.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() g.site_prefix = 'Treynor' ############# g.run_model(cfg_directory=cfg_directory, cfg_prefix=cfg_prefix) ## g.initialize( cfg_prefix=cfg_prefix, mode="driver" ) print('nx =', g.nx) print('ny =', g.ny)