def check_dims(ds_processed, ds_original, ds_ref_grid):
    """
    Checks whether dimensions of dataset are expected based on
    regridding and original dataset dimensions.
    """
    if ds_processed.dims['time'] == ds_original.dims['time']:
        if  ds_processed.dims['lat'] == ds_ref_grid.dims['lat']:
            if ds_processed.dims['lon'] == ds_ref_grid.dims['lon']:
                return True
            else:
                print('Incorrect lon dimension')
                return False
        else:
            print('Incorrect lat dimension')
            return False
    else:
        print('Incorrect time dimension')
        return False