Skip to content

Commit

Permalink
Merge pull request #31 from lewismc/master
Browse files Browse the repository at this point in the history
Fix syntax issues in master branch
  • Loading branch information
RileyWilliams authored Jul 7, 2017
2 parents 8c65529 + 88ee160 commit 60a3e2d
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions pycovjson/read_netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,8 @@ def get_axis(self, variable):
axis = list(map(str.lower, list(axis)))
return axis
except:
<<<<<<< HEAD
print('Warning: Variable ' + str(variable) + ' has no axis attribute. ')
pass
=======
print("Error occured: Variable '%s' has no axis attribute" % (variable))
>>>>>>> 1cf81ed12227447eddf8904627cad7ad9c40873d
pass
try:
axes_list = []
axes_dict = self.get_axes()
Expand Down Expand Up @@ -362,13 +358,12 @@ def get_axes(self):
except:
pass

<<<<<<< HEAD
# if coord in x_list or self.dataset[coord].standard_name in x_list: axes_dict['x'] = coord
# if coord in y_list or self.dataset[coord].standard_name in y_list: axes_dict['y'] = coord
try:
if coord in t_list or self.dataset[coord].standard_name in t_list:
if coord in t_list or self.dataset[coord].standard_name in t_list or self.dataset[coord].name in t_list:
axes_dict['t'] = coord
if coord in z_list or self.dataset[coord].standard_name in z_list:
if coord in z_list or self.dataset[coord].standard_name in z_list or self.dataset[coord].name in z_list:
axes_dict['z'] = coord
except:
print("Error: DataArray does not include standard name.")
Expand All @@ -377,12 +372,6 @@ def get_axes(self):
if len(axes_dict) < 2:
print('Error: File does not conform to CF Conventions')
exit()
=======
if coord in t_list or self.dataset[coord].name in t_list:
axes_dict['t'] = coord
if coord in z_list or self.dataset[coord].name in z_list:
axes_dict['z'] = coord
>>>>>>> 1cf81ed12227447eddf8904627cad7ad9c40873d

return axes_dict

Expand Down

0 comments on commit 60a3e2d

Please sign in to comment.