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

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

Inserted license information.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#   Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
2#   This software may be distributed under the terms of the
3#   Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
4
5import sys
6import os
7sys.path.append(os.path.join("..", ".."))
8import nappy ; reload(nappy)
9
10for ffi in [1001, 2010, 3010, 4010]:
11    print "Reading in NASA Ames 1001:"
12    infile=os.path.join("..", "data_files", "%s.na" % ffi)
13    x=nappy.openNAFile(infile)
14    x.readData()
15    print "Read file OK."
16
17    outfile=os.path.join("..", "output", "out%s.nc" % ffi)
18    print "Writing output NetCDF file %s" % outfile
19    x.toCdmsFile(outfile)
20    import os
21    if os.path.isfile(outfile): print "Some output was written OK."
Note: See TracBrowser for help on using the repository browser.