gnssanalysis
gnssanalysis copied to clipboard
Switch CDDIS downloads from FTP-SSL to HTTPS with NASA Earthdata authentication
This PR migrates CDDIS file downloads from FTP-SSL to HTTPS using NASA Earthdata authentication, providing better reliability, security, and performance for downloading GNSS products.
Migration Guide
Users should:
- Set up NASA Earthdata credentials in ~/.netrc with entry for urs.earthdata.nasa.gov
- Update code to use url_folder parameter instead of ftp_folder
Changes Made
Modified Functions
- New authentication system: Added get_earthdata_credentials() function to handle NASA Earthdata login via .netrc file or direct credentials
- download_file_from_cddis(): Rewrite to use HTTPS with requests.Session and NASA Earthdata auth
- download_multiple_files_from_cddis(): Updated to use new HTTPS approach with thread pool
- download_product_from_cddis(): Uses new HTTPS approach
API Changes
- Added url_folder parameter (preferred) while keeping ftp_folder as deprecated
- Both functions now accept username/password parameters for NASA Earthdata authentication
- Maintained backward compatibility with existing parameter names
Dependencies
- Added requests library for HTTPS downloads
Breaking Changes
See Migration Guide above for authentication requirements. All changes are backward compatible. The deprecated ftp_folder parameter still works but issues a deprecation warning.