Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
atteggiani opened this issue Aug 13, 2024 · 5 comments
Open
Assignees

Comments

@atteggiani
Copy link
Collaborator

atteggiani commented Aug 13, 2024

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.

@atteggiani atteggiani moved this to In Progress 🏗️ in ACCESS-RAM3 Aug 13, 2024
@atteggiani atteggiani self-assigned this Aug 13, 2024
@atteggiani
Copy link
Collaborator Author

@engelca These are the changes I am going to implement while I add unit-testing for the hres_ic.py.

@engelca
Copy link
Contributor

engelca commented Aug 13, 2024

The type flag and the file path to the hres file is set up via the rose/cylc suite.

It would greatly complicate the rose/cylc suite to add in all the if/else options there. Plus all the code in the rose/cylc suite is visible to every site, so simple is best there.

I would therefore prefer for the type = "astart" + --hres_ic option to be in the python script, but we could definitely rename to --hres_ic to --filepath or something more generic.

There may be the potential to later also be able to replace from a different type of flat file -- not necessarily a fields file. Linking in the type and the file path would be helpful there.

@atteggiani
Copy link
Collaborator Author

atteggiani commented Aug 13, 2024

The type flag and the file path to the hres file is set up via the rose/cylc suite.

It would greatly complicate the rose/cylc suite to add in all the if/else options there.

Ok it makes sense, but how do you currently handle it for the --hrec_ic option? I thought there were already conditions in the rose/cylc suite.
Can you please tell me the name of the suite with the most recent modifications so I can check how the script is effectively called?

@engelca
Copy link
Contributor

engelca commented Aug 13, 2024

I haven't checked it in yet. I need to have discussions about branching/merging rose/cylc suites first.
You will have to just take my word on it, that is how it is called.

I gave you examples of how it is called in the test script.

Please just follow that. This discussion can wait for after the workshop.

@engelca
Copy link
Contributor

engelca commented Aug 13, 2024

Please remember. These scripts were developed for use in the rose/cylc environment. There is no intention at present to make it usable via the command-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress 🏗️
Development

No branches or pull requests

2 participants