source: nappy/tags/nappy-beta-0-1/test/testReadAllFFIs.py @ 350

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/tags/nappy-beta-0-1/test/testReadAllFFIs.py@350
Revision 350, 915 bytes checked in by anonymous, 16 years ago (diff)

This commit was manufactured by cvs2svn to create tag
'nappy-beta-0-1'.

  • 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"""
7testReadAllFFIs.py
8==================
9
10Tests all read routines for nappy package.
11
12"""
13
14import os
15import sys
16sys.path.append(os.path.join("..", ".."))
17import nappy ; reload(nappy)
18
19
20FFIs=(1001, 1010, 1020, 2010, 2110, 2160, 2310, 3010, 4010)
21
22for 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.