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

Change binary writer to default 64-bit floats to 32-bit floats #342

Merged
merged 12 commits into from Apr 21, 2021

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Apr 18, 2021

To avoid inconsistencies as Satpy changes, the binary writer needs to have consistent output for floating point data. With current versions of xarray (this may change in the future) it is very easy for Satpy to accidentally upcast 32-bit floats to 64-bit floats. This amount of precision is unnecessary for most remote-sensing satellite instruments and wastes space and processing time. This PR makes it so instead of defaulting to the same data type as the input data, the writer will cast 64-bit floats as 32-bit floats. This way if Satpy or xarray changes in the future produce the same data as 32-bit floats, this won't change output for P2G users.

This PR also includes fixing output filenames for the geotiff and binary writers, fixing the default radiance enhancement configuration, and adding a --plot option to the compare script for debugging.

@djhoese djhoese added enhancement component:writer writing data to a final output format labels Apr 18, 2021
@djhoese djhoese added this to the Polar2Grid 3.0 milestone Apr 18, 2021
@djhoese djhoese self-assigned this Apr 18, 2021
@djhoese
Copy link
Member Author

djhoese commented Apr 20, 2021

This will keep failing until pytroll/satpy#1646 is merged.

@djhoese djhoese merged commit 91dff9d into ssec:master Apr 21, 2021
@djhoese djhoese deleted the bugfix-binary-output-filenames branch April 21, 2021 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:writer writing data to a final output format enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant