Changeset 58


Ignore:
Timestamp:
10/02/06 13:21:11 (14 years ago)
Author:
domlowe
Message:

final commit before switch to SVN

Location:
CSML/trunk/Coapec
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CSML/trunk/Coapec/csmllibs/csmlfileextracts.py

    r57 r58  
    4040                        #dimValue =fileobj.dimensions[allDimNames[j]] 
    4141                        dimValue =DI.getSizeOfAxis(allDimNames[j]) 
     42                        if dimValue == None: 
     43                            dimValue ='' 
    4244                        arraySize_element.appendChild(csmldoc.createTextNode(str(dimValue))) 
    4345                        Extract_element.appendChild(arraySize_element) 
  • CSML/trunk/Coapec/csmlscan.py

    r57 r58  
    262262 
    263263 
    264 #maybe these functions don't need to be here.. 
    265 #put in csml extra? 
    266  
    267  
    268 #def getArraySize(ncvar): 
    269 #    #iterates through all dimensions in variable to get array size. 
    270 #    var = ncvar     
    271 #    size = var.shape 
    272 #    varsize = 1 
    273 #    for item in size: 
    274 #        varsize = item *varsize 
    275 #    return varsize 
    276  
    277  
    278  
    279  
    280 #def index(directory,recurse): 
    281 #    # traverses directory trees, returns list of netcdf files with full path. 
    282 #    #if recurse == 0 then indexing is non-recursive (only files in first directory are indexed) 
    283 #    stack = [directory] 
    284 #    files = [] 
    285 #    recursive = recurse 
    286 #    while stack: 
    287 #        directory = stack.pop() 
    288 #        for file in os.listdir(directory): 
    289 #            fullname = os.path.join(directory, file) 
    290 #            if file[0] == '.': 
    291 #                #file is in hidden directory, don't process 
    292 #                continue 
    293 #            if fullname.endswith('.nc'): 
    294            #     files.append(fullname) 
    295           #  elif fullname.endswith('.pp'): 
    296          #       files.append(fullname) 
    297        #     elif fullname.endswith('.hdf'): 
    298         #        files.append(fullname) 
    299       #      elif fullname.endswith('.grb'): 
    300      #           files.append(fullname) 
    301     #        if recursive == 1: 
    302    #             if os.path.isdir(fullname) and not os.path.islink(fullname): 
    303   #                  stack.append(fullname) 
    304  
    305  #   return files 
    306  
    307          
    308 #def shortfilename(fullname): 
    309     #returns the file name only from a full path 
    310     #filename=os.path.basename(fullname) 
    311     #return filename 
    312  
    313 #def relativepath(fullname,directory): 
    314     #returns path and filename relative to directory 
    315     #eg  relativepath("/home/users/me/csmldata/directorya/directorya1/directorya2/file.nc", "/home/users/me/csmldata") 
    316     #will return "directorya/directorya1/directorya2/file.nc" 
    317  #   snip = len(directory) 
    318   #  relpath = fullname[snip:] 
    319    # return relpath 
    320  
    321  
    322  
    323  
    324  
    325  
    326  
    327  
    328  
    329  
    330  
    331  
    332  
    333  
    334  
     264 
     265 
     266 
     267 
     268 
     269 
     270 
     271 
     272 
     273 
Note: See TracChangeset for help on using the changeset viewer.