Skip to content

Commit

Permalink
DATA: renamed download_gallery_data to gallery.load_dataset [MPY-289]
Browse files Browse the repository at this point in the history
  • Loading branch information
iainrussell committed Feb 5, 2021
1 parent 3912e2d commit 7788f8a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions metview/gallery.py
@@ -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"
)

0 comments on commit 7788f8a

Please sign in to comment.