Skip to content

Commit

Permalink
Merge pull request #891 from jdebacker/simplify_extrap
Browse files Browse the repository at this point in the history
Merging
  • Loading branch information
rickecon authored Nov 21, 2023
2 parents aa8c933 + 3627248 commit d8a0fa4
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 305 deletions.
2 changes: 1 addition & 1 deletion docs/book/content/api/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ogcore.utils
pickle_file_compare, comp_array, comp_scalar, dict_compare,
to_timepath_shape, get_initial_path, safe_read_pickle, rate_conversion,
save_return_table, print_progress, fetch_files_from_web, not_connected,
avg_by_bin
avg_by_bin, extrapolate_arrays
6 changes: 5 additions & 1 deletion ogcore/SS.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,11 @@ def run_SS(p, client=None):
Yss = TR_ss / p.alpha_T[-1] # may not be right - if
# budget_balance = True, but that's ok - will be fixed in
# SS_solver
if ENFORCE_SOLUTION_CHECKS and not sol.success == 1:
if (
(ENFORCE_SOLUTION_CHECKS)
and not (sol.success == 1)
and (np.absolute(np.array(sol.fun)).max() > p.mindist_SS)
):
raise RuntimeError("Steady state equilibrium not found")
# Return SS values of variables
fsolve_flag = True
Expand Down
Loading

0 comments on commit d8a0fa4

Please sign in to comment.