Skip to main content

SMAP (Soil Moisture Active Passive) data readers

Project description

https://travis-ci.org/TUW-GEO/smap_io.svg?branch=master https://coveralls.io/repos/github/TUW-GEO/smap_io/badge.svg?branch=master https://badge.fury.io/py/smap_io.svg https://zenodo.org/badge/12761/TUW-GEO/smap_io.svg

SMAP (Soil Moisture Active Passive) data readers.

Works great in combination with pytesmo.

Installation

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

Documentation Status

Example

SPL3SMP

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 = ds.read(datetime(2015, 4, 1))
assert list(image.data.keys()) == ['soil_moisture']
assert image.data['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',
                     'SMAP_L3_SM_P_20150401_R13080_001.h5')
ds = SPL3SMP_Img(fname)
image = ds.read()
assert list(image.data.keys()) == ['soil_moisture']
assert image.data['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.

Source Distribution

smap_io-0.1.tar.gz (22.1 MB view details)

Uploaded Source

Built Distribution

smap_io-0.1-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file smap_io-0.1.tar.gz.

File metadata

  • Download URL: smap_io-0.1.tar.gz
  • Upload date:
  • Size: 22.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for smap_io-0.1.tar.gz
Algorithm Hash digest
SHA256 b4834b9fb6793ff243cc73f0ba677d98acf5d0ace72df12d80250f43d4e26f31
MD5 c203fd6dfc8a33c6ad6a3cff5a46cf5a
BLAKE2b-256 e1ef330dcac0a72f6a75b217728e9755109cf435f5f95eb0caea8ca0dd94e3f4

See more details on using hashes here.

File details

Details for the file smap_io-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for smap_io-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4e6c7e08ca6632d745ee0826653b59548a61e6884d025d341c6eb06e164a8f15
MD5 ee486e374474c1761cfd36867b7cd857
BLAKE2b-256 dda253e96a5981ea31e65eed3021b0bfb4639b1e7063a58f2718765e95bb5af9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page