Skip to content

Different pre-processors for for different input sources in cutout #251

Open
@bdvllrs

Description

@bdvllrs

Is your feature request related to a problem? Please describe.

Currently, the preprocessors are created by the runner and they are used indifferently on all input sources.

This is problematic in the case of a cutout where we might want different pre-processors for the different sources (e.g. use remove_nans for the local source and nothing for the global source).

I would happily provide a PR with the chosen method.

Describe the solution you'd like

Because pre-processors are applied by inputs, maybe pre-processors should rather be a parameter of inputs?

For example for a cutout input with two grib inputs:

input:
  cutout:
    lam_0:
        grib:
          path: /path/to/local.grib
          pre_processors:
            - forward_transform_filter: remove_nans
    global:
        grib:
          path: /path/to/global.grib

This would also make it explicit that preprocessing are handled by inputs.

Describe alternatives you've considered

An alternative would be to have preprocessors prefixed by a source:

pre_processors:
    lam_0:
    - forward_transform_filter: remove_nans

It could be defined in the create_pre_processors of a cutout runner.

(I have seen that there is a current Cutout runner, but I haven't yet understood its purpose in the context of a cutout inference).

Additional context

No response

Organisation

Météo-France

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions