geoviews.operation.regrid module#
- class geoviews.operation.regrid.weighted_regrid(*, file_pattern, reuse_weights, save_weights, interpolation, upsample, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
regrid
Implements weighted regridding of rectilinear and curvilinear grids using the xESMF library, supporting all the ESMF regridding algorithms including bilinear, conservative and nearest neighbour regridding. The operation will always store the sparse weight matrix to disk and reuse the weights for later aggregations. To delete the weight files call the clean_weight_files method on the operation.
Methods
Cleans existing weight files.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.regrid
: expand, aggregator, upsampleinterpolation = Selector(default='bilinear', label='Interpolation', names={}, objects=['bilinear', 'conservative', 'nearest_s2d', 'nearest_d2s'])
Interpolation method
reuse_weights = Boolean(default=True, label='Reuse weights')
Whether to cache the sparse regridding weights in memory. Can provide considerable speedups when exploring a larger dataset.
save_weights = Boolean(default=False, label='Save weights')
Whether to save weight file to speed up future regridding operations.
file_pattern = String(default='{method}_{x_range}_{y_range}_{width}x{height}.nc', label='File pattern')
The file pattern used to store the regridding weights when the reuse_weights parameter is disabled. Note the files are not cleared automatically so make sure you clean up the cached files when you are done.