MCPcopy Index your code
hub / github.com/pydata/xarray / get_variables

Method get_variables

xarray/backends/pydap_.py:178–194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

176 return Variable(dimensions, data, var.attributes)
177
178 def get_variables(self):
179 # get first all variables arrays, excluding any container type like,
180 # `Groups`, `Sequence` or `Structure` types
181 try:
182 _vars = list(self.ds.variables())
183 _vars += list(self.ds.grids()) # dap2 objects
184 except AttributeError:
185 from pydap.model import GroupType
186
187 _vars = [
188 var
189 for var in self.ds.keys()
190 # check the key is not a BaseType or GridType
191 if not isinstance(self.ds[var], GroupType)
192 ]
193
194 return FrozenDict((k, self.open_store_variable(self.ds[k])) for k in _vars)
195
196 def get_attrs(self):
197 """Remove any opendap specific attributes"""

Callers

nothing calls this directly

Calls 4

open_store_variableMethod · 0.95
FrozenDictFunction · 0.90
keysMethod · 0.80
variablesMethod · 0.45

Tested by

no test coverage detected