Skip to content

Change logic for --type astart --hrec_ic <file_path> input arguments #36

@atteggiani

Description

@atteggiani

Currently the hres_ic.py file has three options for reading the high resolution data for the replacement:

  • era5land dataset
  • barra dataset
  • from another UM fieldsfile (initial conditions file)

The era5land and barra replacements are controlled only by the --type input argument (--type era5land or --type barra). Depending on the options chosen, the script locates the specific needed data on Gadi.

If the replacement data needs to be taken from another UM fieldsfile, currently there are 2 input options needed:
--type astart and --hrec_ic <path_to_replacement_file>.

These 2 options are redundant, as they don't really add any information on the type of logic to be run.
1 option should be sufficient to know that the data should be taken from an external file, and also providing the path of the external file itself.

I suggest to refactor the input argument options as follows:

  • Leave the --type option for any dataset we can automatically locate on Gadi (for example era5land and barra), with the specification of the name of the dataset as argument for the option (--type era5land or --type barra as they are set now, but anything like --type ncep-ncar or similar might be added if we need to support more hres data that are made available on Gadi).
  • Change name of the --hres_ic option to --hres-file
  • Make --hres-file and --type mutually exlusive (only one can be present at the same time)
  • When the --hres-file <path-to-file> is selected, the script will replace the data with the specified <path-to-file> UM initial conditions file.

This simplifies the code and makes testing easier.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

In Progress 🏗️

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions