nsidc_icesat2_sync.py

  • Syncs all available ICESat-2 data for a specified data product, release, granule and track.

  • The first time we run the script, it will copy the necessary dataset in the selected local directory.

  • If we already have all the data, and we run the script again: only files added or modified on the remote server will downloaded.

Source code

Calling Sequence

usage: nsidc_icesat2_sync.py [-h] [--user USER] [--password PASSWORD]
                             [--netrc NETRC] [--directory DIRECTORY]
                             [--year YEAR [YEAR ...]]
                             [--subdirectory SUBDIRECTORY [SUBDIRECTORY ...]]
                             [--release RELEASE]
                             [--version VERSION [VERSION ...]]
                             [--granule GRANULE [GRANULE ...]]
                             [--cycle CYCLE [CYCLE ...]]
                             [--region REGION [REGION ...]]
                             [--track RGT [RGT ...]] [--auxiliary]
                             [--index INDEX] [--flatten] [--np PROCESSES]
                             [--timeout TIMEOUT] [--retry RETRY] [--log]
                             [--list] [--clobber] [--checksum] [--mode MODE]
                             [PRODUCTS ...]

Positional Arguments

PRODUCTS

ICESat-2 products to sync

Named Arguments

--user, -U

Username for NASA Earthdata Login

--password, -W

Password for NASA Earthdata Login

--netrc, -N

Path to .netrc file for authentication

--directory, -D

Working data directory

--year, -Y

Years to sync

--subdirectory, -S

subdirectories of data to sync

--release, -r

ICESat-2 Data Release

--version, -v

ICESat-2 Data Version

--granule, -g

Possible choices: 1–14

ICESat-2 Granule Region

--cycle, -c

ICESat-2 orbital cycles to sync

--region, -n

Possible choices: AA, AK, CN, CS, GL, IC, SV, RU

ICESat-2 Named Region (ATL14/ATL15)

--track, -t

Possible choices: 1–1387

ICESat-2 Reference Ground Tracks (RGTs)

--auxiliary, -a

Sync ICESat-2 auxiliary files for each HDF5 file

--index, -i

Input index of ICESat-2 files to sync

--flatten, -F

Do not create subdirectories

--np, -P

Number of processes to use in file downloads

--timeout, -T

Timeout in seconds for blocking operations

--retry, -R

Connection retry attempts

--log, -l

Output log file

--list, -L

Only print files that could be transferred

--clobber, -C

Overwrite existing data

--checksum

Compare hashes to check for overwriting existing data

--mode, -M

Permissions mode of output files