Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of CalcDeltaImpact class of unsequa into develop #844

Merged
merged 62 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c694c07
Add delta impact uncertainty module
Nov 3, 2022
41dfaf8
Remove comment # on tests
Nov 3, 2022
bba88a6
Rename output metrics required for sensitivity analysis
Nov 3, 2022
50d4733
Test delta with different input vars
Nov 3, 2022
2f7ecad
Add test for detla aai_agg
Nov 4, 2022
cf4dfe6
merge develop
Nov 12, 2022
f94f002
Feature/init hazard tag (#570)
manniepmkam Nov 2, 2022
964967c
Add type hints to Forecast.__init__ and update docstring (#574)
peanutfun Nov 3, 2022
1188b66
TropCyclone: Implement ER11 wind model (#577)
tovogt Nov 3, 2022
c920e23
Feature/init tc tracks (#559)
manniepmkam Nov 3, 2022
16f7de0
update __init__ entity.tag (#571)
manniepmkam Nov 3, 2022
9c33c47
read_raster_sample: fix antimeridian and implement raster gradients (…
tovogt Nov 3, 2022
9b97af8
Feature/fraction is none (#541)
chahank Nov 4, 2022
a8df613
Euler Guide: added instructions for running Jupyter on Euler
emanuel-schmid Nov 9, 2022
ef9d554
Set all Hazard attributes in __init__ (#549)
peanutfun Nov 14, 2022
5407761
Feature/init trop cyclone (#567)
aleeciu Nov 14, 2022
231625d
Correction of tutorials: spelling and bugs (#582)
NicolasColombi Nov 16, 2022
5baff88
Exposures tutorial: don't advertise hazardous behaviour!
emanuel-schmid Nov 17, 2022
ab247dc
Update ImpactFuncSet.__init__ (#568)
peanutfun Nov 18, 2022
17171ef
Merge branch 'develop' into feature/unsequa_delta_climate
Nov 22, 2022
3468777
Merge branch 'develop' into feature/unsequa_delta_climate
Nov 24, 2022
22efa1a
merge develop
Nov 24, 2022
7b33bcd
Merge branch 'develop' into feature/unsequa_delta_climate
Nov 28, 2022
f3b865c
Merge branch 'develop' into feature/unsequa_delta_climate
May 11, 2023
2d6e310
merge develop
May 12, 2023
c4fe4d6
push from Euler by Simona
Aug 24, 2023
8104493
Merge branch 'develop' into feature/unsequa_delta_climate
Aug 24, 2023
7597c28
from Euler
Aug 24, 2023
61f7f9b
calc impact update to match unsequa version on develop
Jan 16, 2024
82be50c
Merge branch 'develop' into feature/unsequa_delta_climate
Jan 16, 2024
e6a4f3f
update calc_delta_climate do match newest development status. incl. n…
Jan 17, 2024
6bc20c0
update tutorial and docstrings
Jan 18, 2024
d2fd6d6
unit test for CalcDeltaClimate
Jan 18, 2024
6a0c46e
update changelog, pull request #844
Jan 19, 2024
d993167
Update climada/engine/unsequa/calc_delta_climate.py
simonameiler Jan 19, 2024
43437a2
Update climada/engine/unsequa/calc_delta_climate.py
simonameiler Jan 19, 2024
a7a3cb5
revert unintended docstring change in input_var.py
Jan 19, 2024
895edf9
revert changes in unc_output.py that were not intended
Jan 19, 2024
0f8e7ea
test for sensitivity analysis added
Jan 19, 2024
9a06f2e
update docstrings in calc_delta_climate.py
Jan 19, 2024
ba35cdc
new function safe_divide added to util/value_representation; test for…
Jan 19, 2024
8920234
update changelog
Jan 19, 2024
74d8839
Merge branch 'develop' into feature/unsequa_delta_climate
Jan 19, 2024
92712f8
blackened
emanuel-schmid Jan 22, 2024
6a580c1
Merge branch 'develop' into feature/unsequa_delta_climate
emanuel-schmid Jan 22, 2024
957032e
Merge branch 'develop' into feature/unsequa_delta_climate
emanuel-schmid Jan 22, 2024
f9739f5
blackened
emanuel-schmid Jan 22, 2024
ed903d5
unsequa.calc_base: cosmetics
emanuel-schmid Jan 23, 2024
7d0a393
Update climada/util/value_representation.py
simonameiler Jan 24, 2024
07279c5
update safe_divide and respective tests
Jan 24, 2024
0c814aa
update tests
Jan 24, 2024
e9bf494
cosmetics
Jan 24, 2024
80b0d19
Update climada/engine/unsequa/calc_delta_climate.py
simonameiler Jan 25, 2024
633e0ed
Update climada/engine/unsequa/calc_base.py
simonameiler Jan 25, 2024
0be013b
Update climada/engine/unsequa/calc_base.py
simonameiler Jan 25, 2024
1cae5fd
Update climada/engine/unsequa/calc_delta_climate.py
simonameiler Jan 25, 2024
45a66c5
update tutorial, documentation, calc_delta_climate and plotting funct…
Jan 25, 2024
a578076
addressing linter issues
Jan 25, 2024
a0a92b5
revert to Calc.__init__(self)
Jan 25, 2024
01862e6
Fix module name in docs
peanutfun Jan 30, 2024
869f2c1
Fix whitespace and line-too-long issues
peanutfun Jan 30, 2024
9281f25
Merge branch 'develop' into feature/unsequa_delta_climate
peanutfun Jan 31, 2024
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Code freeze date: YYYY-MM-DD

- Convenience method `api_client.Client.get_dataset_file`, combining `get_dataset_info` and `download_dataset`, returning a single file objet. [#821](https://github.com/CLIMADA-project/climada_python/pull/821)
- Read and Write methods to and from csv files for the `DiscRates` class. [#818](ttps://github.com/CLIMADA-project/climada_python/pull/818)
- Add `CalcDeltaClimate` to unsequa module to allow uncertainty and sensitivity analysis of impact change calculations. [#844](https://github.com/CLIMADA-project/climada_python/pull/844)
- Addition of small function called `safe_divide` in util which handles division by zero and NaN values in the numerator or denominator. [#844](https://github.com/CLIMADA-project/climada_python/pull/844)

### Changed

Expand Down
1 change: 1 addition & 0 deletions climada/engine/unsequa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
from .calc_base import *
from .calc_impact import *
from .calc_cost_benefit import *
from .calc_delta_climate import *
17 changes: 9 additions & 8 deletions climada/engine/unsequa/calc_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def est_comp_time(self, n_samples, time_one_run, processes=None):
"been assigned to exp before defining input_var, ..."
"\n If computation cannot be reduced, consider using"
" a surrogate model https://www.uqlab.com/", time_one_run)

total_time = n_samples * time_one_run / processes
LOGGER.info("\n\nEstimated computaion time: %s\n",
dt.timedelta(seconds=total_time))
Expand Down Expand Up @@ -323,15 +322,17 @@ def sensitivity(self, unc_output, sensitivity_method = 'sobol',

Parameters
----------
unc_output : climada.engine.uncertainty.unc_output.UncOutput
unc_output : climada.engine.uncertainty.unc_output.UncOutput()
Uncertainty data object in which to store the sensitivity indices
sensitivity_method : str, optional
Sensitivity analysis method from SALib.analyse. Possible choices: 'fast', 'rbd_fact',
'morris', 'sobol', 'delta', 'ff'. Note that in Salib, sampling methods and sensitivity
analysis methods should be used in specific pairs:
sensitivity_method : str
sensitivity analysis method from SALib.analyse
Possible choices:
'fast', 'rbd_fact', 'morris', 'sobol', 'delta', 'ff'
The default is 'sobol'.
Note that in Salib, sampling methods and sensitivity analysis
methods should be used in specific pairs.
https://salib.readthedocs.io/en/latest/api.html
Default: 'sobol'
sensitivity_kwargs: dict, optional
sensitivity_kwargs: dict(), optional
Keyword arguments of the chosen SALib analyse method.
The default is to use SALib's default arguments.

Expand Down
4 changes: 3 additions & 1 deletion climada/engine/unsequa/calc_cost_benefit.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ class CalcCostBenefit(Calc):
('haz_input_var', 'ent_input_var', 'haz_fut_input_var', 'ent_fut_input_var')
_metric_names : tuple(str)
Names of the cost benefit output metrics
('tot_climate_risk', 'benefit', 'cost_ben_ratio', 'imp_meas_present', 'imp_meas_future')
('tot_climate_risk', 'benefit', 'cost_ben_ratio',
'imp_meas_present', 'imp_meas_future')

"""

_input_var_names = (
Expand Down
Loading
Loading