From: Jose R. V. <vi...@gm...> - 2009-06-17 17:38:05
|
Hello Alex & SGeMS list, I would like to export a Snesim realization from SGeMS to GeoEAS format using the Python script below: def sgems2gslib(filename,grid_name,prop_names): props=[] fid = open(filename,'w+') fid.write('GSLIB output file'+'\n'+str(len(prop_names))+'\n') for i in range(0,len(prop_names)): fid.write(prop_names[i]+'\n') props.extend(sgems.get_property(grid_name, prop_names[i])) for i in range(len(props)/len(prop_names)): for j in range(0,len(prop_names)): fid.write(str(props[i+j*(len(props)/len(prop_names))])+' ') fid.write('\n') fid.close() However, the export fails. The error message is show below: Traceback (most recent call last): File "", line 2, in ? File "C:/utilities.py", line 21, in sgems2gslib fid = open(filename,'w+') IOError: [Errno 2] No such file or directory: 'C:\\Apps\\VILLAJ\\\x0cacies.out' Interestingly, if I use the same script to export a Sgsim realization, the output file is generated. I was wondering if you have any ideas on how to solve this little issue. Kind regards, -- Jose R. Villa |