Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/test/testReadAllFFIs.py@349
Revision 349,
915 bytes
checked in by selatham, 16 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 | #!/usr/bin/env python |
---|
2 | # Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). |
---|
3 | # This software may be distributed under the terms of the |
---|
4 | # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt |
---|
5 | |
---|
6 | """ |
---|
7 | testReadAllFFIs.py |
---|
8 | ================== |
---|
9 | |
---|
10 | Tests all read routines for nappy package. |
---|
11 | |
---|
12 | """ |
---|
13 | |
---|
14 | import os |
---|
15 | import sys |
---|
16 | sys.path.append(os.path.join("..", "..")) |
---|
17 | import nappy ; reload(nappy) |
---|
18 | |
---|
19 | |
---|
20 | FFIs=(1001, 1010, 1020, 2010, 2110, 2160, 2310, 3010, 4010) |
---|
21 | |
---|
22 | for ffi in FFIs: |
---|
23 | print "\n\nTesting FFI: ", ffi |
---|
24 | file=os.path.join("..", "data_files", "%s.na" % ffi) |
---|
25 | if not os.path.exists(file): file=os.path.join("..", "data_files", "%sa.na" % ffi) |
---|
26 | f=nappy.openNAFile(file) |
---|
27 | f.readData() |
---|
28 | print "DX:",f.DX |
---|
29 | print "VNAME", f.VNAME |
---|
30 | print "V:",f.V[0] |
---|
31 | |
---|
32 | if f.NAUXV>1: |
---|
33 | print "AUX:" |
---|
34 | print f.ANAME[0], f.ASCAL[0] |
---|
35 | print f.A[0] |
---|
Note: See
TracBrowser
for help on using the repository browser.