Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipt/misc_tools/analysis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
2 changes: 1 addition & 1 deletion popt/cost_functions/ecalc_npv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading