Skip to content

feat: save start and end date of files - #190

Merged
tsutterley merged 4 commits into
mainfrom
dates
Aug 17, 2026
Merged

feat: save start and end date of files#190
tsutterley merged 4 commits into
mainfrom
dates

Conversation

@tsutterley

Copy link
Copy Markdown
Member

refactor: output rasters using structured netCDF4 function from geoid-toolkit
fix: include additional attributes to output files for CF compliance
refactor: spherical harmonic errors using euler's formula and np.einsum

refactor: output rasters using structured netCDF4 function from `geoid-toolkit`
fix: include additional attributes to output files for CF compliance
refactor: spherical harmonic errors using euler's formula and `np.einsum`

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates GRACE/GRACE-FO time metadata handling and output-file metadata, while also refactoring several spherical-harmonic-to-spatial computations and modernizing test formatting.

Changes:

  • Add start/end date parsing as datetime/numpy.datetime64 metadata and propagate temporal coverage metadata into output products.
  • Refactor raster/grid output writing (notably NetCDF4) to use a structured writer and align dimensions/attributes for improved CF-style compliance.
  • Refactor some spherical-harmonic error/spatial summations using np.einsum and Euler-formula-based expressions; update/clean tests accordingly.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/test_units.py Formatting/style updates for unit-factor tests.
test/test_time.py Formatting/style updates for time conversion tests.
test/test_sea_level.py Formatting/style updates for sea-level solver tests.
test/test_point_masses.py Formatting/style updates for point-mass tests.
test/test_masks.py Formatting/style updates for mask I/O tests.
test/test_love_numbers.py Formatting/style updates for love-number reader tests.
test/test_legendre.py Formatting/style updates for Legendre polynomial tests.
test/test_harmonics.py Formatting/style updates for harmonic conversion/object tests.
test/test_gia.py Improve robustness of GIA download fixture (xfail on network errors) + formatting.
test/test_download_and_read.py Improve robustness of download tests (handle additional connection/login failures) + formatting.
test/conftest.py Style/quoting updates for pytest CLI options/fixtures.
gravity_toolkit/time.py Add parse() helper and return datetime objects from file parsers; add astype option to calendar_days; internal datetime import cleanup.
gravity_toolkit/scripts/scale_grace_maps.py Add richer output attributes (incl. temporal/geospatial coverage) and refactor harmonic-error calculations with einsum/Euler approach.
gravity_toolkit/scripts/monte_carlo_degree_one.py Comment clarifications aligned with new einsum-based summation approach.
gravity_toolkit/scripts/grace_spatial_maps.py Add temporal/geospatial coverage attributes and minor refactors around output naming.
gravity_toolkit/scripts/grace_spatial_error.py Add temporal/geospatial coverage attributes; refactor error-map computation and output object naming.
gravity_toolkit/scripts/grace_raster_grids.py Switch to structured NetCDF4 output via geoid_toolkit; reorder output dimensions; add CF-style attributes.
gravity_toolkit/scripts/calc_degree_one.py Comment clarifications aligned with new einsum-based summation approach.
gravity_toolkit/read_GRACE_harmonics.py Use Python datetime for start/end date calculations; rename output dict variable for clarity; improve MMAX default handling.
gravity_toolkit/read_gfc_harmonics.py Use Python datetime for start/end date calculations; rename output dictionary to gfc for consistency.
gravity_toolkit/grace_input_months.py Store per-file start/end dates alongside monthly harmonics for later propagation into outputs.
gravity_toolkit/grace_date.py Store start/end dates as numpy.datetime64 arrays when indexing GRACE files by month.
doc/source/notebooks/GRACE-Spatial-Error.ipynb Update notebook computations to match new einsum/Euler-based approach and related API usage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread gravity_toolkit/grace_date.py
Comment thread gravity_toolkit/scripts/grace_raster_grids.py Outdated
Comment thread gravity_toolkit/grace_input_months.py
Comment thread gravity_toolkit/scripts/grace_raster_grids.py Outdated
@tsutterley
tsutterley merged commit 0434c1b into main Aug 17, 2026
5 checks passed
@tsutterley
tsutterley deleted the dates branch August 17, 2026 20:27
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