def region_model_repository(self): """ Returns ------- - RegionModelRepository - configured with 'Tistel-ptgsk' etc. """ id_list = [1225] # parameters can be loaded from yaml_config Model parameters.. pt_params = api.PriestleyTaylorParameter( ) # *params["priestley_taylor"]) gs_params = api.GammaSnowParameter() # *params["gamma_snow"]) ss_params = api.SkaugenParameter() ae_params = api.ActualEvapotranspirationParameter( ) # *params["act_evap"]) k_params = api.KirchnerParameter() # *params["kirchner"]) p_params = api.PrecipitationCorrectionParameter( ) # TODO; default 1.0, is it used ?? ptgsk_rm_params = pt_gs_k.PTGSKParameter(pt_params, gs_params, ae_params, k_params, p_params) ptssk_rm_params = pt_ss_k.PTSSKParameter(pt_params, ss_params, ae_params, k_params, p_params) # create the description for 2 models of tistel,ptgsk, ptssk tistel_grid_spec = self.grid_spec # cfg_list = [ RegionModelConfig("Tistel-ptgsk", pt_gs_k.PTGSKModel, ptgsk_rm_params, tistel_grid_spec, "unregulated", "FELTNR", id_list), RegionModelConfig("Tistel-ptssk", pt_ss_k.PTSSKModel, ptssk_rm_params, tistel_grid_spec, "unregulated", "FELTNR", id_list) ] rm_cfg_dict = {x.name: x for x in cfg_list} return GisRegionModelRepository(rm_cfg_dict)
def test_pt_ss_k_param(self): ptssk_size = 15 valid_names = [ "kirchner.c1", "kirchner.c2", "kirchner.c3", "ae.ae_scale_factor", "ss.alpha_0", "ss.d_range", "ss.unit_size", "ss.max_water_fraction", "ss.tx", "ss.cx", "ss.ts", "ss.cfr", "p_corr.scale_factor", "pt.albedo", "pt.alpha" ] self.verify_parameter_for_calibration(pt_ss_k.PTSSKParameter(), ptssk_size, valid_names)
def test_pt_ss_k_param(self): ptssk_size = 20 valid_names = [ "kirchner.c1", "kirchner.c2", "kirchner.c3", "ae.ae_scale_factor", "ss.alpha_0", "ss.d_range", "ss.unit_size", "ss.max_water_fraction", "ss.tx", "ss.cx", "ss.ts", "ss.cfr", "p_corr.scale_factor", "pt.albedo", "pt.alpha", "gm.dtf", "routing.velocity", "routing.alpha", "routing.beta", "gm.direct_response" ] self.verify_parameter_for_calibration(pt_ss_k.PTSSKParameter(), ptssk_size, valid_names)