diff --git a/legends.ipynb b/legends.ipynb index 4c38038..96989ab 100644 --- a/legends.ipynb +++ b/legends.ipynb @@ -502,7 +502,7 @@ "if p['showvalues'] is False:\n", " levs_labels = [ '' for x in range(levs.size) ]\n", "\n", - "x, y = np.meshgrid(np.arange(1), np.arange(1))\n", + "x, y = np.meshgrid(np.ones(2), np.ones(2))\n", "cs = ax.contourf(x, y, x, levels=levs, norm=CNorm, cmap=get_cmap(p['colormap']), extend='max')\n", "\n", "proxy = [plt.Rectangle((0, 0), 0, 0, fc=pc.get_facecolor()[0]) for pc in cs.collections]\n", diff --git a/wms/models/datasets/ugrid.py b/wms/models/datasets/ugrid.py index 8a0190f..1706930 100644 --- a/wms/models/datasets/ugrid.py +++ b/wms/models/datasets/ugrid.py @@ -125,7 +125,7 @@ def update_cache(self, force=False): # support cases where there may be more than one variable with standard_name='time' in a dataset for time_var in time_vars: try: - time_var_obj = cached_nc.createVariable(time_var._name, + time_var_obj = cached_nc.createVariable(time_var.name, time_var.dtype, time_var.dimensions) except RuntimeError: diff --git a/wms/views.py b/wms/views.py index a684251..3f36bb4 100644 --- a/wms/views.py +++ b/wms/views.py @@ -3,7 +3,6 @@ from collections import OrderedDict from django.conf import settings -from django.template import RequestContext from django.http import HttpResponse from django.contrib.auth import authenticate, login, logout from django.template.response import TemplateResponse