mpas_analysis.shared.climatology.get_remapper¶
-
mpas_analysis.shared.climatology.
get_remapper
(config, sourceDescriptor, comparisonDescriptor, mappingFilePrefix, method, logger=None)[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 (instance of
MpasAnalysisConfigParser
) – Contains configuration optionssourceDescriptor (
MeshDescriptor
subclass object) – A description of the source mesh or gridcomparisonDescriptor (
MeshDescriptor
subclass object) – A description of the comparison gridmappingFilePrefix (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
- Returns
remapper (
pyremap.Remapper
object) – A remapper that can be used to remap files or data sets from the source grid or mesh to the comparison grid.