Skip to content

General Requirements #1

Open
Open
@atteggiani

Description

@atteggiani

um-modify requirements

General requirements​

Main functionality: replace the data of a UM file​
Language: Python (>=3.10)​
Audience: Researchers / ACCESS model users​
Interface type: API and CLI​

Specific requirements​

Supported UM input files: UM files (Ancillary files, Restart Dump files, Fields files​)
Supported replacement sources: NetCDF data, UM file data, ufunc (https://numpy.org/doc/2.1/reference/ufuncs.html) applied element-wise to input data​

API requirements​

Main functions: um-modify​
Return: Output path​
Side effects: Writes the output path (modified UM file) on disk​
Main function arguments:​

  • input_file: path to the UM input file to modify​
  • replacement_source: path to the netCDF file, UM file or ufunc for the replacement​
  • stash_codes: List of STASH codes to include in the data replacement (only STASH codes listed will have data replaced)​
  • output_path: Path to the modified UM output file​
  • mask: Boolean mask to be applied to the replacemente_source before the data replacement​
  • logging_mode: Mode for the logging messages (debug, default (only warnings), silent (no warnings), verbose)​
  • latitude_name: If replacement_source is NetCDF, name of the latitude coordinate​
  • longitude_name: If replacement_source is NetCDF, name of the longitude coordinate​
  • level_name: If replacement_source is NetCDF, name of the level coordinate​
  • time_name: If replacement_source is NetCDF, name of the time coordinate​

​CLI requirements​

Positional arguments:​

  • input_file: path to the UM input file to modify [required if not passed as an optional arg]​

Optional arguments:​

  • -h, --help: help​
  • -i, --input: path to the UM input file to modify [required if not passed as an optional arg]​
  • -s, --source: path to the netCDF file, UM file or ufunc for the replacement​
  • --stash: List of STASH codes to include in the data replacement (only STASH codes listed will have data replaced)​
  • -o, --output: Path to the modified UM output file​
  • --nan: List of values in the --source to mask for the replacement (data having these values will be replaced as NaN)​
  • -v, --verbose: Verbose output​
  • -s, --silent: Silent output (No warnings) ​
  • --debug: Extra verbose output for debugging​
  • --latitude-name: If replacement_source is NetCDF, name of the latitude coordinate​
  • --longitude-name: If replacement_source is NetCDF, name of the longitude coordinate​
  • --level-name: If replacement_source is NetCDF, name of the level coordinate​

Deployment requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions