Changeset 1674 for TI02-CSML


Ignore:
Timestamp:
07/11/06 10:07:09 (13 years ago)
Author:
domlowe
Message:

iotest.py updated to include test of cdml interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/Examples/scanning/iotest.py

    r1494 r1674  
    11#!/usr/bin/env python 
    22 
    3 import csmllibs 
     3import csml.csmllibs 
     4import sys 
    45 
    56testnetcdf = '/home/users/domlowe/CSML/Coapec/testfiles/xaaqda@pxt09c1.nc' 
    6 #testnasa ='/home/users/domlowe/CSML/Ascoe/eae-96/challenger/ca960608.rc1' 
    7 testnasa ='/home/users/domlowe/CSML/Ascoe/testfiles/FFI-4010.prn' 
     7testnasa ='/home/users/domlowe/CSML/Acsoe/eae-96/challenger/ca960608.rc1' 
     8testcdml='/home/users/domlowe/cdml/e40-1.0-am-195709-200208_expanded.xml' 
     9 
     10 
     11#CDML 
     12f = csml.csmllibs.csmldataiface.DataInterface() 
     13f=f.getUnknownInterfaceType(testcdml) 
     14f.openFile(testcdml) 
     15axeslist=f.getListOfAxes() 
     16print f.getSizeOfAxis('latitude') 
     17f.setAxis('latitude') 
     18print f.getDataForAxis() 
     19print f.getListofVariables() 
     20 
     21f.closeFile() 
     22 
    823 
    924 
    1025#NETCDF/PP 
    11 f1 = csmllibs.csmldataiface.DataInterface() 
     26f1 = csml.csmllibs.csmldataiface.DataInterface() 
    1227f1=f1.setInterfaceType('cdunif') 
    1328 
     
    1732f1.setAxis('latitude') 
    1833print f1.getDataForAxis() 
     34print f1.getSizeOfAxis('latitude') 
     35print f1.getListofVariables() 
    1936 
    2037f1.closeFile() 
     
    2239 
    2340#NASA Ames 
    24 f2=csmllibs.csmldataiface.DataInterface() 
     41f2=csml.csmllibs.csmldataiface.DataInterface() 
    2542f2=f2.setInterfaceType('nappy') 
    2643f2.openFile(testnasa) 
    2744axeslist=f2.getListOfAxes() 
    28 #print axeslist 
    29 #print f2.getSizeOfAxis('Latitude') 
     45print axeslist 
     46print f2.getSizeOfAxis('Midpoint of Sampling Interval in Decimal Julian Day') 
    3047print f2.getListofVariables() 
    3148 
Note: See TracChangeset for help on using the changeset viewer.