Hi,
I have some very large ascii (csv) files (approx 9.9 gb each) and I'm trying to write an NCL script to (a) create a subset of them, and output this to a netcdf file, and (b) visualise them.
I've done (a) via the code:
filename = "/dir/XYZ_dataset.csv"
lines = asciiread(filename,-1,"string")
delim = ","
lon = str_get_field(lines,1,delim)
lat = str_get_field(lines,2,delim)
varname = str_get_field(lines,3,delim)
year = str_get_field(lines,4,delim)
potveg =str_get_field(lines,9,delim)
I then convert data types from string to whatever they're supposed to be using the NCL type converter functions
e.g. lon_f = stringtofloat(lon)
I then create a subset using the onedtond function; subset = (/var 1,var 3, var 5/) etc...
When I print this subset, it gives me a long list of values with their column and row numbers.
My questions are:
- Is there an easy way I can write this subset of ascii data to netcdf format?
- how would I visualise this data? basically I want to be able to draw a map of vegetation classes on a global grid. - how would I go about doing this - none of the plot types I've come across seem to do what I want...
Thanks in advance if anyone can give me some pointers....
Regards,
Wil
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 25 14:58:46 2010
This archive was generated by hypermail 2.1.8 : Fri Oct 29 2010 - 13:25:49 MDT