Skip to content

Trim redundant USE statements from Base.F90 (MAPLBase_Mod) #4778

@tclune

Description

@tclune

Summary

base/Base.F90 (MAPLBase_Mod) currently re-exports 26 modules via bare use statements. Many of these are defined in shared/ or base3g/ and are already available to consumers via the proper MAPL3 export path (MAPLMaplShared or mapl_base3g). Keeping them in MAPLBase_Mod is redundant and makes the module a catch-all umbrella rather than exporting only what it owns.

Removed (11 use statements)

Module Defined in Already exported via
MAPL_Constants (both lines incl. MAPL_PI_R8 alias) shared/ MaplSharedMAPL
MAPL_SortMod shared/ MaplSharedMAPL
MAPL_SunMod base3g/ mapl_base3gMAPL
MAPL_InterpMod shared/ MaplSharedMAPL
MAPL_HashMod shared/ MaplSharedMAPL
MAPL_LoadBalanceMod shared/ MaplSharedMAPL
MAPL_DirPathMod shared/ MaplSharedMAPL
MAPL_KeywordEnforcerMod shared/ MaplSharedMAPL
MAPL_SimpleCommSplitterMod shared/ MaplSharedMAPL
MAPL_SplitCommunicatorMod shared/ MaplSharedMAPL
mapl_LocalDisplacementEnsemble base3g/ mapl_base3gMAPL

Must stay (despite living in shared/ or base3g/)

Module Reason
MAPL_ShmemMod AppGridCreate.F90 (FVdycoreCubed) uses MAPL_AllocNodeArray and MAPL_DeAllocNodeArray transitively via use MAPL2, only: — removing broke the build
MAPL_MemUtilsMod Same file uses MAPL_MemUtilsWrite transitively via use MAPL2, only:

These two will need to remain until their consumers (AppGridCreate.F90) are updated to use the modules directly.

What stays (only in base/)

Modules defined only in base/ (or whose removal is deferred) are unchanged:
ESMFL_Mod, MAPL_ExceptionHandling, MAPL_BaseMod, MAPL_IOMod, MAPL_ConfigMod, MAPL_LocStreamMod, MAPL_MaxMinMod, MAPL_SimpleBundleMod, MAPL_ApplicationSupport, MAPL_ServerManager, MAPL_FileMetadataUtilsMod, MAPL_VerticalDataMod, MAPL_SphericalGeometry

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions