Skip to content

Add OcnInit overload that uses coupler provided parameters#399

Closed
andrewdnolan wants to merge 3 commits intoE3SM-Project:developfrom
andrewdnolan:omega/coupled-driver-ocnint
Closed

Add OcnInit overload that uses coupler provided parameters#399
andrewdnolan wants to merge 3 commits intoE3SM-Project:developfrom
andrewdnolan:omega/coupled-driver-ocnint

Conversation

@andrewdnolan
Copy link
Copy Markdown

@andrewdnolan andrewdnolan commented Apr 28, 2026

This PR adds an overload of OMEGA::OcnInit that expects:

int ocnInit(
    MPI_Comm Comm,                      ///< [in] ocean MPI communicator
    const int OcnId,                    ///< [in] mct comp id for ocean
    const std::string &ConfigFile,      ///< [in] path to yaml config file
    const std::string &LogFile,         ///< [in] path to log file
    const TimeInstant &StartTime,       ///< [in] simulation start time
);

as arguments, which will be provided by the coupled driver instead of being read from the config file. This will be used by the coupled driver, which is currently in progress.

This PR refactors the TimeStepper class, to enable the StopTime to be optional. In coupled E3SM simulation the components are not told the stop time. Instead the coupled driver is responsible for finalizing everything, in our case by calling the ocn_final_mct subroutine from ocn_comp_mct.F90 (which will be defined in a separate PR). The reordering of arguments to the TimeStepper constructor was needed because the optional arguments must come last.

Checklist

  • Documentation:
  • Linting
  • Building
    • CMake build does not produce any new warnings from changes in this PR
  • Testing
    • Add a comment to the PR titled Testing with the following:
      • Which machines CTest unit tests
        have been run on and indicate that are all passing.
      • The Polaris omega_pr test suite
        has passed, using the Polaris e3sm_submodules/Omega baseline
      • Document machine(s), compiler(s), and the build path(s) used for -p for both the baseline (Polaris e3sm_submodules/Omega) and the PR build
      • Indicate "All tests passed" or document failing tests
      • Document testing used to verify the changes including any tests that are added/modified/impacted.
      • Performance related PRs: Please include a relevant PACE experiment link documenting performance before and after.
    • New tests:
      • CTest unit tests for new features have been added per the approved design.
      • Polaris tests for new features have been added per the approved design (and included in a test suite)
  • Stealth Features
    • If any stealth features are included in the PR, please confirm that they have been documented.

@andrewdnolan andrewdnolan force-pushed the omega/coupled-driver-ocnint branch from f4b4a39 to 4e898c6 Compare April 30, 2026 22:15
@andrewdnolan
Copy link
Copy Markdown
Author

Closed in favor of #400

@andrewdnolan andrewdnolan deleted the omega/coupled-driver-ocnint branch May 7, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant