How to use the salem.wrftools.FakeVariable.__init__ function in salem

To help you get started, we’ve selected a few salem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fmaussion / salem / salem / wrftools.py View on Github external
def __init__(self, nc):
        FakeVariable.__init__(self, nc)
        self._copy_attrs_from(nc.variables['PH'])
        self.units = 'm'
        self.description = 'Full model height'
github fmaussion / salem / salem / wrftools.py View on Github external
def __init__(self, nc):
        FakeVariable.__init__(self, nc)
        self._copy_attrs_from(nc.variables['T'])
        self.units = 'K'
        self.description = 'Temperature'
github fmaussion / salem / salem / wrftools.py View on Github external
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]
github fmaussion / salem / salem / wrftools.py View on Github external
def __init__(self, nc):
        FakeVariable.__init__(self, nc)
        self._copy_attrs_from(nc.variables['T'])
        self.units = 'K'
        self.description = 'Potential temperature'
github fmaussion / salem / salem / wrftools.py View on Github external
def __init__(self, nc):
        FakeVariable.__init__(self, nc)
        self._copy_attrs_from(nc.variables['P'])
        self.units = 'hPa'
        self.description = 'Full model pressure'
github fmaussion / salem / salem / wrftools.py View on Github external
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]
github fmaussion / salem / salem / wrftools.py View on Github external
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'
github fmaussion / salem / salem / wrftools.py View on Github external
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'
github fmaussion / salem / salem / wrftools.py View on Github external
def __init__(self, nc):
        FakeVariable.__init__(self, nc)
        self._copy_attrs_from(nc.variables['T2'])
        self.units = 'C'
        self.description = '2m Temperature'