Exemplo n.º 1
0
 def regrid(self, src_cube, dst_cube,
            translate_nans_to_mask=False, **kwargs):
     result = regrid(src_cube, dst_cube, mode='nearest')
     data = result.data
     if translate_nans_to_mask and np.any(np.isnan(data)):
         data = np.ma.masked_array(data, mask=np.isnan(data))
         result.data = data
     return result
 def regrid(self, src_cube, dst_cube,
            translate_nans_to_mask=False, **kwargs):
     result = regrid(src_cube, dst_cube, mode='nearest')
     data = result.data
     if translate_nans_to_mask and np.any(np.isnan(data)):
         data = np.ma.masked_array(data, mask=np.isnan(data))
         result.data = data
     return result
Exemplo n.º 3
0
def regrid(source_cube, grid_cube, mode='bilinear', **kwargs):
    msg = (_INTERPOLATE_DEPRECATION_WARNING + '\n' +
           'Please replace usage of iris.analysis.interpolate.regrid() '
           'with iris.cube.Cube.regrid().')
    _warn_deprecated(msg)
    return oldinterp.regrid(source_cube, grid_cube, mode=mode, **kwargs)
Exemplo n.º 4
0
def regrid(source_cube, grid_cube, mode='bilinear', **kwargs):
    msg = (_INTERPOLATE_DEPRECATION_WARNING + '\n' +
           'Please replace usage of iris.analysis.interpolate.regrid() '
           'with iris.cube.Cube.regrid().')
    _warn_deprecated(msg)
    return oldinterp.regrid(source_cube, grid_cube, mode=mode, **kwargs)