pyremo.preproc.RemoPreprocessor

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

Preprocessor for REMO model output used as nesting input.

Locates existing REMO NetCDF files and remaps them for a subsequent nested run.

Parameters:
  • expid (str) – Target experiment identifier for the generated forcing.

  • 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.

  • vc (str or pandas.DataFrame, optional) – Vertical coordinate table key or a pandas DataFrame definition. Defaults to "vc_49lev_nh_pt2000".

  • 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) – Must contain at least {"path": <input_dir>, "expid": <source_expid>}.

inpath

Directory containing source REMO files.

Type:

str

inexp

Source experiment id embedded in filenames.

Type:

str

filename_pattern

Python format string used to construct input filenames.

Type:

str

Methods

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

Merge ERA5 soil fields for the given timestep into ds.

get_filename(date)

Construct the path of the source REMO file for a given date.

get_input_dataset(date[, initial])

Get the input dataset for a given date.

open_remo_dataset(filename)

Open a REMO dataset and parse its dates.

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.