pyremo.preproc.ERA5Preprocessor

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

Preprocessor for ERA5 reanalysis data.

Downloads/constructs hourly ERA5 forcing files via era5_gfile_from_dkrz() and remaps them onto the target domain.

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.

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

  • 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) – Reserved for future configuration hooks (currently unused).

input_data

Configuration passed by the caller.

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, filename, 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.