source: nappy/trunk/nappy/nc_interface/ffi_req_tests.py @ 3469

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

Some temporary scripts to test functionality before formalising into unit tests.

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