Preprocessor

The high-level API is principally defined in pyDeltaRCM.preprocessor.

Preprocessor classes and API

PreprocessorCLI()

Command line preprocessor.

Preprocessor([input_file])

Python high level api.

BasePreprocessor()

Base preprocessor class.

Preprocessor function and utilities

pyDeltaRCM.preprocessor.preprocessor_wrapper()

Wrapper for CLI interface.

The entry_points setup of a command line interface requires a function, so we use this simple wrapper to instantiate and run the jobs.

Works by creating an instance of the PreprocessorCLI and calls the run_jobs() to execute all jobs.

pyDeltaRCM.preprocessor.write_yaml_config_to_file(_config, _path)

Write a config to file in output folder.

Write the entire yaml configuation for the configured job out to a file in the job output foler.

Note

This fuinction is utilized by the BMI implementation of pyDeltaRCM as well.

pyDeltaRCM.preprocessor.scale_relative_sea_level_rise_rate(mmyr, If=1)

Scale a relative sea level rise rate to model time.

This function scales any relative sea level rise rate (RSLR) (e.g., sea level rise, subsidence) to a rate appropriate for the model time. This is helpful, because most discussion of RSLR uses units of mm/yr, but the model (and model configuration) require units of m/s. Additionally, the model framework needs to assume an “intermittency factor” to convert from real-world time to model time.

Relative sea level rise (subsidence and/or sea level rise) are scaled from real world dimensions of mm/yr to model input as:

\widehat{RSLR} = (RSLR / 1000) \cdot \dfrac{1}{I_f \cdot 365.25 \cdot 86400}

This conversion makes it such that when one real-world year has elapsed (I_f \cdot 365.25 \cdot 86400 seconds in model time), the relative sea level has changed by the number of millimeters specified in the input mmyr.

Note

Users should use this function to determine the value to specify in an input YAML configuration file; no scaling is performed internally.

Parameters
  • mmyr (float) – Millimeters per year, relative sea level rise rate.

  • If (float, optional) – Intermittency factor, fraction of time represented by morphodynamic activity. Should be in interval (0, 1). Defaults to 1 if not provided, i.e., no scaling is performed.

Returns

scaled – Scaled relative sea level rise rate, in meters per second.

Return type

float