Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DATA: renamed download_gallery_data to gallery.load_dataset [MPY-289]
- Loading branch information
1 parent
3912e2d
commit 7788f8a
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# (C) Copyright 2017- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
import metview as mv | ||
|
||
|
||
def load_dataset(filename): | ||
base_url = "http://download.ecmwf.org/test-data/metview/gallery/" | ||
try: | ||
d = mv.download(url=base_url + filename, target=filename) | ||
return d | ||
except: | ||
raise Exception( | ||
"Could not download file " + filename + " from the download server" | ||
) |