Skip to content

Commit

Permalink
bugfix xyz2Sphere input
Browse files Browse the repository at this point in the history
  • Loading branch information
mjucker authored and mjucker committed Jul 31, 2016
1 parent bc266fb commit b02c932
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions basic.py
Expand Up @@ -153,10 +153,6 @@ def LoadData( fileName, ncDims=['lon','lat','pfull'], aspectRatios=[1,1,1], logC
output_nc -- netCDF reader object with the file data as read
transCoor -- Calculator filter corresponding to the transformed coordinates
"""
# Check if file exists
import os
if not os.path.isfile(fileName):
raise IOError('file '+fileName+' does not exist')
# outputDimensions must be in same sequence as in netCDF file, except time (e.g. ['pfull','lat','lon'] ). This is usually the "wrong" way round. Thus, we invert it here
outputDimensions = ncDims[::-1]
output_nc = NetCDFReader( FileName=[fileName] )
Expand Down Expand Up @@ -330,7 +326,7 @@ def xyz2Sphere(coords, y=None, z=None):
"""
from math import sqrt,pi,sin,cos,asin,atan
if isinstance(coords,list) or isinstance(coords,tuple):
if len(coords == 3):
if len(coords) == 3:
x=coords[0];y=coords[1];z=coords[2]
else:
raise Exception("xyz2Sphere: coords has to be a list of length 3 (x,y,z), or a scalar")
Expand Down

0 comments on commit b02c932

Please sign in to comment.