Changeset 3416 for nappy


Ignore:
Timestamp:
14/02/08 13:52:53 (12 years ago)
Author:
astephen
Message:

Getting NC to NA working but needs nappy_api.py to be changed!

Location:
nappy/trunk/nappy/nc_interface
Files:
1 added
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/nc_interface/cdms_to_na.py

    r3405 r3416  
    8787 
    8888        # Make first call to collector class that creates NA dict from CDMS variables and global atts dicts 
    89         collector = NAContentCollector(variables, self.global_atts) 
     89        collector = nappy.nc_interface.na_content_collector.NAContentCollector(variables, self.global_atts) 
    9090        collected_dict = collector.collectNAContent() 
    9191        # NOTE: collected_dict has attributes: na_dict, var_ids, unused_vars 
    9292 
    9393        # Return if no files returned 
    94         if collected.var_ids == None: 
     94        if collected_dict.var_ids == None: 
    9595            msg = "\nNo files created after variables parsed." 
    9696            if DEBUG: print msg 
     
    105105        # in attempt to convert all to a set of na_dicts 
    106106        while len(collector.unused_vars) > 0: 
    107             collector = NAContentCollector(collector.unused_vars, self.global_atts) 
     107            collector = nappy.nc_interface.na_content_collector.NAContentCollector(collector.unused_vars, self.global_atts) 
    108108            collected_dict = collector.collectNAContent()            
    109109            self.output_message += collector.output_message 
     
    137137                 
    138138            vars.append(var_obj) 
    139             return vars 
     139 
     140        return vars 
    140141 
    141142    def _reorderVars(self, variables): 
  • nappy/trunk/nappy/nc_interface/na_content_collector.py

    r3405 r3416  
    9595                self.na_dict["X"] = self.na_dict["X"][0] 
    9696 
    97     def analyseVariables(self): 
     97    def _analyseVariables(self): 
    9898        """ 
    9999        Method to examine the content of CDMS variables to return 
  • nappy/trunk/nappy/nc_interface/nc_to_na.py

    r3405 r3416  
    7676            var_ids = [var_ids] 
    7777 
    78         for var_id in f.listvariables(): 
     78        for var_id in fin.listvariables(): 
    7979            if var_ids == None or var_id in var_ids: 
    8080                if var_ids not in exclude_vars: 
    8181                    cdms_variables.append(fin(var_id)) 
    8282 
    83         globals = cdms_file.attributes 
     83        globals = fin.attributes 
    8484        return (cdms_variables, globals)  
    8585 
Note: See TracChangeset for help on using the changeset viewer.