Skip to content

Commit b02c932

Browse files
mjuckermjucker
mjucker
authored and
mjucker
committed
bugfix xyz2Sphere input
1 parent bc266fb commit b02c932

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

basic.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ def LoadData( fileName, ncDims=['lon','lat','pfull'], aspectRatios=[1,1,1], logC
153153
output_nc -- netCDF reader object with the file data as read
154154
transCoor -- Calculator filter corresponding to the transformed coordinates
155155
"""
156-
# Check if file exists
157-
import os
158-
if not os.path.isfile(fileName):
159-
raise IOError('file '+fileName+' does not exist')
160156
# 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
161157
outputDimensions = ncDims[::-1]
162158
output_nc = NetCDFReader( FileName=[fileName] )
@@ -330,7 +326,7 @@ def xyz2Sphere(coords, y=None, z=None):
330326
"""
331327
from math import sqrt,pi,sin,cos,asin,atan
332328
if isinstance(coords,list) or isinstance(coords,tuple):
333-
if len(coords == 3):
329+
if len(coords) == 3:
334330
x=coords[0];y=coords[1];z=coords[2]
335331
else:
336332
raise Exception("xyz2Sphere: coords has to be a list of length 3 (x,y,z), or a scalar")

0 commit comments

Comments
 (0)