Changeset 1083 for trunk/UTIL
- Timestamp:
- Oct 28, 2013, 5:52:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
r1082 r1083 48 48 # inspect variables and dimensions in a netCDF file 49 49 def inspect(filename): 50 print "---------------------------------------------------------------" 50 51 print "**** INSPECT FILE",filename 51 52 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 "---------------------------------------------------------------" 53 57 print "**** VARIABLES: ",test.variables.keys() 58 print "---------------------------------------------------------------" 54 59 findinlist(test,glob_listx,"**** FOUND X-AXIS ---> ") 55 60 findinlist(test,glob_listy,"**** FOUND Y-AXIS ---> ") … … 57 62 findinlist(test,glob_listt,"**** FOUND T-AXIS ---> ") 58 63 print "**** ( according to settings in "+whereset+zefile+" )" 64 print "---------------------------------------------------------------" 59 65 # -- function defined for the above function inspect 60 66 def findinlist(netcdfobj,extlist,message): … … 70 76 print output ; output = "" 71 77 if not found: 72 print message+"not found. will simply use index ."78 print message+"not found. will simply use index (check out dimensions)." 73 79 74 80 # request a given attribute (and test if it is here)
Note: See TracChangeset
for help on using the changeset viewer.