Subsetting and Reformatting with the NSIDC PyRS Tool

The NSIDC Python Reformatting and Subsetting (PyRS) tool is a command line tool which prompts the user to specify data reformatting and subsetting preferences. Output formats available are native, GeoTIFF, and NetCDF. If the dataset is polar stereographic, subsetting can be performed in the projected coordinate system, or the WGS84 coordinate space. PyRS can be used with the following data sets:

To successfully use this tool, you will need to be comfortable working in a command line environment on Windows (x64), Mac, or Linux. You also need to be able to download Anaconda, approximately 1.8 GB, to your computer.

If you follow the steps below, you will:

  1. Download Anaconda
  2. Add two custom Anaconda package channels
  3. Install and run the PyRS tool

Steps for setting up the tool

This tool assumes that you have already downloaded the data to your computer. Note that the directory name housing your data should not have spaces. You will need the latest version of Anaconda. If you only need to upgrade, see Step 1 in the Troubleshooting section below.

  1. Download Anaconda:
    • Access the Anaconda tool via
    • Under Download Anaconda, click on the logo that represents your operating system.
    • Choose Python 2.7.
    • NOTE: Anaconda provides the option to use a graphical installer or a command line installer. The graphical installer is recommended for users who are newer to the command line environment.

  2. Add the Conda-forge and NSIDC channels:
    • To add the Conda-forge channel, type:
      conda config --add channels conda-forge
    • To add the NSIDC channel, type:
      conda config --add channels nsidc
  3. Install the proper GDAL dependency and run the NSIDC PyRS tool for transforming your data
    • To install GDAL and NSIDC PyRS, type:
      • conda install gdal=2.1.3
      • ​conda install pyrs
    • To run PyRS, type:

When running the NSIDC PyRS tool, you will need to know:

  • Which data set you are transforming.
  • The directory path where the data are located.
  • The directory path where you want to save the output files.

PyRS will assume the data are in the directory where the tool is called, but you may specify other working directories.

To read about the capabilities of the tool, type:
pyrs --help


  1. Check your versions
    • Open a Terminal or Command Prompt window.
    • To check that the latest version of Anaconda is installed, type:
      conda --version
    • If you have an older version, type:
      conda update anaconda
    • To check that the version of Python is 2.7.13, type
      python --version
  2. Make sure that you have no spaces in the folder name where your data are located.
  3. For SNODAS data: If you have header files .Hdr in your directory files, you need to move them to another directory or zip them up.
    • Daily SNODAS tarred files contain header files .Hdr that conflict with the transformation commands in the tool. If you leave these files gzipped after untarring the daily files, this tool will ignore them.


Last Updated May 16, 2018