Prevent re-downloading the model file
diff --git a/examples/simple_model_tstd.py b/examples/simple_model_tstd.py
index 46ff7ae..3420f9b 100644
--- a/examples/simple_model_tstd.py
+++ b/examples/simple_model_tstd.py
@@ -16,6 +16,7 @@
# under the License.
+from os import path
import urllib
import ocw.data_source.local as local
@@ -31,8 +32,11 @@
# Filename for the output image/plot (without file extension)
OUTPUT_PLOT = "knmi_temporal_std"
-# Download necessary NetCDF file
-urllib.urlretrieve(FILE_LEADER + FILE_1, FILE_1)
+# Download necessary NetCDF file if needed
+if path.exists(FILE_1):
+ pass
+else:
+ urllib.urlretrieve(FILE_LEADER + FILE_1, FILE_1)
""" Step 1: Load Local NetCDF File into OCW Dataset Objects """
print "Loading %s into an OCW Dataset Object" % (FILE_1,)