tup=(sol_opt, obs), #tup=(sol_opt,), #names=('opt') names=('opt', 'obs')) fig.savefig('solutions.pdf') from ComputabilityGraphs.helpers import all_mvars from ComputabilityGraphs.TypeSet import TypeSet for t in all_mvars(h.bgc_md2_computers()): print(t.__name__) # + #mvs.get_StateVariableTupleTimeDerivative() # + epa_opt = EstimatedParameters._make(C_opt) from model_specific_helpers import ModelParameters, Parameters apa = Parameters.from_EstimatedParametersAndUnEstimatedParameters(epa_opt, cpa) mpa = ModelParameters( **{k: v for k, v in apa._asdict().items() if k in ModelParameters._fields}) # - mpa Bib = mvs.get_BibInfo() Bib.sym_dict
# k_root=1/(365*5), # k_wood=1/(365*40), # k_metlit=0.5/(365*0.1), # k_mic=0.3/(365*0.137), # k_slowsom=0.3/(365*5), # k_passsom=0.3/(222.22*365), # C_metlit_0=0.05, # C_strlit_0=0.1, # C_mic_0=1, # C_passom_0=10, #) epa_0 = EstimatedParameters._make( np.concatenate([ # we don't want to use the average for # the betas since their sum will immediately # violate our filter condition 3 np.array((0.3, 0.4)), # but for the rest it is (c_min + c_max)[2:] / 2.0 ])) # save initial parameters pd.DataFrame(epa_0).to_csv(dataPath.joinpath('epa_0.csv'), sep=',') isQualified = make_param_filter_func(c_max, c_min) # check if the current value passes the filter # to avoid to get stuck in an inescapable series of rejections if not (isQualified(np.array(epa_0))): raise ValueError( """the current value does not pass filter_func. This is probably due to an initial value chosen outside the permitted range""" )