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.
Currently the
hres_ic.pyfile has three options for reading the high resolution data for the replacement:The era5land and barra replacements are controlled only by the
--typeinput argument (--type era5landor--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 astartand--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:
--typeoption for any dataset we can automatically locate on Gadi (for exampleera5landandbarra), with the specification of the name of the dataset as argument for the option (--type era5landor--type barraas they are set now, but anything like--type ncep-ncaror similar might be added if we need to support more hres data that are made available on Gadi).--hres_icoption to--hres-file--hres-fileand--typemutually exlusive (only one can be present at the same time)--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.