How to access NSIDC data using an FTP client, command line, wget, or Python

This tutorial covers four different methods for accessing data through FTP:

  • FTP Client: Perfect for users who prefer a visual interface with drag-and-drop functionality
  • Command Line: Excellent for power users and task automation
  • Wget: Efficient for downloading multiple files or entire directories
  • Python: Ideal for programmatic control and integration with data workflows
Note: Before starting, you'll need your dataset's FTP address, which specifies the file location on the server. We'll guide you through finding this address and then demonstrate each access method.

How to find a data set's FTP address on NSIDC servers

  • Data sets hosted on sidads.colorado.edu
    • Finding the FTP address:
      • Option 1: Check your data set registration confirmation email
      • Option 2: Find it on data set landing page under "Data Access & Tools" → "FTP File System"
    • Note: Even if browsers show an FTP error message, the address in the URL bar is still valid
    • Standard directory format: /pub/DATASETS/XXXX (where XXXX is your data set's subdirectory)
    • Example: Extreme Ice Survey (EIS) Glacier Image Archive, 2007-2022
      • Location: ftp://sidads.colorado.edu/pub/DATASETS/nsidc0783_extreme_ice_survey_v1
  • Data sets hosted on dtn.rc.colorado.edu:
    • Snow Today: Located in /shares/snow-today
      • Organized by water year (WY####) and data type
    • GoLIVE data locations:
      • Monthly archive: /work/nsidc0710/nsidc0710_landsat8_golive_ice_velocity_v1.1/pXXX_rYYY
      • Near-real-time: /work/nsidc0710/nsidc0710_landsat8_golive_ice_velocity_v1.1_nrt/pXXX_rYYY
      • Find path (pXXX) and row numbers (rYYY) using GoLIVE map application

How to access data using an FTP Client

To access data using an FTP client (like FileZilla, Cyberduck, or FireFTP), follow these steps:

  • Enter the server address: either sidads.colorado.edu or dtn.rc.colorado.edu (refer to the section above for the correct host for your data set)
  • Use anonymous access by leaving the username and password fields blank
  • Navigate to your data set's directory on the server (see the section above for specific subdirectory paths).
  • Select and download your files by initiating a transfer

How to access data using the command line

To access data using the command line, open your command prompt or terminal and enter these commands:

  1. Connect to the server: ftp sidads.colorado.edu or ftp dtn.rc.colorado.edu
  2. When prompted for name, enter: anonymous
  3. Navigate to your dataset's directory using: cd <path> (see the section above for specific paths)
  4. View directory contents with ls
  5. Set binary transfer mode with: binary
  6. Download a file: get <filename>
  7. Exit the FTP session: quit

How to access data using Wget

Downloading single files using Wget

To download a single file from FTP using wget, use this command:

wget --ftp-user=anonymous <ftp path to file>

Here are specific examples:

Extreme Ice Survey (EIS) Glacier Image Archive, 2007–2022

wget --ftp-user=anonymous ftp://sidads.colorado.edu/pub/DATASETS/nsidc0783_extreme_ice_survey_v1/Austria/Stubaier_Glacier/AS-01_Pfaffengrat_Lift/20120214/AS-01_20120214-030112.JPG

Snow Today

wget --ftp-user=anonymous ftp://dtn.rc.colorado.edu/shares/snow-today/WY2022/SWESummary/SnowToday_USwest_20211124_SWEsummary.txt

GoLIVE

wget --ftp-user=anonymous ftp://dtn.rc.colorado.edu/work/nsidc0710/nsidc0710_landsat8_golive_ice_velocity_v1.1/p001_r004/L8_001_004_016_2014_080_2014_096_v1.1.nc

Downloading multiple files with a single Wget command

You can download multiple files in two ways:

  • Using a text file containing FTP links:

wget --ftp-user=anonymous -i <text file with FTP links>

  • Downloading all files in a directory:

wget --ftp-user=anonymous -r -nd <ftp://sidads.colorado.edu/DATASETS/><path to data set directory>

For example, to download all files from the Circum-Arctic Map of Permafrost and Ground-Ice Conditions data set:

wget --ftp-user=anonymous -r -nd <ftp://sidads.colorado.edu/DATASETS/fgdc/ggd318_map_circumarctic>

How to access data using Python 

This sample script downloads all files from an FTP server directory. To use it, save it as a new file (like FTP_download.py) and modify the first two variables as needed. While the script is designed for datasets on sidads.colorado.edu, you can also adapt it for datasets on dtn.rc.colorado.edu (Snow Today and GoLIVE).

#!/usr/bin/env python
# NSIDC
# Sample script to download all the files within one directory on the FTP server
#
# Requires Python3 and the ftplib and os libraries

from ftplib import FTP
import os

### The following 2 variables can be changed ###
# 1. Set the directory you would like to download the files to 
destdir='path to directory'

# 2. Set the path to the FTP directory that contains the data you wish to download.
# This example is for the Circum-Arctic Map of Permafrost and Ground-Ice Conditions data set 
# https://nsidc.org/data/ggd318
directory = '/DATASETS/fgdc/ggd318_map_circumarctic'

############################################
### Don't need to change this code below ###
############################################
# FTP server
ftpdir = 'sidads.colorado.edu'

#Connect and log in to the FTP
print('Logging in')
ftp = FTP(ftpdir)
ftp.login('anonymous')

# Change to the directory where the files are on the FTP
print('Changing to '+ directory)
ftp.cwd(directory)

# Get a list of the files in the FTP directory
files = ftp.nlst()
files = files[2:]
print(files)

#Change to the destination directory on own computer where you want to save the files
os.chdir(destdir)

#Download all the files within the FTP directory
for file in files:
    print('Downloading...' + file)
    ftp.retrbinary('RETR ' + file, open(file, 'wb').write)

#Close the FTP connection
ftp.quit()

 

Last Updated February 2025