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

Enable Recent Weather in DRWI #3574

Merged
merged 4 commits into from
Oct 17, 2022
Merged

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Oct 17, 2022

Overview

Copy of #3548, for the hotfix.

Closes #3569

Testing Instructions

  • Check out this branch and bundle.sh --debug
  • Go to http://localhost:8000 and log in (since weather simulations can only be loaded for logged in users)
  • Pick a shape within the DRB (e.g. City of Philadelphia-Schuylkill River HUC-12)
  • Model it with Watershed Multi-Year Model
  • Add Changes to make a new scenario
  • Click Weather Data to load the weather modal
  • Open the Available Data dropdown
    • Ensure that NASA NLDAS 2000-2019 is available
    • Ensure that RCP 4.5 and RCP 8.5 are available
  • Pick a shape outside the DRB but within the DRWI, e.g. Landing Creek HUC-12
  • Repeat the above steps to get to the Available Data dropdown
    • Ensure that NASA NLDAS 2000-2019 is available
    • Ensure that RCP 4.5 and RCP 8.5 are not available
  • Pick a shape outside the DRWI, e.g. Elklick Creek HUC-12
  • Repeat the above steps to get to the Available Data dropdown
    • Ensure that NASA NLDAS 2000-2019 is not available
    • Ensure that RCP 4.5 and RCP 8.5 are not available

The DRWI includes DRB and some neighboring HUCs in New Jersey.

Instructions for how this was made are in the README. This will
be used for recent weather stations.
Since we use the boundary check both in the back-
and front-ends, we need to wire it through to be
available in both places.
This is not the most sustainable design, but will do for now.
Just like the `in_drb` attribute, we add a new one that checks
if the project is in the DRWI region.

This is also added to the weather modal's WindowModel, since
that will need this information for correct rendering of
simulated weather options.
This will show a grayed out box with appropriate message for DRWI
and DRB-specific Simulated Weather options given the AoI. These
boundaries will also be enforced at the API level.
@rajadain rajadain changed the base branch from develop to hotfix/1.33.8 October 17, 2022 13:30
@rajadain rajadain requested a review from rachelekm October 17, 2022 13:31
Copy link
Contributor

@rachelekm rachelekm left a comment

Choose a reason for hiding this comment

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

Looks great! For each of the shape scenarios I had the expected data available/unavailable in the weather data dropdown.

done for `drb_simple_perimeter`. The file was then manually edited to remove
the `GeometryCollection` parent, keeping only the `Polygon` value.

Finally, this was Unioned and Dissolved with the `drb_simple_perimeter` in QGIS
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice documentation 👏

distance = 3,
unit = 'miles',
drwiBuf = turfBuffer(drwi, distance, unit);

Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be combined into a general purpose buffer script with DRB or DRWI flag arguments to set the path variables or is it better to have this as a separate script?

Copy link
Member Author

Choose a reason for hiding this comment

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

It probably could be parameterized into a single script, but since different shapes could have different buffer radii based on their size and shape, and there's little else in these files but those variables, I decided to keep them separate.

@rajadain rajadain merged commit 273af42 into hotfix/1.33.8 Oct 17, 2022
@rajadain rajadain deleted the tt/enable-recent-weather-in-drwi branch October 17, 2022 21:58
@rajadain
Copy link
Member Author

Thank you for reviewing!

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