@staticmethod
def _transform_tr(width, height, tr_arr):
    """Calculate X and Y resolution and raster sizes from the "-tr" parameter

        Parameters
        -----------
        width : float, width of domain calculated from the "-te" extent parameter
        height: float, height of domain calculated from the "-te" extent parameter
        tr_arr: list, [<x_resolution>, <y_resolution>]

        Raises
        -------
        ValueError : occurs when the given resolution is larger than width or height.

        Returns
        --------
        resolution_x, resolution_y, raster_x_size, raster_y_size : float

        """
    resolution_x = tr_arr[0]
    resolution_y = -tr_arr[1]
    if width < resolution_x or height < resolution_y:
        raise ValueError('"-tr" is too large. width is %s, height is %s ' %
            (width, height))
    raster_x_size = width / resolution_x
    raster_y_size = abs(height / resolution_y)
    return resolution_x, resolution_y, raster_x_size, raster_y_size
