source: nappy/trunk/nappy/nc_interface/test_2010_to_2110.py @ 3478

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/nappy/nc_interface/test_2010_to_2110.py@3478
Revision 3478, 439 bytes checked in by astephen, 12 years ago (diff)

Tested writing to CSV from NetCDF and converting FFIs.

Line 
1import na_to_nc
2import nc_to_na
3import os
4
5in_dir = "../../test_outputs"
6out_dir = "../../test_outputs"
7in_dir = out_dir
8
9
10ffi_in, ffi_out = (2010, 2110)
11
12infile = os.path.join(in_dir, "%s.nc" % (ffi_in))
13outfile = os.path.join(out_dir, "%s_from_nc_%s.na" % (ffi_out, ffi_in))
14
15print "Reading:", infile
16x = nc_to_na.NCToNA(infile, requested_ffi=ffi_out)
17
18print "Writing:", outfile
19x.writeNAFiles(outfile, delimiter=",", float_format="%g")
Note: See TracBrowser for help on using the repository browser.