Commit 79939b06 authored by Greifeneder Felix's avatar Greifeneder Felix

Updated documentation and fixed a bug related to the availability of

GLDAS
parent c304df93
......@@ -9,7 +9,7 @@
.. _welcome:
PYthon Sentinel-1 soil-Moisture Mapping (PYSMM)
PYthon Sentinel-1 soil-Moisture Mapping Toolbox (PYSMM)
===============================================
This package acts as an interface to Google Earth Engine for the estimation of surface soil moisture based
......
......@@ -1381,6 +1381,16 @@ class GEE_extent(object):
.select('SoilMoi0_10cm_inst') \
.filterDate(doi, doi.advance(3, 'hour'))
if gldas.size().getInfo() == 0:
print('No GLDAS product for specified date')
gldas_test = ee.ImageCollection("NASA/GLDAS/V021/NOAH/G025/T3H") \
.select('SoilMoi0_10cm_inst')
last_gldas = gldas_test.aggregate_max('system:index').getInfo()
print('ID of latest available product: ' + last_gldas)
self.GLDAS_IMG = None
self.GLDAS_MEAN = None
return
gldas_img = ee.Image(gldas.first()).resample().clip(self.roi)
try:
......
......@@ -36,6 +36,8 @@ def get_map(minlon, minlat, maxlon, maxlat, outpath,
masksnow=masksnow)
# retrieve GLDAS
GEE_interface.get_gldas()
if GEE_interface.GLDAS_IMG is None:
return
# get Globcover
GEE_interface.get_globcover()
# get the SRTM
......@@ -72,6 +74,8 @@ def get_map(minlon, minlat, maxlon, maxlat, outpath,
masksnow=masksnow)
# retrieve GLDAS
GEE_interface.get_gldas()
if GEE_interface.GLDAS_IMG is None:
return
# get Globcover
GEE_interface.get_globcover()
# get the SRTM
......
......@@ -24,6 +24,4 @@ setup(name='pysmm',
'scipy'],
python_requires='>=2.6',
include_package_data=True,
zip_safe=False,
test_suite='nose.collector',
tests_require=['nose'])
\ No newline at end of file
zip_safe=False)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment