def scale(self, data, unit):
if self.par['<STR_LIT>']['<STR_LIT>'] ornot conf.scaling.dimensional orunit == '<STR_LIT:1>':<EOL><INDENT>return data, '<STR_LIT>'<EOL><DEDENT>scaling = phyvars.SCALES[unit](self.scales)<EOL>factor = conf.scaling.factors.get(unit, '<STR_LIT:U+0020>')<EOL>if conf.scaling.time_in_y and unit == '<STR_LIT:s>':<EOL><INDENT>scaling /= conf.scaling.yearins<EOL>unit = '<STR_LIT>'<EOL><DEDENT>elif conf.scaling.vel_in_cmpy and unit == '<STR_LIT>':<EOL><INDENT>scaling *= <NUM_LIT:100> * conf.scaling.yearins<EOL>unit = '<STR_LIT>'<EOL><DEDENT>if factor in phyvars.PREFIXES:<EOL><INDENT>scaling *= <NUM_LIT:10>**(-<NUM_LIT:3> * (phyvars.PREFIXES.index(factor) + <NUM_LIT:1>))<EOL>unit = factor + unit<EOL><DEDENT>return data * scaling, unit<EOL>
Scales quantity to obtain dimensionful quantity.

        Args:
            data (numpy.array): the quantity that should be scaled.
            dim (str): the dimension of data as defined in phyvars.
        Return:
            (float, str): scaling factor and unit string.
        Other Parameters:
            conf.scaling.dimensional: if set to False (default), the factor is
                always 1.