Skip to main content

SMAP (Soil Moisture Active Passive) data readers

Project description

SMAP (Soil Moisture Active Passive) data readers.

Works great in combination with pytesmo.


Setup of a complete environment with conda can be performed using the following commands:

conda create -q -n smap_io-environment numpy h5py pyproj
source activate smap_io-environment
pip install smap_io

Supported Products

  • SPL3SMP: SMAP L3 Radiometer Global Daily 36 km EASE-Grid Soil Moisture


Documentation Status



After downloading the data you will have a path with subpaths of the format YYYY.MM.DD. Let’s call this path root_path. To read the data of a certain date use the following code:

from smap_io import SPL3SMP_Ds
root_path = os.path.join(os.path.dirname(__file__),
                         'test_data', 'SPL3SMP')
ds = SPL3SMP_Ds(root_path)
image =, 4, 1))
assert list( == ['soil_moisture']
assert['soil_moisture'].shape == (406, 964)

The returned image is of the type pygeobase.Image. Which is only a small wrapper around a dictionary of numpy arrays.

If you only have a single image you can also read the data directly

from smap_io import SPL3SMP_Img
fname = os.path.join(os.path.dirname(__file__),
                     'test_data', 'SPL3SMP', '2015.04.01',
ds = SPL3SMP_Img(fname)
image =
assert list( == ['soil_moisture']
assert['soil_moisture'].shape == (406, 964)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for smap-io, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size smap_io-0.1-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size smap_io-0.1.tar.gz (22.1 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page