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 (
dictorstr, optional) – Target REMO domain metadata or a registered domain id. IfNone, the domain is inferred fromsurflib.vc (
strorpandas.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:
dictorNone
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.
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.