Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Nov 12, 2025

When calling polaris setup or polaris suite without the --model flag, the default behavior will now be to look for
a list of required files in the component's path (provided with the -p flag) to see which model is detected. If no model can be detected in this way, an error is raised.

This PR also improves config options during setup. This merge makes a copy of the basic_config rather than recreating it, and configures the component only after overriding the default component_path if one is provided on the command line.

Checklist

  • Developer's Guide has been updated
  • Testing comment in the PR documents testing used to verify the changes

Addresses #389

When calling `polaris setup` or `polaris suite` without the
`--model` flag, the default behavior will now be to look for
a list of required files in the component's path (providied
with the `-p` flag) to see which model is detecte.  If no model
can be detected in this way, an error is raised.
This merge makes a copy of the basic_config rather than recreating
it, and configures the component only after overriding the
default component_path if one is provided on the command line.
@xylar xylar self-assigned this Nov 12, 2025
@xylar xylar added the enhancement New feature or request label Nov 12, 2025
@xylar
Copy link
Collaborator Author

xylar commented Nov 12, 2025

Testing

I set up both the pr and omega_pr suites, and saw that MPAS-Ocean and Omega, respectively, were detected just by pointing to the right locations with -p.

I'm waiting in the queue on Chrysalis to run these tests but verified that the symlinks to the model executables look right and that message about which model was detected also looked as expected.

@xylar xylar requested a review from cbegeman November 12, 2025 18:07
@xylar
Copy link
Collaborator Author

xylar commented Nov 12, 2025

@cbegeman, I know I'm bombarding you with PRs to review but if you don't mind having a quick glance at this, I'd appreciate it. I think my testing is sufficient. I'd like to build off of this in my implementation of #390

I'll build on this to create the

Copy link
Collaborator

@cbegeman cbegeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a brief look, this looks like exactly what we want! One small suggestion on the error message. Thanks for getting this done!

@xylar xylar merged commit acca33b into E3SM-Project:main Nov 12, 2025
6 checks passed
@xylar xylar deleted the detect-ocean-model branch November 12, 2025 18:50
@xylar
Copy link
Collaborator Author

xylar commented Nov 12, 2025

@cbegeman, thanks so much for reviewing so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants