# Adapted for numpy/ma/cdms2 by convertcdms.py
import cdms2 as cdms,sys,os
import cdat_info

path=cdat_info.get_sampledata_path()+'/'

# List files in sample_data directory
my_files=os.listdir(path)

# Now loops through values in my_files and assign them
# one after the other to file

for file in my_files:
    if file[-3:]=='.nc':     # Deal only with NetCDF files
        print 'Dealing with file:',file
        f=cdms.open(path+file)

        variables=f.listvariables()

        # Now loops through all the variables in the file and print their shape
        for v in variables:
            V=f[v]       # Create a reference to file variable
            print '\t',v,'shape is:',V.shape      # \t is to add a tabulation
            
        f.close()
        



# Adapted for numpy/ma/cdms2 by convertcdms.py
import cdms2 as cdms,sys,os
import cdat_info

path=cdat_info.get_sampledata_path()+'/'

# List files in sample_data directory
my_files=os.listdir(path)

# Now loops through values in my_files and assign them
# one after the other to file

for file in my_files:
    if file[-3:]=='.nc':     # Deal only with NetCDF files
        print 'Dealing with file:',file
        f=cdms.open(path+file)

        variables=f.listvariables()

        # Now loops through all the variables in the file and print their shape
        for v in variables:
            V=f[v]       # Create a reference to file variable
            print '\t',v,'shape is:',V.shape      # \t is to add a tabulation
            
        f.close()
        



# Adapted for numpy/ma/cdms2 by convertcdms.py # List files in sample_data directory # Now loops through values in my_files and assign them # one after the other to file # Deal only with NetCDF files # Now loops through all the variables in the file and print their shape # Create a reference to file variable # \t is to add a tabulation