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

Let's get all the changes we've done so far on the main branch. Are we ready? #35

Closed
wants to merge 39 commits into from

Conversation

mfisher87
Copy link
Member

We have a lot in flight!

PR checklist
  • Has a descriptive title
  • Has a descriptive body
  • 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.)
…e downloaded from NSIDC and stored locally only.
mmacferrin and others added 7 commits December 15, 2023 09:46
…sing it to miss needed updates after downloading most-recent Tb data from NSIDC.

Also, made the default behavior when "gathering" files into a single daily directory, to use symlinks rather than copyfile() in order to reduce redundant disk usage of plot images.
Also a call to matplotlib.pyplot.clear('all') to close hanging matplotlib plots between each region iteration.
…hing into the "daily_gathered_plots" directory.

It was meant to save space but caused problems on some platforms when trying to upload the images online.
@mfisher87 mfisher87 marked this pull request as ready for review July 19, 2024 01:53
@mfisher87 mfisher87 closed this Jul 19, 2024
@mfisher87 mfisher87 reopened this Jul 19, 2024
@mfisher87
Copy link
Member Author

Closing for clearer branch name

@mfisher87 mfisher87 closed this Jul 19, 2024
@mfisher87 mfisher87 deleted the matt-is-back branch July 19, 2024 22:02
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