FAST SSW UPDATE

The SolarSoftWare (SSW) is a set of integrated software libraries, databases and system utilities which provide a common programming and data analysis environment for solar physics.

Since August 7, 2019, NASA removed anonymous ftp access to SSW software and cURL (install) & wget (upgrade) solutions are currently in use (see http://www.lmsal.com/solarsoft/ssw_install.html)

Unfortunately, wget is (very) slow due to multiple HTTPS handshakes.

An alternative approach is to use freeware LFTP that supports https access.


      1) Install LFTP version 4.8 or above (Alternatively, you can compile lftp-4.8.4 from the source files):

eduard@computer:~$ sudo apt install lftp

Reading package lists... Done

Building dependency tree

Reading state information... Done

lftp is already the newest version (4.8.1-1ubuntu0.1).

0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

2) In your SSW command line, find the folders to update.
For example, you have only three folders to update:

IDL> $ls $SSW -I'site'  

gen  goes hessi

3)  Copy/paste the folders into the script to run the updates (do not update the site folder). The script assumes that you have system variable $SSW pointing to your local SSW installtion:

#  @description:  MIRROR FILES USING LFTP

#  Eduard@ Glasgow

#  DATE: 28 August, 2019

#  REQUIRES: LFTP version 4.8 see https://lftp.yar.ru/

# HTTPS CONNECTION HOST

HOST='https://sohowww.nascom.nasa.gov'

# REMORE DIRECTORY TO DOWNLOAD

for i in gen goes hessi

#The list of folders to update above

#TO UPDATE ALL SSW folders (about 12 GB) uncommment the line below

#for i in gen cgro goesn hic iris optical psp smei soho trace goesr hinode ngdc packages radio smm spartan vobs goes hessi hxrs offline proba2 sdo so stereo yohkoh

do

REMOTE_DIR="/solarsoft/$i"

LOCAL_DIR="$SSW$i"

# $SSW should point to your local SSW installation

echo "Downloading from $HOST$REMOTE_DIR to $LOCAL_DIR"

lftp $HOST <<EOF

#set mirror:sort-by name

mirror -e -n -v -P 10 --dry-run $HOST$REMOTE_DIR $LOCAL_DIR

#mirror -e -n -v -P 10 $HOST$REMOTE_DIR $LOCAL_DIR

exit

EOF

echo "Completed $LOCAL_DIR ............................................OK"

done # loop for all instruments

exit

4) Save as ssw_lftp or similar and run the script :

[eduard@eris ~/bin]$ chmod +x ssw_lftp
[eduard@eris ~/bin]$ ./ssw_lftp
Downloading from https://sohowww.nascom.nasa.gov/solarsoft/gen to /opt/ssw/gen
     5) Finally, if we are happy with the script remove --dry-run option and the script will update your SSW.