source: nappy/branches/nappy-eggable/nappy/unit_tests/test_2010_to_2110.py @ 5068

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/branches/nappy-eggable/nappy/unit_tests/test_2010_to_2110.py@5068
Revision 5068, 499 bytes checked in by spascoe, 11 years ago (diff)

I'm branching to experiment with making nappy a distutils package that
can be eggified.

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