-
Notifications
You must be signed in to change notification settings - Fork 2
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
Version 2 #40
Draft
mfisher87
wants to merge
81
commits into
main
Choose a base branch
from
v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATA_VERSION is a constant set to 3, so only one conditional branch is used. To use older versions of the data, use older versions of the code.
You no longer have to be in a particular directory to run `update_data.py`.
I feel this makes the code more readable. We know what we're using from each module by looking at the import. And module names are not in our code, meaning less mental overhead is required to parse the code.
I'm aiming for max compatibility with the old code. What made the most sense to me was having a new `database` directory which can be either internal or external. The `data` directory already contains internal stuff, so I felt they should be separated.
for more information, see https://pre-commit.ci
Removed references to: - "numpy.int" and "numpy.long" (replaced by "int"), - "numpy.float" (replaced by "float") - "numpy.bool" (replaced by "bool") References to specific type sizes (e.g. "numpy.float32" or "numpy.int16") are not deprecated, and remain in place. Removed the requirement in environmental.yaml to suggest older versions of numpy, for which this deprecated code didn't break things. This code should now be compatible with the latest versions of numpy (as of this commit).
* generate_antarctica_today_map.py: Fixed small bug (line 1727) that returned the wrong year-number if you generated a map on the very last day of the melt season (April 30). * map_filedata.py: Fixed pointers to basin outline shapefiles, which are in the "basins" sub-directory of the "qgis" folder. * melt_array_picklefile.py: Fixed an incorrect raw-string typing, and expanded the docstring of the _filter_out_erroneous_swaths() function to better explain what that function is doing. * nsidc_download_Tb_data.py: Removed extraneous import statements. Also coded around the time-zone issue in Earthdata to avoid runtime errors, and added code to avoid attempting to download data if no available files were identified. * write_NSIDC_bin_to_gtif.py: Added a call to osr.UseExceptions() to improve forward-compatibility, and avoid constantly seeing a GDAL run-time Warning about that.
…). Also created new script "generate_plots_for_given_day.py" with a simple CLI to generate plots for any past day in the time-series.
…htness-temperature data to only within the span of the melt season (Oct 1st thru April 30th) in any given year. This avoids unnecessary downloads of Tb data for which melt is not calculated. (Winter Tb data is used to calibrate the microwave model with thresholds for the following season, but melt is not calculated during the winter months.)
Use a different type narrowing approach
Typing enhancements
... using loguru
Simplify operations and ops docs
Replace print calls with logging
Dockerize & continuously deliver docker images
Use context managers to open files
Compose configuration for development
Simplify cli and ops instructions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This version is intended to operationalize this application. There's to much here to realistically review. I've merged in all of our latest work here through other pull requests; I haven't committed anything directly to this branch that wasn't a merge. So please check those other PRs out for more itemized review.
Highlights
python antarctica_today --help
(TODOPR checklist
Closes #5
.containing "pre-commit.ci autofix")