Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8b0ddcd
Clip share constraints in 0,1
Wegatriespython Aug 11, 2025
c7842c3
Add tests to document bugs
Wegatriespython Aug 11, 2025
36424ca
Consolidate tests
Wegatriespython Aug 12, 2025
e35bcba
Patch M1 Mf input issue
Wegatriespython Aug 12, 2025
ca01eb6
Add test for M1 Mf efficiency
Wegatriespython Aug 12, 2025
15c4ce8
Fix swap M1 Mf inp eff
Wegatriespython Aug 12, 2025
07801a5
Consolidate test logic
Wegatriespython Aug 14, 2025
2052953
Set region global
Wegatriespython Aug 14, 2025
2dd683e
Fix magic technology inp ratios
Wegatriespython Aug 18, 2025
ae19d8b
Modify output coeffs to represent efficiency losses
Wegatriespython Aug 18, 2025
649b3f1
Raise costs fossil gw
Wegatriespython Aug 21, 2025
5ab0356
Add desal bound assertion to test
Wegatriespython Aug 21, 2025
cf02e14
Increase fossil_gw elec inp req
Wegatriespython Aug 21, 2025
f8360ee
Remove bad input
Wegatriespython Aug 21, 2025
ad03e7c
Change vintage active calc for dummy tech
Wegatriespython Aug 21, 2025
96b32db
Relabel 6p0 to 7p0
Wegatriespython Aug 27, 2025
8bed21c
Ruff changes
Wegatriespython Aug 27, 2025
ec945d0
Set hist to 2025
Wegatriespython Aug 27, 2025
b015107
Add soft constraint relaxation
Wegatriespython Aug 28, 2025
1449fff
Lower fossil_gw elec inp cost
Wegatriespython Aug 28, 2025
6b09a04
Make TL filtering more efficient
Wegatriespython Aug 28, 2025
d78c3fb
Increase bound_act_lo relaxation
Wegatriespython Aug 29, 2025
ac28914
Clip act bound to cap limit
Wegatriespython Aug 29, 2025
3b4235f
Comment out soft constraints
Wegatriespython Sep 1, 2025
9343040
Set ot_saline growht new cap growth rate 0
Wegatriespython Sep 4, 2025
bebf897
Swap basin to reg inputs
Wegatriespython Sep 8, 2025
46cf122
Set ot_saline growht new cap growth rate 0
Wegatriespython Sep 4, 2025
f27309b
Swap basin to reg inputs
Wegatriespython Sep 8, 2025
14fff78
Add reg_to_basin return tech
Wegatriespython Sep 8, 2025
b72e43b
Update vtg filtering
Wegatriespython Sep 8, 2025
3a4d4c2
Add second basin_to_reg for irrigation
Wegatriespython Sep 8, 2025
b3103e6
Relabel basin_to_reg techs
Wegatriespython Sep 16, 2025
634a2a0
Fix double water return flows
Wegatriespython Sep 24, 2025
3adcc49
Lower fossil gw TL
Wegatriespython Sep 24, 2025
00f3ddf
Add bounds to extract_salinewater_cool
Wegatriespython Sep 26, 2025
2dd4d3b
Refactor add_cool_tech
Wegatriespython Sep 26, 2025
54699ce
Fix filtering
Wegatriespython Sep 26, 2025
3174e75
Restore feasibility
Wegatriespython Sep 29, 2025
94e1794
Refactor test
Wegatriespython Sep 30, 2025
e3a7829
Add conftest for water
Wegatriespython Sep 30, 2025
94f4539
Handle cooling inp commodity case
Wegatriespython Oct 6, 2025
ffd146e
Patch back parent cool tech params
Wegatriespython Oct 8, 2025
13d1502
deactivate saline bounds
Wegatriespython Oct 8, 2025
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
tec,incmd,inlvl,outcmd,outlvl,value_low,value_mid,value_high,capacity_factor_low,capacity_factor_mid,capacity_factor,investment_low_high,investment_mid,investment_high,technical_lifetime_low,technical_lifetime_mid,technical_lifetime_high,fix_cost_low,fix_cost_mid,fix_cost_high,var_cost_low,var_cost_mid,var_cost_high,out_value_low,out_value_mid,out_value_high,recovery_rate_low,recovery_rate_mid,recovery_rate_high
industry_unconnected,freshwater_basin,water_supply_basin,industry_mw,final,1.0,0.8,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,9.323630136986303,21.6138698630137,40.684931506849324,1.0,1.0,1.0,0.0,0.0,0.0
industry_unconnected,freshwater_basin,water_supply_basin,industry_mw,final,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,9.323630136986303,21.6138698630137,40.684931506849324,0.99,0.9,0.8,0.0,0.0,0.0
industry_untreated,industry_uncollected_wst,final,,,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
rural_discharge,rural_collected_wst,water_treat,,,1.0,1.0,1.0,1.0,1.0,1.0,660.0,2080.0,3560.0,30.0,25.0,20.0,66.0,208.0,356.0,0.0,0.0,0.0,0.97,0.95,0.9,0.0,0.0,0.0
rural_discharge,electr,final,,,0.0,0.01484018,0.02968037,,,,,,,,,,,,,,,,,,,,,
rural_recycle,rural_collected_wst,water_treat,freshwater_basin,water_supply_basin,1.0,1.0,1.0,0.95,0.9,0.85,495.0,1560.0,2670.0,40.0,30.0,25.0,49.5,156.0,267.0,0.0,0.0,0.0,0.9,0.8,0.7,0.0,0.0,0.0
rural_sewerage,electr,final,,,0.00197869,0.04303653,0.08409437,,,,,,,,,,,,,,,,,,,0.0,0.0,0.0
rural_sewerage,rural_collected_wst,final,rural_collected_wst,water_treat,1.0,1.0,1.0,1.0,1.0,1.0,870.2054794520549,1613.8356164383563,2278.3561643835615,50.0,40.0,30.0,129.45205479452054,201.36986301369862,359.58904109589037,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
rural_t_d,freshwater_basin,water_supply_basin,rural_mw,final,1.0,0.9,1.0,1.0,1.0,1.0,666.027397260274,901.095890410959,2154.7945205479455,30.0,20.0,10.0,33.301369863013704,45.05479452054795,107.73972602739728,23.310958904109594,47.307534246575344,226.25342465753428,1.0,1.0,1.0,0.0,0.0,0.0
rural_t_d,freshwater_basin,water_supply_basin,rural_mw,final,1.0,1.0,1.0,1.0,1.0,1.0,666.027397260274,901.095890410959,2154.7945205479455,30.0,20.0,10.0,33.301369863013704,45.05479452054795,107.73972602739728,23.310958904109594,47.307534246575344,226.25342465753428,0.99,0.9,0.8,0.0,0.0,0.0
rural_t_d,electr,final,,,0.00228311,0.19178082,0.38127854,,,,,,,,,,,,,,,,,,,,,
rural_unconnected,freshwater_basin,water_supply_basin,rural_disconnected,final,1.0,0.8,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
rural_unconnected,freshwater_basin,water_supply_basin,rural_disconnected,final,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.99,0.9,0.8,0.0,0.0,0.0
rural_untreated,rural_uncollected_wst,final,,,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
urban_discharge,urban_collected_wst,water_treat,,,1.0,1.0,1.0,0.95,0.9,0.85,303.0,429.0,627.0,40.0,30.0,25.0,21.0,35.0,67.0,0.0,0.0,0.0,0.95,0.9,0.85,0.0,0.0,0.0
urban_discharge,electr,final,,,0.0,0.01484018,0.02968037,,,,,,,,,,,,,,,,,,,,,
urban_recycle,urban_collected_wst,water_treat,freshwater_basin,water_supply_basin,1.0,1.0,1.0,0.95,0.9,0.85,2761.643835616438,3704.1095890410957,5506.849315068493,40.0,30.0,25.0,172.60273972602738,268.4931506849315,479.4520547945205,0.0,0.0,0.0,0.9,0.8,0.7,0.0,0.0,0.0
urban_recycle,electr,final,,,0.091324200913242,0.1141552511415525,0.17123287671232876,,,,,,,,,,,,,,,,,,,0.0,0.0,0.0
urban_sewerage,urban_collected_wst,final,urban_collected_wst,water_treat,1.0,1.0,1.0,1.0,1.0,1.0,1160.2739726027398,2151.780821917808,3037.808219178082,50.0,40.0,30.0,290.06849315068496,537.945205479452,759.4520547945204,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
urban_sewerage,electr,final,,,0.00197869,0.04303653,0.08409437,,,,,,,,,,,,,,,,,,,0.0,0.0,0.0
urban_t_d,freshwater_basin,water_supply_basin,urban_mw,final,1.0,0.9,1.0,1.0,1.0,1.0,1491.7808219178085,2766.5753424657537,3905.7534246575347,50.0,40.0,30.0,372.9452054794521,691.6438356164384,976.4383561643837,37.29452054794521,86.4554794520548,162.7397260273973,1.0,1.0,1.0,0.0,0.0,0.0
urban_t_d,freshwater_basin,water_supply_basin,urban_mw,final,1.0,1.0,1.0,1.0,1.0,1.0,1491.7808219178085,2766.5753424657537,3905.7534246575347,50.0,40.0,30.0,372.9452054794521,691.6438356164384,976.4383561643837,37.29452054794521,86.4554794520548,162.7397260273973,0.99,0.9,0.8,0.0,0.0,0.0
urban_t_d,electr,final,,,0.00228311,0.19178082,0.38127854,,,,,,,,,,,,,,,,,,,,,
urban_unconnected,freshwater_basin,water_supply_basin,urban_disconnected,final,1.0,0.8,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
urban_unconnected,freshwater_basin,water_supply_basin,urban_disconnected,final,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.99,0.9,0.8,0.0,0.0,0.0
urban_untreated,urban_uncollected_wst,final,,,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0
,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Expand Down
2 changes: 2 additions & 0 deletions message_ix_models/data/water/set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ cooling:
- cl_fresh
- air
- ot_saline
- water_return

