E3SM-Project / polaris

Testing and analysis for OMEGA, MPAS-Ocean, MALI and MPAS-Seaice
BSD 3-Clause "New" or "Revised" License
6 stars 13 forks source link

Add support for shared config options #125

Closed xylar closed 1 year ago

xylar commented 1 year ago

This merge adds the capability of sharing a config object across steps and tasks. This allows:

The capability has been made possible by:

The changes mean that it is now possible to add config files from the polaris package to the config object at initialization, rather than having to use the task's configure() method. Since config objects shared across tasks should ideally not be updated in a given task's configure() method, a setup() method has been added to PolarisConfigParser that can be overridden to perform more complex configuration as needed. So far, this capability is not being used.

Tasks have also been modified to make use of the functionality:

This merge requires updating to mpas_tools v0.24.0 to bring in the updates to MpasConfigParser.

Checklist

xylar commented 1 year ago

Testing

I have successfully run all ocean tasks (except RPE at 1 and 4 km) on Chrysalis with Intel and OpenMPI.

I have verified that config files and symlinks appear in the expected locations, and that they retain the "raw" formatting that allows for extended interpolation (e.g. convergence_eval_time = ${cosine_bell:vel_pd}) upon reading them back in.

xylar commented 1 year ago

@cbegeman and @sbrus89, this is ready to review when you have time. The review can be at whatever level you have time for. The main thing I want to make sure of is that you are good with the changes I'm making at a conceptual level:

As always, suggestions (from broad to nit-picky) are welcome.

xylar commented 1 year ago

I'm running into some issues when I try to change resolutions in the cosine bell tests. Please hold off on reviewing this for now.

xylar commented 1 year ago

With a few more bug fixes, this now works even when I modify the resolutions for cosine bell in a user config file as part of setting up the test cases.

xylar commented 1 year ago

Okay, I finally got the new-new mpas_tools v0.25.0 working and this is ready for review. @cbegeman and @sbrus89, please take a look when you can. I'll continue to work on branches based off of this one in the meantime.

xylar commented 1 year ago

Great, thanks very much @cbegeman! I appreciate you taking the time to review and test!

xylar commented 1 year ago

Since @sbrus89 is away at a workshop this week, I think it would be better to get this merged now with @cbegeman's review. Other work is building on this so it is a little bit urgent.

sbrus89 commented 1 year ago

Sorry I didn't get to this sooner @xylar and @cbegeman.