pyremo.preproc.CFPreprocessor

class CFPreprocessor(expid, surflib, domain=None, vc=None, outpath=None, scratch=None, input_data=None, **kwargs)[source]

Preprocessor for CF-compliant GCM input datasets.

Constructs a CF-style multi-variable input accessor (gfile) used to retrieve the raw dataset for each timestep.

Parameters:
  • expid (str) – Experiment identifier used in output naming.

  • surflib (str) – Path to the surface library NetCDF file.

  • domain (dict or str, optional) – Target REMO domain metadata or a registered domain id. If None, the domain is inferred from surflib with a 1-cell interior crop.

  • vc (str or pandas.DataFrame, optional) – Vertical coordinate table key or a pandas DataFrame definition. Defaults to 'vc_49lev' for this preprocessor.

  • outpath (str, optional) – Output path template used when writing forcing files.

  • scratch (str, optional) – Parent directory where a temporary working directory is created.

  • input_data (dict, optional) – Specification of variables/paths needed by get_gcm_gfile().

  • **kwargs – Reserved for future configuration.

gfile

Accessor providing gfile(date) to obtain the raw input dataset.

Type:

object

input_data

Original input specification.

Type:

dict or None

Methods

add_soil(ds, domain_info, surflib[, filename])

Merge ERA5 soil fields for the given timestep into ds.

get_input_dataset(date[, initial])

Get the input dataset for a given date.

preprocess

Transform raw input data into forcing variables for one timestep.

run(start[, end, freq, outpath, compute, ...])

Batch preprocess a sequence of timesteps.

write(ds, outpath)

Write a forcing dataset to NetCDF.