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

Fix/storm fixed global #179

Merged
merged 5 commits into from
Apr 5, 2024
Merged

Fix/storm fixed global #179

merged 5 commits into from
Apr 5, 2024

Conversation

tomalrussell
Copy link
Member

The key change is to wrap STORM files to an extent aligned with the source files' pixels. This was half a pixel (0.05 degrees) out, as the source data aligns with integer degrees at the centre, not the upper-left corner, of some cells.

@tomalrussell tomalrussell merged commit 88dc522 into main Apr 5, 2024
1 check passed
@tomalrussell tomalrussell deleted the fix/storm-fixed-global branch April 5, 2024 09:54
@@ -195,7 +202,7 @@ rule wrap_storm_fixed:
temp("{OUTPUT_DIR}/input/STORM/fixed/{STORM_MODEL}/{STORM_BASIN}/STORM_FIXED_RETURN_PERIODS_{STORM_MODEL}_{STORM_BASIN}_{STORM_RP}_YR_RP.wrapped.tif")
shell:
"""
gdalwarp -te -180 -60 180 60 {input} {output}
gdalwarp -te -179.85 -60.15 180.15 59.95 -co COMPRESS=LZW -co PREDICTOR=2 -co TILED=YES {input} {output}
Copy link
Contributor

@thomas-fred thomas-fred Apr 5, 2024

Choose a reason for hiding this comment

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

Any particular reason why the changes are 0.15, 0.15, 0.15 and -0.05? I'd naively expect them to be the same in magnitude

Copy link
Member Author

Choose a reason for hiding this comment

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

Its a little arbitrary in both directions. In the east-west direction, this avoids pulling a column across the antimeridian from WP to EP. In the north-south direction, this should match the maximum extent of the source data, without clipping but avoiding extra no-data rows.

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