source: nappy/trunk/nappy/unit_tests/test_2010_to_2110.py @ 3524

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

Fixed, renewed and added tests.

Line 
1import nappy.nc_interface.na_to_nc
2import nappy.nc_interface.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 = nappy.nc_interface.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.