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

Feature/coastal flooding #100

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

Feature/coastal flooding #100

wants to merge 21 commits into from

Conversation

aleeciu
Copy link
Collaborator

@aleeciu aleeciu commented Nov 24, 2023

Changes proposed in this PR:

  • this PR loads coastal flood data from the Aqueduct project and create a CLIMADA hazard instance from them.
  • since it mostly uses established CLIMADA functions, test aim at testing the validity of (a subset of) the files' urls.

PR Author Checklist

PR Reviewer Checklist

Copy link
Member

@chahank chahank left a comment

Choose a reason for hiding this comment

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

Cool addition!

@emanuel-schmid : can you please just check how we should handle the external resources (here a weblink)? In particular, should we do something for the case that the link changes of the data is no longer available?

Comment on lines +24 to +30
def __init__(self, **kwargs):
"""Empty constructor"""

Hazard.__init__(self, HAZ_TYPE, **kwargs)

@classmethod
def from_aqueduct_tif(cls,
Copy link
Member

Choose a reason for hiding this comment

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

In this case I think it makes much more sense to remove the from method and put all the functionality in the init. There seems to be no other purpose than to load data (initialize the object).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mhh, as of now maybe yes, but it's likely that the CoastalFlood class will be populated with more data in the future; same as it's happening with the RiverFlood class where we now have ISIMIP and Aqueduct (https://github.com/CLIMADA-project/climada_petals/blob/feature/river_flooding_aqueduct/climada_petals/hazard/river_flood.py) so I would tend to keep it like this.

climada_petals/hazard/test/test_coastal_flood.py Outdated Show resolved Hide resolved
@chahank
Copy link
Member

chahank commented Aug 16, 2024

Any update on this: @emanuel-schmid : can you please just check how we should handle the external resources (here a weblink)?

Comment on lines 11 to 13
# FIX THIS PATH - YOU SHOULD SAVE UNDER HAZARD, NOW IT CREATES A FOLDER CALLED COASTALFLOOD
# AT THE SAME LEVEL AS HAZARD. RIVERINE AQUEDUCT IS SAVED THERE TOO, SO FIX THAT TOO
# (SEE CLIMADA DATA LOCAL FOLDER)
Copy link
Contributor

@emanuel-schmid emanuel-schmid Aug 21, 2024

Choose a reason for hiding this comment

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

Is this comment still valid? Actually the path ~/climada/data/hazard is where the files from the data api land. There are some automatic features on this directory executed by the api client: caching, making sure that the version is always the newest and purging. So, strictly speaking, the data files that are not handled by the climada api client should not necessarily be saved there. Any other directory on the same level actually seems better suited.
Hence I'd rather remove the comment than change the config.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

@chahank
Copy link
Member

chahank commented Sep 20, 2024

Any update on this @aleeciu and @emanuel-schmid ?

@aleeciu
Copy link
Collaborator Author

aleeciu commented Sep 27, 2024

Hi @chahank , meanwhile @emanuel-schmid and I actually made these data accessible via the API. So I wonder if there is any point in completing this PR in the first place. All it does is loading data that are now accessible via the API.

@bguillod
Copy link
Collaborator

Hi @chahank , meanwhile @emanuel-schmid and I actually made these data accessible via the API. So I wonder if there is any point in completing this PR in the first place. All it does is loading data that are now accessible via the API.

What is your take on this @chahank @emanuel-schmid ?

@emanuel-schmid
Copy link
Contributor

Imho, just because the resulting data is available elsewhere doesn't mean that the code is obsolete.
Quite in the opposite: a reference on how the data has been created would be a very good idea.
The data-type on the API does not give much information away about that:

image

@chahank
Copy link
Member

chahank commented Nov 25, 2024

@bguillod @aleeciu : any plans to finish this PR?

@aleeciu
Copy link
Collaborator Author

aleeciu commented Dec 13, 2024

Given that we clarified the issue with the config file, from my end this PR is complete. As for #153 I seem to be getting test errors about wind calculation. I don't know where this comes from.

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.

4 participants