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

get_third_party.sh runs into wget error 'Unsupported scheme' #36

Open
zubeax opened this issue Sep 16, 2024 · 1 comment
Open

get_third_party.sh runs into wget error 'Unsupported scheme' #36

zubeax opened this issue Sep 16, 2024 · 1 comment

Comments

@zubeax
Copy link

zubeax commented Sep 16, 2024

Hi Jacob.

i had to replace wget with curl to have the downloads succeed. Here is the script version i used.

Cheers
Axel

#!/bin/bash

# Get some third-party files
# Axel Z. : replace wget with curl to prevent ‘Unsupported scheme’ error

### Ephemeris files from JPL:

mkdir tmp
cd tmp
while read d
do
curl -s ftp://ssd.jpl.nasa.gov/${d}/ | gawk -e '//{print $9}' | while read f
do
  echo "=== $d/$f"
  curl -s -o ./${f} ftp://ssd.jpl.nasa.gov/${d}/${f}
done
done<<EOF
pub/eph/planets/fortran
pub/eph/planets/ascii/de405
pub/eph/planets/ascii/de421
EOF

# edit asc2eph.f file to set NRECL = 4:
# seems that -i only works on mac?
if [[ $OSTYPE == 'darwin'* ]]
then
  sed -i '_original' '/^C.*PARAMETER ( NRECL = 4 )/s/^C//' asc2eph.f
else
  sed --in-place='_original' '/^C.*PARAMETER ( NRECL = 4 )/s/^C//' asc2eph.f
fi

gfortran asc2eph.f -o asc2eph
mkdir ../eph
cat header.405 ascp*.405 | ./asc2eph
mv JPLEPH ../eph/JPLEPH.405
cat header.421 ascp*.421 | ./asc2eph
mv JPLEPH ../eph/JPLEPH.421

### Geopotential file for Earth:

curl -kL -o ./GGM03_Archive.zip http://download.csr.utexas.edu/pub/grace/GGM03/GGM03_Archive.zip
unzip ./GGM03_Archive.zip
mkdir ../grav
cp GGM03_Archive/GGM03C.GEO ../grav
@jacobwilliams
Copy link
Owner

jacobwilliams commented Nov 9, 2024

update: does the ftp server still exist? I noted that these files are also now at: https://ssd.jpl.nasa.gov/ftp/eph/planets/fortran/

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

No branches or pull requests

2 participants