level:
require:
Expand Down Expand Up @@ -1256,6 +1257,7 @@ nexus:
- urban_disconnected
- rural_mw
- rural_disconnected
- surfacewater

level:
add:
Expand Down
19 changes: 16 additions & 3 deletions message_ix_models/data/water/technology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,24 @@ nexus:
# TODO verify description
input: { commodity: saline_supply }

basin_to_reg:
basin_to_reg_core:
description: >-
dummy technology to map basin technologies water supply to energy technologies
technology to map basin surface water availability directly to energy technologies

input: { commodity: freshwater_supply }
input: { commodity: surfacewater_basin }

basin_to_reg_plus:
description: >-
technology to map basin freshwater to regional water supply for irrigation

input: { commodity: freshwater_basin }

reg_to_basin:
description: >-
technology for distributing water return flows from fresh cooling technologies
back to surface water basins based on basin availability shares

input: { commodity: water_return }

ueff1:
description: >-
Expand Down
3 changes: 1 addition & 2 deletions message_ix_models/model/water/data/demands.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,8 @@ def add_water_availability(context: "Context") -> dict[str, pd.DataFrame]:
* 0.95, # 0.95 buffer factor to avoid numerical error
unit="-",
)

df_share["value"] = df_share["value"].fillna(0)

df_share["value"] = np.clip(df_share["value"], 0, 1)
results["share_commodity_lo"] = df_share

return results
Expand Down
Loading
Loading