Hi all,<br><br>I would like to know if it's possible to read data from a netcdf file and export it into an ASCII file. <br>I'm trying to get the latitude, longitude and a determinate value of a netcdf file. But I don't know exactly how to do it.<br>
I succeed to open and read a netcdf file but i don't know how to export the data.<br>Here is my simple script :<br><br>import Scientific.IO.NetCDF as nc<br>from Numeric import * <br>import sys<br><br>try :<br>    ncFile = nc.NetCDFFile("tos_O1_2001-2002.nc","r")<br>
except :<br>    print "can't open the file"<br>    sys.exit(1)<br><br>try : <br>    print "################# Dimensions #################"<br>    print ncFile.dimensions.keys()<br><br>    print "################# Variables #################"<br>
    print ncFile.variables.keys()<br>    #return ['time_bnds', 'lat_bnds', 'lon', 'lon_bnds', 'time', 'lat', 'tos'<br><br>    print "################# Var Dim #################"<br>
    tos = ncFile.variables["tos"]<br>    print tos.dimensions<br>    #return : ('time', 'lat', 'lon')<br><br><br>    tosValue = tos.getValue()<br><br>except :<br>    ncFile.close()<br><br>
<br><br>Do you know how I can get for each tos feature the lat, lon and time values.<br><br>Best regards<br><br>Arnaud<br>