Changeset 1083 for trunk/UTIL


Ignore:
Timestamp:
Oct 28, 2013, 5:52:39 PM (11 years ago)
Author:
aslmd
Message:

planetoplot: cf. previous commit. complements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py

    r1082 r1083  
    4848# inspect variables and dimensions in a netCDF file
    4949def inspect(filename):
     50    print "---------------------------------------------------------------"
    5051    print "**** INSPECT FILE",filename
    5152    test = netCDF4.Dataset(filename)
    52     #for obj in test.dimensions.values(): print obj
     53    print "---------------------------------------------------------------"
     54    print "**** DIMENSIONS:"
     55    for obj in test.dimensions.values(): print obj
     56    print "---------------------------------------------------------------"
    5357    print "**** VARIABLES: ",test.variables.keys()
     58    print "---------------------------------------------------------------"
    5459    findinlist(test,glob_listx,"**** FOUND X-AXIS ---> ")
    5560    findinlist(test,glob_listy,"**** FOUND Y-AXIS ---> ")
     
    5762    findinlist(test,glob_listt,"**** FOUND T-AXIS ---> ")
    5863    print "**** ( according to settings in "+whereset+zefile+" )"
     64    print "---------------------------------------------------------------"
    5965# -- function defined for the above function inspect
    6066def findinlist(netcdfobj,extlist,message):
     
    7076        print output ; output = ""
    7177    if not found:
    72       print message+"not found. will simply use index."       
     78      print message+"not found. will simply use index (check out dimensions)."
    7379
    7480# request a given attribute (and test if it is here)
Note: See TracChangeset for help on using the changeset viewer.