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

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

Initial revision

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