Skip to content

Commit

Permalink
Changed SRTM download urls (#505)
Browse files Browse the repository at this point in the history
* Changed SRTM download url as the old one was dead

* changed url in test_srtm
  • Loading branch information
matthiasdusch authored and fmaussion committed Jul 18, 2018
1 parent bb666ca commit 9fcd55d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion oggm/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ def test_srtm(self):
fakefile='srtm_39_03.tif')

def down_check(url, cache_name=None, reset=False):
expected = 'http://droppr.org/srtm/v4.1/6_5x5_TIFs/srtm_39_03.zip'
expected = 'http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/' + \
'SRTM_Data_GeoTiff/srtm_39_03.zip'
self.assertEqual(url, expected)
return tf

Expand Down
9 changes: 5 additions & 4 deletions oggm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ def _download_srtm_file_unlocked(zone):
return outpath

# Did we download it yet?
wwwfile = 'http://droppr.org/srtm/v4.1/6_5x5_TIFs/srtm_' + zone + '.zip'
wwwfile = 'http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/' +\
'SRTM_Data_GeoTiff/srtm_' + zone + '.zip'
dest_file = file_downloader(wwwfile)

# None means we tried hard but we couldn't find it
Expand Down Expand Up @@ -2292,7 +2293,7 @@ def compile_climate_input(gdirs, path=True, filename='climate_monthly',
def compile_task_log(gdirs, task_names=[], filesuffix='', path=True,
append=True):
"""Gathers the log output for the selected task(s)
Parameters
----------
gdirs: the list of GlacierDir to process.
Expand Down Expand Up @@ -2335,11 +2336,11 @@ def glacier_characteristics(gdirs, filesuffix='', path=True,
inversion_only=False):
"""Gathers as many statistics as possible about a list of glacier
directories.
It can be used to do result diagnostics and other stuffs. If the data
necessary for a statistic is not available (e.g.: flowlines length) it
will simply be ignored.
Parameters
----------
gdirs: the list of GlacierDir to process.
Expand Down

0 comments on commit 9fcd55d

Please sign in to comment.