source: nappy/trunk/test/testCdmsWrite.py @ 344

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/test/testCdmsWrite.py@344
Revision 344, 524 bytes checked in by astephen, 15 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1import sys 
2import os
3sys.path.append(os.path.join("..", ".."))
4import nappy ; reload(nappy)
5
6for ffi in [1001, 2010, 3010, 4010]:
7    print "Reading in NASA Ames 1001:"
8    infile=os.path.join("..", "data_files", "%s.na" % ffi)
9    x=nappy.openNAFile(infile)
10    x.readData()
11    print "Read file OK."
12
13    outfile=os.path.join("..", "output", "out%s.nc" % ffi)
14    print "Writing output NetCDF file %s" % outfile
15    x.toCdmsFile(outfile)
16    import os
17    if os.path.isfile(outfile): print "Some output was written OK."
Note: See TracBrowser for help on using the repository browser.