Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['PH'])
self.units = 'm'
self.description = 'Full model height'
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['T'])
self.units = 'K'
self.description = 'Temperature'
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['T2'])
self.units = 'hPa'
self.description = 'Sea level pressure'
dims = list(nc.variables['T'].dimensions)
self.ds = np.nonzero(['bottom_top' in d for d in dims])[0][0]
self._ds_shape = nc.variables['T'].shape[self.ds]
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['T'])
self.units = 'K'
self.description = 'Potential temperature'
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['P'])
self.units = 'hPa'
self.description = 'Full model pressure'
def __init__(self, nc, accvn):
FakeVariable.__init__(self, nc)
self.accvn = accvn
self._copy_attrs_from(nc.variables[self.accvn])
# Needed later
self._nel = nc.variables[self.accvn].shape[0]
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['RAINC'])
self.units = 'mm h-1'
self.description = 'Total precipitation rate'
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['PH'])
self.units = 'm2 s-2'
self.description = 'Full model geopotential'
def __init__(self, nc):
FakeVariable.__init__(self, nc)
self._copy_attrs_from(nc.variables['T2'])
self.units = 'C'
self.description = '2m Temperature'