@classmethod
def _regrid_check_use_src_mask(cls, use_src_mask, method):
    """Check that use_src_mask is True for all methods other than
    nearest_stod and if not raise an error.

    :Parameters:

        use_src_mask: `bool`
            Whether to use the source mask in regridding.

        method: `str`
            The regridding method.

        """
    if not use_src_mask and not method == 'nearest_stod':
        raise ValueError(
            'use_src_mask can only be False when using the nearest_stod method.'
            )
