diff --git a/pipt/misc_tools/analysis_tools.py b/pipt/misc_tools/analysis_tools.py index a0e4f5d..a1afc0a 100644 --- a/pipt/misc_tools/analysis_tools.py +++ b/pipt/misc_tools/analysis_tools.py @@ -551,7 +551,7 @@ def calc_objectivefun(pert_obs, pred_data, Cd): """ #ne = pred_data.shape[1] ne = pert_obs.shape[1] - r = (pred_data[:, :ne] - pert_obs) # This is necessary to use to gies code that xilu has implemented + r = (pred_data[:, :ne] - pert_obs) # Only use ne members (gies code has ne+1 predicted data) if len(Cd.shape) == 1: precission = Cd**(-1) data_misfit = np.diag(r.T.dot(r*precission[:, None])) diff --git a/popt/cost_functions/ecalc_npv.py b/popt/cost_functions/ecalc_npv.py index bfeded9..f080486 100644 --- a/popt/cost_functions/ecalc_npv.py +++ b/popt/cost_functions/ecalc_npv.py @@ -143,7 +143,7 @@ def ecalc_npv(pred_data, **kwargs): # Save emissions and electrisity usage for later inspection np.savez(f'em_values_level{l}.npz', em_values=np.array([em_values])) - np.savez(f'el_values_level{l}.npz', em_values=np.array([el_values])) + np.savez(f'el_values_level{l}.npz', el_values=np.array([el_values])) objective[l] = np.array(objective[l]) / npv_const.get('obj_scaling', 1)