Skip to content

Commit

Permalink
fix: endpoint for TN-13 and TN-14 is now documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutterley committed Nov 15, 2024
1 parent 01b9449 commit 505c5b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions gravity_toolkit/utilities.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/env python
u"""
utilities.py
Written by Tyler Sutterley (10/2024)
Written by Tyler Sutterley (11/2024)
Download and management utilities for syncing time and auxiliary files
PYTHON DEPENDENCIES:
lxml: processing XML and HTML in Python
https://pypi.python.org/pypi/lxml
UPDATE HISTORY:
Updated 11/2024: simplify unique file name function
Updated 10/2024: update CMR search utility to replace deprecated scrolling
https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html
Updated 08/2024: generalize hash function to use any available algorithm
Expand Down Expand Up @@ -387,7 +388,9 @@ def create_unique_file(filename: str | pathlib.Path):
filename: str or pathlib.Path
full path to output file
"""
filename = pathlib.Path(filename)
# validate input filename
filename = pathlib.Path(filename).expanduser().absolute()
stem, suffix = filename.stem, filename.suffix
# create counter to add to the end of the filename if existing
counter = 1
while counter:
Expand All @@ -400,7 +403,7 @@ def create_unique_file(filename: str | pathlib.Path):
# return the file descriptor
return fd
# new filename adds a counter before the file extension
filename = filename.with_name(f'{filename.stem}_{counter:d}{filename.suffix}')
filename = filename.with_name(f'{stem}_{counter:d}{suffix}')
counter += 1

# PURPOSE: check ftp connection
Expand Down
5 changes: 3 additions & 2 deletions scripts/podaac_cumulus.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
u"""
podaac_cumulus.py
Written by Tyler Sutterley (09/2024)
Written by Tyler Sutterley (11/2024)
Syncs GRACE/GRACE-FO data from NASA JPL PO.DAAC Cumulus AWS S3 bucket
S3 Cumulus syncs are only available in AWS instances in us-west-2
Expand Down Expand Up @@ -51,6 +51,7 @@
utilities.py: download and management utilities for syncing files
UPDATE HISTORY:
Updated 11/2024: documentation endpoint for TN-13 and TN-14 files
Updated 09/2024: updated default version for GRACE-FO to latest
Updated 04/2024: added check to verify access to s3 buckets
Updated 09/2023: check that collection metadata urls exist
Expand Down Expand Up @@ -135,7 +136,7 @@ def podaac_cumulus(client, DIRECTORY, PROC=[], DREL=[], VERSION=[],
urls = gravtk.utilities.cmr_metadata(
mission='grace-fo', center=pr, release=rl,
version=version, provider='POCLOUD',
endpoint=ENDPOINT)
endpoint='documentation')

# TN-13 JPL degree 1 files
try:
Expand Down

0 comments on commit 505c5b3

Please sign in to comment.