mpas_analysis.shared.climatology.get_remapper
- mpas_analysis.shared.climatology.get_remapper(config, sourceDescriptor, comparisonDescriptor, mappingFilePrefix, method, logger=None, vertices=False)[source]
Given config options and descriptions of the source and comparison grids, returns a
pyremap.Remapper
object that can be used to remap from source files or data sets to corresponding data sets on the comparison grid.If necessary, creates the mapping file containing weights and indices needed to perform remapping.
- Parameters:
config (mpas_tools.config.MpasConfigParser) – Contains configuration options
sourceDescriptor (pyremap.MeshDescriptor) – A description of the source mesh or grid
comparisonDescriptor (pyremap.MeshDescriptor) – A description of the comparison grid
mappingFilePrefix (str) – A prefix to be prepended to the mapping file name
method ({'bilinear', 'neareststod', 'conserve'}) – The method of interpolation used.
logger (logging.Logger, optional) – A logger to which ncclimo output should be redirected
vertices (bool, optional) – Whether to remap from vertices, rather than cells
- Returns:
remapper (pyremap.Remapper) – A remapper that can be used to remap files or data sets from the source grid or mesh to the comparison grid.