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

Version 2 #40

Draft
wants to merge 81 commits into
base: main
Choose a base branch
from
Draft

Version 2 #40

wants to merge 81 commits into from

Conversation

mfisher87
Copy link
Contributor

@mfisher87 mfisher87 commented Jul 19, 2024

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

PR checklist
  • Has a descriptive title
  • Has a descriptive body
  • Includes a link to any issues closed by this PR, e.g. Closes #5.
  • Passes checks (to auto-fix a pre-commit.ci failure, add a comment
    containing "pre-commit.ci autofix")

mfisher87 and others added 30 commits September 29, 2023 18:00
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.
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.)
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.

3 participants