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

Add method to display all DHW scenarios for the currently set RCP/SSP #914

Merged
merged 8 commits into from
Jan 30, 2025

Conversation

ConnectedSystems
Copy link
Collaborator

@ConnectedSystems ConnectedSystems commented Jan 18, 2025

As in title.

ADRIA.viz.dhw_scenarios(dom)

image

I've also taken the opportunity to flesh out the docstring for ADRIA.viz.dhw_scenario(dom, some_id) which was missing.

"""
function _filter_constants(scens::DataFrame)::DataFrame
varying_cols = []
for (i, col) in enumerate(eachcol(scens))
Copy link
Collaborator

@Rosejoycrocker Rosejoycrocker Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the loop here is more efficient than something like findall(dropdims(sum(diff(Matrix(scens);dims=1),dims=1),dims=1).==0.0) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted to use a comprehension instead of mutating an existing vector.

I had to get something done quickly so what was there before was the easiest way without using too much brain power.

This should address your concern re efficiency while balancing for code readability.

Copy link
Collaborator

@Rosejoycrocker Rosejoycrocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@Rosejoycrocker Rosejoycrocker merged commit 50c3aa0 into main Jan 30, 2025
1 check passed
@ConnectedSystems ConnectedSystems deleted the dhw-viz branch January 31, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants