Skip to content

Re-export regridder and geom types via MAPL umbrella so client code can use 'use MAPL' #4947

@tclune

Description

@tclune

Background

As part of updating client subrepos to work with the MAPL Phase 9 `mapl3g_` → `mapl_` rename (#4944), we discovered several categories of symbols that client code accesses via internal `mapl3g_`/`mapl_` modules directly, rather than through the top-level `MAPL` umbrella. This issue tracks all the work needed so that client code can exclusively `use MAPL`.

A key constraint: client PRs must pass CI against the pre-Phase-9 MAPL on `release/MAPL-v3`. This means client PRs cannot switch to `mapl_*` names until the MAPL Phase 9 PR (#4944) merges — and cannot use `use MAPL` for symbols not yet in the umbrella. All items below are currently worked around by keeping `mapl3g_` names in the client PRs.

Note: all `mapl_` module names introduced by Phase 9 — including ones that appear "pre-existing" like `mapl_ErrorHandlingMod` — were in fact renamed from `mapl3g_` and do not exist on the CI MAPL. This was discovered when local builds passed (local MAPL is post-Phase-9) but CI failed.


Category 1: Symbols not yet exported by the MAPL umbrella

These symbols are used by client code but are not re-exported by `mapl/MAPL.F90`. A decision is needed on naming: re-export under existing bare names, or introduce `MAPL_`-prefixed aliases and update client code accordingly.

Regridder / RegridderManager types (`FVdycoreCubed_GridComp/fv_regrid_c2c.F90`)

use mapl3g_regridder_mgr
use mapl3g_Regridder,        only: Regridder
use mapl3g_RegridderMethods, only: REGRID_METHOD_BILINEAR, generate_esmf_regrid_param
use mapl3g_RegridderManager, only: get_regridder_manager, RegridderManager
use mapl3g_RegridderSpec,    only: RegridderSpec

Geom / CubedSphere types (`FVdycoreCubed_GridComp/fv_regrid_c2c.F90`, `interp_restarts.F90`)

use mapl3g_CubedSphereGeomSpec
use mapl3g_Geom_API,                 only: GeomManager, get_geom_manager, MaplGeom
use mapl3g_CubedSphereDecomposition, only: CubedSphereDecomposition

`UngriddedDim` (singular) (`GEOSgcm_GridComp/GEOS_GwdGridComp.F90`, `GOCART/DU2G`, `SS2G`, `GOCART2G`)

use mapl3g_UngriddedDim, only: UngriddedDim

Note: `UngriddedDims` (plural) is already in the umbrella; `UngriddedDim` (singular) is not.


Category 2: Internal module names renamed by Phase 9 used directly by clients

These modules exist in MAPL but their names changed from `mapl3g_` to `mapl_` in Phase 9. The correct long-term fix is to add them to the umbrella rather than having clients use internal `mapl_*` names directly.

`mapl3g_Comms` → `mapl_Comms` (`FVdycoreCubed_GridComp/DynCore_GridCompMod.F90`)

use mapl3g_Comms, only: MAPL_ArrayGather => array_gather

`MAPL_ArrayGather` should be added to the MAPL umbrella.

`mapl3g_ErrorHandlingMod` → `mapl_ErrorHandlingMod` (`FVdycoreCubed_GridComp/DynCore_GridCompMod.F90`, `FV_StateMod.F90`)

use mapl3g_ErrorHandlingMod, only: MAPL_Verify, MAPL_Assert, MAPL_Return, MAPL_VRFY

These error-handling symbols should be added to the MAPL umbrella.

`mapl3g_UserSetServices` → `mapl_UserSetServices` (`GOCART/GOCART2G_GridCompMod.F90`)

use mapl3g_UserSetServices, only: user_setservices

`user_setservices` (or a `MAPL_`-prefixed equivalent) should be added to the MAPL umbrella.


Affected client files and their subrepos

File Subrepo PR Status
`fv_regrid_c2c.F90` FVdycoreCubed_GridComp #385 kept `mapl3g_` pending this issue
`interp_restarts.F90` FVdycoreCubed_GridComp #385 kept `mapl3g_` pending this issue
`DynCore_GridCompMod.F90` FVdycoreCubed_GridComp #385 kept `mapl3g_Comms`, `mapl3g_ErrorHandlingMod` pending this issue
`FV_StateMod.F90` FVdycoreCubed_GridComp #385 kept `mapl3g_ErrorHandlingMod` pending this issue
`GEOS_GwdGridComp.F90` GEOSgcm_GridComp #1426 kept `mapl3g_UngriddedDim` pending this issue
`DU2G_GridCompMod.F90` GOCART #446 kept `mapl3g_UngriddedDim` pending this issue
`SS2G_GridCompMod.F90` GOCART #446 kept `mapl3g_UngriddedDim` pending this issue
`GOCART2G_GridCompMod.F90` GOCART #446 kept `mapl3g_UngriddedDim`, `mapl3g_UserSetServices` pending this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions