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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fix write-to-copy warning in `process_rff_sample()`. ([PR #116](https://github.com/ClimateImpactLab/dscim/pull/116), [@brews](https://github.com/brews))
- Fix bad release header links in CHANGELOG.md. ([PR #105](https://github.com/ClimateImpactLab/dscim/pull/105), [@brews](https://github.com/brews))
- Fixed broken code quality checks in CI. Now using `ruff` instead of `flake8`. ([PR #107](https://github.com/ClimateImpactLab/dscim/pull/107), [@brews](https://github.com/brews))

Expand Down
4 changes: 2 additions & 2 deletions src/dscim/utils/rff.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def process_rff_sample(i, rffpath, ssp_df, outdir, HEADER, **storage_options):
) * rff_df.GDP # Adjust weight measurement from 2011 tp 2005 PPP USD

# print(rff_df.iso[np.isnan(rff_df.weight)])
rff_df.weight[np.isnan(rff_df.weight)] = np.exp(
np.nanmean(np.log(rff_df.weight))
rff_df["weight"] = rff_df["weight"].fillna(
np.exp(np.nanmean(np.log(rff_df.weight)))
) # Fill missing value weights with sample mean

out_df = solve_optimization(ssp_df, rff_df)
Expand Down