-
Notifications
You must be signed in to change notification settings - Fork 277
update ionex GIM filename convention #1337
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request updates the IONEX filename convention to align with the changes implemented by JPL GIM since GPS week 2238. It includes a new function to calculate the GPS week number and modifies the filename generation logic to handle both the old and new conventions. It also modifies the wget command to specify the output filename. Sequence diagram for downloading IONEX filesequenceDiagram
participant User
participant dload_ionex
participant get_ionex_filename
participant WebServer
User->>dload_ionex: Calls dload_ionex(date_str, tec_dir, sol_code)
dload_ionex->>get_ionex_filename: Calls get_ionex_filename(date_str, tec_dir, sol_code)
get_ionex_filename-->>dload_ionex: Returns fname_src (URL of IONEX file)
dload_ionex->>WebServer: Sends HTTP request to download fname_src
WebServer-->>dload_ionex: Returns IONEX file
dload_ionex-->>User: Returns
Updated class diagram for ionex filename handlingclassDiagram
class ionex {
+dload_ionex(date_str, tec_dir, sol_code, date_fmt, print_msg)
+get_ionex_filename(date_str, tec_dir, sol_code, date_fmt)
+datetime_to_gps_week(dd)
}
class datetime {
+strptime(date_str, date_fmt)
+timetuple()
+year
+hour
+minute
}
ionex -- datetime : uses
note for ionex "Filename convention updated for GPS week >= 2238"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yuankailiu - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider extracting the filename generation logic into separate functions for the old and new naming conventions to improve readability.
- It might be clearer to use
datetime.date(2022, 11, 27)
instead ofdt.datetime
when you only care about the date.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Thank you @yuankailiu for the fix! I am trying to test the new code, but it gives me the following authentication error: (insar) yunjunz:~/data/S1_D062/mintpy_aoi>$ iono_tec.py timeseries.h5 -g inputs/geometryRadar.h5
------------------------------------------------------------------------------
downloading GNSS-based TEC products in IONEX format from NASA/CDDIS ...
https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/atmospheric_products.html
number of TEC files to download: 251
local TEC file directory: /Users/yunjunz/data/aux/IONEX
--------------------
DATE 1/251: 20141009
wget --continue --auth-no-challenge "https://cddis.nasa.gov/archive/gnss/products/ionex/2014/282/jplg2820.14i" -O "/Users/yunjunz/data/aux/IONEX/jplg2820.14i.Z"
--2025-04-01 15:56:31-- https://cddis.nasa.gov/archive/gnss/products/ionex/2014/282/jplg2820.14i
Resolving cddis.nasa.gov (cddis.nasa.gov)... 198.118.199.52, 2001:4d0:241a:442::52
Connecting to cddis.nasa.gov (cddis.nasa.gov)|198.118.199.52|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://urs.earthdata.nasa.gov/oauth/authorize?client_id=gDQnv1IO0j9O2xXdwS8KMQ&response_type=code&redirect_uri=https%3A%2F%2Fcddis.nasa.gov%2Fproxyauth&state=aHR0cDovL2NkZGlzLm5hc2EuZ292L2FyY2hpdmUvZ25zcy9wcm9kdWN0cy9pb25leC8yMDE0LzI4Mi9qcGxnMjgyMC4xNGk [following]
--2025-04-01 15:56:36-- https://urs.earthdata.nasa.gov/oauth/authorize?client_id=gDQnv1IO0j9O2xXdwS8KMQ&response_type=code&redirect_uri=https%3A%2F%2Fcddis.nasa.gov%2Fproxyauth&state=aHR0cDovL2NkZGlzLm5hc2EuZ292L2FyY2hpdmUvZ25zcy9wcm9kdWN0cy9pb25leC8yMDE0LzI4Mi9qcGxnMjgyMC4xNGk
Resolving urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)... 198.118.243.33, 2001:4d0:241a:4081::89
Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|198.118.243.33|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Unknown authentication scheme.
Username/Password Authentication Failed.
gzip --force --keep --decompress /Users/yunjunz/data/aux/IONEX/jplg2820.14i.Z I tried to add the user/password info in the
|
I just test the code again with you inquired files. It is downloading okay Input
Result is here
|
Description of proposed changes
The filename convention of JPL GIM has changed since 2023-11-27 (since GPS week 2238).
See issue: #1331
Here we use the date_str to create the file base name in the new convention is the date is in and after GPS week 2238. If the date is before GPS week 2238, we use the old file base name convention.
Reminders
Summary by Sourcery
Update IONEX GIM filename convention to support the new IGS filename format introduced in GPS week 2238
New Features:
Bug Fixes:
Enhancements: