Skip to content

Extend perturbIC functionality #11

@atteggiani

Description

@atteggiani

Currently, the perturbIC function can only accept a restart dump file (UM Dump File) as input, and perturb its theta field (STASH itemcode = 4).
Although this meets the most likely use case, the function could be easily extended to:

  • work with any type of fields file (Ancil files or Output Fieldsfiles too), perturbing by default its theta field. If the field is not present, an error would get raised.
  • accept a STASH itemcode as command line argument, to choose a different field to perturb (for example if user wants to perturb the surface temperature (STASH itemcode = 24) something like --stash-to-perturb 24 could be passed as an argument)
  • if the input fields file contains only one single field, automatically perturb that field (even if is not THETA and the --stash-to-perturb has not been passed.

This additions would cover some edge use cases of perturbIC, extending its functionality without degrading its current performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions