示例#1
0
 def get_compset_var_settings(self, compset, grid):
     '''
     Variables can be set in config_compsets.xml in entry id settings with compset and grid attributes
     find and return id value pairs here
     '''
     nodes = self.get_nodes("entry")
     # Get an empty entryid obj to use
     entryidobj = EntryID()
     result = []
     for node in nodes:
         value = entryidobj.get_default_value(node, {"grid":grid, "compset":compset})
         if value is not None:
             result.append((node.get("id"), value))
     return result
示例#2
0
 def get_compset_var_settings(self, compset, grid):
     '''
     Variables can be set in config_compsets.xml in entry id settings with compset and grid attributes
     find and return id value pairs here
     '''
     nodes = self.get_nodes("entry")
     # Get an empty entryid obj to use
     entryidobj = EntryID()
     result = []
     for node in nodes:
         value = entryidobj.get_default_value(node, {
             "grid": grid,
             "compset": compset
         })
         if value is not None:
             result.append((node.get("id"), value))
     return result
示例#3
0
文件: compsets.py 项目: bertinia/cime
    def get_compset_var_settings(self, compset, grid):
        '''
        Variables can be set in config_compsets.xml in entry id settings with compset and grid attributes
        find and return id value pairs here
        '''
        entries = self.get_optional_child("entries")
        result = []
        if entries is not None:
            nodes = self.get_children("entry", root=entries)
            # Get an empty entryid obj to use
            entryidobj = EntryID()
            for node in nodes:
                value = entryidobj.get_default_value(node, {"grid":grid, "compset":compset})
                if value is not None:
                    result.append((self.get(node, "id"), value))

        return result
示例#4
0
    def get_compset_var_settings(self, compset, grid):
        '''
        Variables can be set in config_compsets.xml in entry id settings with compset and grid attributes
        find and return id value pairs here
        '''
        entries = self.get_optional_child("entries")
        result = []
        if entries is not None:
            nodes = self.get_children("entry", root=entries)
            # Get an empty entryid obj to use
            entryidobj = EntryID()
            for node in nodes:
                value = entryidobj.get_default_value(node, {
                    "grid": grid,
                    "compset": compset
                })
                if value is not None:
                    result.append((self.get(node, "id"), value))

        return result