pyremo.preproc.RemoPreprocessor.preprocess

RemoPreprocessor.preprocess()

Transform raw input data into forcing variables for one timestep.

Parameters:
  • date (datetime-like, optional) – Target date/time used when loading the input dataset if ds is not provided.

  • ds (xarray.Dataset, optional) – Already opened input dataset. If None it is loaded via get_input_dataset().

  • outpath (str, optional) – Directory where output should be written. If None the preprocessed dataset is returned instead of writing.

  • initial (bool or None, optional) – Flag passed through to remapping indicating initial-condition specific processing. If None subclasses may infer for first timestep.

  • **kwargs – Additional keyword arguments forwarded to the remap function.

Returns:

xarray.Dataset or str – In-memory forcing dataset (if outpath is None) or path to the written file.