def setUpClass(cls): super().setUpClass() cls.gold_dir = cls.basin_dir.joinpath('gold_hrrr') cls.output_path = cls.basin_dir.joinpath( 'output/lakes/wy2020/lakes_gold/run20191001_20191001') run_awsm(cls.run_config, testing=True)
def setUpClass(cls): super().setUpClass() cls.gold_dir = cls.basin_dir.joinpath('gold') cls.output_path = cls.basin_dir.joinpath( 'output/rme/wy1986/rme_test/run19860217_19860217') run_awsm(cls.run_config, testing=True)
def setUpClass(cls): super().setUpClass() cls.gold_dir = cls.basin_dir.joinpath('gold_hrrr_update') cls.gold_em = os.path.join(cls.gold_dir, 'em.nc') cls.gold_snow = os.path.join(cls.gold_dir, 'snow.nc') cls.output_path = cls.basin_dir.joinpath( 'output/lakes/wy2020/lakes_gold/run20191001_20191001') run_awsm(cls.run_config, testing=True)
def setUpClass(cls): super().setUpClass() cls.run_dir = os.path.abspath(os.path.join(cls.test_dir, 'RME')) cls.gold_path = os.path.join(cls.run_dir, 'gold') cls.gold_em = os.path.join(cls.gold_path, 'em.nc') cls.gold_snow = os.path.join(cls.gold_path, 'snow.nc') cls.output = os.path.join( cls.run_dir, 'output/rme/devel/wy1986/rme_test/runs/run3337_3344') cls.output_em = os.path.join(cls.output, 'em.nc') cls.output_snow = os.path.join(cls.output, 'snow.nc') # Remove any potential files to ensure fresh run if os.path.isdir(cls.output): shutil.rmtree(cls.output) config = os.path.join(cls.run_dir, 'config.ini') cls.cache_run = True run_awsm(config)
def test_smrf_pysnobal_thread(self): """ Test smrf passing variables to PySnobal threaded """ config = deepcopy(self.base_config) config.raw_cfg['awsm master']['run_smrf'] = False config.raw_cfg['awsm master']['make_in'] = False config.raw_cfg['awsm master']['model_type'] = 'smrf_ipysnobal' config.raw_cfg['system']['threading'] = True config.apply_recipes() config = cast_all_variables(config, config.mcfg) self.assertIsNone(run_awsm(config))
def test_pysnobal_netcdf(self): """ Test PySnobal with netCDF Forcing """ config = deepcopy(self.base_config) config.raw_cfg['awsm master']['make_in'] = False config.raw_cfg['awsm master']['mask_isnobal'] = True config.raw_cfg['ipysnobal']['forcing_data_type'] = 'netcdf' config.apply_recipes() config = cast_all_variables(config, config.mcfg) self.assertIsNone(run_awsm(config))
def test_pysnobal(self): """ Test standard Pysnobal """ config = deepcopy(self.base_config) # config.raw_cfg['files']['init_type'] = 'ipw_out' # config.raw_cfg['files']['init_file'] = './RME/snow.2538' config.apply_recipes() config = cast_all_variables(config, config.mcfg) # ensure that the recipes are used self.assertTrue(config.cfg['awsm master']['model_type'] == 'ipysnobal') self.assertIsNone(run_awsm(config))
def test_custom_config_file(self): self.assertIsNone(run_awsm(self.base_config))
def test_base_config_file(self): self.assertIsNone(run_awsm(self.config_file))