MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
241 stars 321 forks source link

Enable the use of mpas_halo routines for communicating halo groups in MPAS-A #1062

Closed mgduda closed 1 year ago

mgduda commented 1 year ago

This PR adds the ability to use the mpas_halo routines for communicating halo groups in MPAS-A.

As an alternative to the group halo routines from the mpas_dmpar module, MPAS-A can now make use of the routines from the mpas_halo module. Which module to use is runtime configurable through a new namelist option, config_halo_exch_method in a new &development namelist group. The &development group is hidden by default, and the config_halo_exch_method defaults to 'mpas_halo'. To switch to the mpas_dmpar halo routines, the config_halo_exch_method namelist option may be set to 'mpas_dmpar'.

The specific choice of halo exchange module (mpas_dmpar or mpas_halo) should have no impact on simulation results, all else being equal.

In order to make the setup and use of different halo exchange methods cleaner and more modular, this PR includes refactoring of the calls to create and destroy halo exchange groups as well as the use of procedure arguments to supply specific halo exchange routines to the dynamics and physics-dynamics coupling code.

mgduda commented 1 year ago

@dimomatt @gdicker1 The commit messages provide quite a bit more detail than the PR description. For bd97fed7 in particular, the diff can seem daunting; but, that's mostly because it makes changes to the indentation for a lot of code. If you run git show -b bd97fed7, the commit is much easier to understand.