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

BUI calculations #4042

Merged
merged 82 commits into from
Nov 6, 2024
Merged

BUI calculations #4042

merged 82 commits into from
Nov 6, 2024

Conversation

brettedw
Copy link
Collaborator

@brettedw brettedw commented Oct 23, 2024

  • Adds job to calculate DMC, DC, and BUI rasters from RDPS & SFMS inputs
    • Run schedule may be worth discussion. Currently runs every 2 hours. There is a need to overwrite data, as more 'up-to-date' weather predictions are released
  • Adds WPSDataset functionality
    • from_array class method
    • multi-dataset context manager to help with testing
  • Adds S3 Client class - encapsulating all s3 functionality
  • Closes SFMS: Calculate forecast and outlook BUI rasters #3775

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 91.72185% with 25 lines in your changes missing coverage. Please review.

Project coverage is 80.37%. Comparing base (e9af933) to head (8185e0e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/app/utils/s3_client.py 70.21% 14 Missing ⚠️
api/app/jobs/sfms_calculations.py 76.08% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4042      +/-   ##
==========================================
+ Coverage   80.10%   80.37%   +0.26%     
==========================================
  Files         304      309       +5     
  Lines       11550    11841     +291     
  Branches      537      537              
==========================================
+ Hits         9252     9517     +265     
- Misses       2112     2138      +26     
  Partials      186      186              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dgboss
Copy link
Collaborator

dgboss commented Oct 24, 2024

Closing to free up resources

@dgboss dgboss closed this Oct 24, 2024
api/app/utils/s3.py Outdated Show resolved Hide resolved
api/app/utils/s3.py Outdated Show resolved Hide resolved
api/app/utils/geospatial.py Outdated Show resolved Hide resolved
async def put_object(self, key: str, body: Any):
await self.client.put_object(Bucket=self.bucket, Key=key, Body=body)

async def persist_raster_data(self, temp_dir: str, key: str, transform, projection, values, no_data_value) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I feel like the client should just be passed a tif to save and that it shouldn't concern itself with creating a raster from the input parameters.

Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

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

Amazing work!

Copy link
Collaborator

@conbrad conbrad left a comment

Choose a reason for hiding this comment

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

Nice work!

@brettedw brettedw closed this Nov 5, 2024
@brettedw brettedw reopened this Nov 5, 2024
Copy link

sonarcloud bot commented Nov 6, 2024

@brettedw brettedw deployed to production November 6, 2024 16:35 Active
@brettedw brettedw merged commit c920992 into main Nov 6, 2024
25 checks passed
@brettedw brettedw deleted the task/bui-raster-calc branch November 6, 2024 16:54
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.

SFMS: Calculate forecast and outlook BUI rasters
3 participants