Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 5 additions & 7 deletions .opencode/skills/github-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,21 @@ These rules exist to maintain code quality and prevent accidental breaking chang

#### develop

**Purpose:** Legacy MAPL (MAPL 2.x) maintenance and development
**Purpose:** Primary integration branch for both MAPL 2.x maintenance and MAPL v3 development

**Use for:**
- Bug fixes for MAPL 2.x
- Features for current production version
- Maintenance and stability improvements
- **MAPL v3 restructuring and new features** (previously on release/MAPL-v3)

**Status:** Stable, production-ready code
**Status:** Active integration branch — all PRs (including MAPL v3 work) target here

#### release/MAPL-v3

**Purpose:** MAPL v3 pre-release development
**Purpose:** No longer used for active development of MAPL (superseded by `develop`)

**Use for:**
- New features for MAPL v3
- MAPL v3 specific improvements
- Next major version development
**Note:** MAPL v3 integration work has moved to `develop`. External client repos are still using `release/MAPL-v3`

**Status:** Active development, pre-release

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Rename all internal MAPL modules from `mapl_<Name>[Mod]` to `mapl_<Name>_mod`
convention (#4958). Affects 446 module definitions across 695 source files.
Three thin-wrapper duplicate modules removed (`mapl_ErrorHandlingMod`,
`mapl_KeywordEnforcerMod`, `MAPL_ShmemMod`). Duplicate `VerticalAlignment.F90`
removed from `superstructure/generic/specs/` (canonical copy remains in
`infrastructure/vertical/vertical_grid/`). Legacy `base3g/Comms.F90` retains
`MAPL_CommsMod` name pending resolution of #4961. `MAPL_Constants` retains its
name as it functions as an umbrella module.

- Remove `MAPL_GridCompsMod` and enforce that `gridcomps/` modules `use MAPL`
(the umbrella module) rather than internal modules directly (#4959).

- Resolve Intel Fortran error #6450 (case-insensitive module/alias name
collision) for 13 modules in `infrastructure/fields/` whose module name
matched their sole public symbol when renamed via USE aliases in the layer
Expand Down
6 changes: 3 additions & 3 deletions apps/Regrid_Util/Regrid_Util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module regrid_util_support_mod
use ESMF
use MAPL

use mapl_RegridderMethods
use mapl_RegridderMethods_mod
use gFTL2_StringVector

implicit NONE
Expand Down Expand Up @@ -376,8 +376,8 @@ Program Regrid_Util

use ESMF
use MAPL
use MAPL_FileMetadataUtilsMod, only: FileMetadataUtils
use mapl_Profiler
use mapl_FileMetadataUtils_mod, only: FileMetadataUtils
use mapl_Profiler_mod
use regrid_util_support_mod
use mpi
use gFTL2_StringVector
Expand Down
16 changes: 8 additions & 8 deletions apps/tests/acg3/ACG3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
#define _RETURN(status) if(present(rc)) rc=status
#define _SUCCESS ESMF_SUCCESS
#define _FAILURE _SUCCESS-1
module mapl_acg3
use mapl_Generic, only: MAPL_GridCompAddSpec
use mapl_UngriddedDim, only: UngriddedDim
use mapl_State_API, only: MAPL_StateGetPointer
use mapl_ErrorHandling
use mapl_KeywordEnforcer
module mapl_acg3_mod
use mapl_Generic_mod, only: MAPL_GridCompAddSpec
use mapl_UngriddedDim_mod, only: UngriddedDim
use mapl_State_API_mod, only: MAPL_StateGetPointer
use mapl_ErrorHandling_mod
use mapl_KeywordEnforcer_mod
use esmf, only: ESMF_STATEITEM_FIELD, ESMF_SUCCESS, ESMF_STATEINTENT_IMPORT, ESMF_STATEINTENT_EXPORT, ESMF_STATEINTENT_INTERNAL
use esmf, only: ESMF_State, ESMF_GridComp, Esmf_StateIntent_Flag, ESMF_Field
use esmf, only: ESMF_KIND_R4, ESMF_KIND_R8
use mapl_VerticalStaggerLoc
use mapl_VerticalStaggerLoc_mod
use, intrinsic :: iso_fortran_env, only: R64 => real64, R32 => real32
implicit none(type, external)

Expand Down Expand Up @@ -49,4 +49,4 @@ subroutine get_pointers(rc)
_RETURN(status)
end subroutine get_pointers

end module mapl_acg3
end module mapl_acg3_mod
32 changes: 16 additions & 16 deletions base3g/API.F90
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module mapl_base3g
use MAPL_FileMetadataUtilsMod
use MAPL_FileMetadataUtilsVectorMod
use MAPL_PackedTimeMod, only: MAPL_PackedDateCreate => PackedDateCreate, &
module mapl_base3g_mod
use mapl_FileMetadataUtils_mod
use mapl_FileMetadataUtilsVector_mod
use mapl_PackedTime_mod, only: MAPL_PackedDateCreate => PackedDateCreate, &
MAPL_PackedTimeCreate => PackedTimeCreate, &
MAPL_PackedDateTimeCreate => PackedDateTimeCreate, &
MAPL_ESMFTimeFromPacked => ESMFTimeFromPacked, &
MAPL_UnpackDate => UnpackDate, &
MAPL_UnpackTime => UnpackTime, &
MAPL_UnpackDateTime => UnpackDateTime
use mapl_SimulationTime, only: set_reference_clock, fill_time_dict
use mapl_SimulationTime_mod, only: set_reference_clock, fill_time_dict
use MAPL_CommsMod, only: mapl_CommsBcast, mapl_CommsScatterV, mapl_CommsGatherV, &
mapl_CommsAllGather, mapl_CommsAllGatherV, &
mapl_CommsAllReduceMin, mapl_CommsAllReduceMax, &
Expand All @@ -20,23 +20,23 @@ module mapl_base3g
mapl_ArrayIScatter, mapl_CollectiveWait, &
mapl_CollectiveScatter3D, mapl_CollectiveGather3D, &
mapl_RoundRobinPEList, mapl_BcastShared, ArrPtr
use MAPL_SatVaporMod, only: MAPL_EQsatSET, MAPL_EQsat
use MAPL_StringTemplate, only: fill_grads_template, StrTemplate, fill_grads_template_esmf
use mapl_LocalDisplacementEnsemble, only: LocalDisplacementEnsemble
use MAPL_MemUtilsMod, only: MAPL_MemUtilsInit, MAPL_MemUtilsDisable, &
use mapl_SatVapor_mod, only: MAPL_EQsatSET, MAPL_EQsat
use mapl_StringTemplate_mod, only: fill_grads_template, StrTemplate, fill_grads_template_esmf
use mapl_LocalDisplacementEnsemble_mod, only: LocalDisplacementEnsemble
use mapl_MemUtils_mod, only: MAPL_MemUtilsInit, MAPL_MemUtilsDisable, &
MAPL_MemUtilsWrite, MAPL_MemUtilsIsDisabled, MAPL_MemUtilsFree, &
MAPL_MemCommited, MAPL_MemUsed, MAPL_MemReport
use MAPL_SunMod, only: MAPL_SunOrbitCreate, MAPL_SunOrbitCreateFromConfig, &
use mapl_Sun_mod, only: MAPL_SunOrbitCreate, MAPL_SunOrbitCreateFromConfig, &
MAPL_SunOrbitCreated, MAPL_SunOrbitDestroy, MAPL_SunOrbitQuery, &
MAPL_SunGetInsolation, MAPL_SunGetSolarConstant, &
MAPL_SunGetDaylightDuration, MAPL_SunGetDaylightDurationMax, &
MAPL_SunGetLocalSolarHourAngle, MAPL_SunOrbit
use MAPL_TimeInterpolation, only: MAPL_Interp_Fac, MAPL_ClimInterpFac
use mapl_FileIO, only: WRITE_PARALLEL
use mapl_SimpleBundleMod_impl, only: MAPL_SimpleBundleCreate, MAPL_SimpleBundlePrint, &
use mapl_TimeInterpolation_mod, only: MAPL_Interp_Fac, MAPL_ClimInterpFac
use mapl_FileIO_mod, only: WRITE_PARALLEL
use mapl_SimpleBundleMod_impl_mod, only: MAPL_SimpleBundleCreate, MAPL_SimpleBundlePrint, &
MAPL_SimpleBundleGetIndex, MAPL_SimpleBundleDestroy, MAPL_SimpleBundle
use mapl_FileIOShared, only: ArrDescr, ArrDescrInit, ArrDescrSet
use mapl_NCIO, only: MAPL_VarRead, MAPL_VarWrite, MAPL_NCIOGetFileType, &
use mapl_FileIOShared_mod, only: ArrDescr, ArrDescrInit, ArrDescrSet
use mapl_NCIO_mod, only: MAPL_VarRead, MAPL_VarWrite, MAPL_NCIOGetFileType, &
MAPL_IOGetNonDimVars, MAPL_IOCountNonDimVars, &
MAPL_IOChangeRes, MAPL_IOCountLevels
implicit none(type,external)
Expand Down Expand Up @@ -77,4 +77,4 @@ module mapl_base3g
public :: MAPL_IOGetNonDimVars, MAPL_IOCountNonDimVars
public :: MAPL_IOChangeRes, MAPL_IOCountLevels

end module mapl_base3g
end module mapl_base3g_mod
6 changes: 3 additions & 3 deletions base3g/Comms.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ module MAPL_CommsMod
ESMF_MAXSTR, ESMF_SUCCESS, &
ESMF_VM, ESMF_VMGatherV, ESMF_VMGet, ESMF_VMGetCurrent, &
ESMF_VMScatterV, ESMF_VmBarrier, ESMF_VmGet
use MAPL_ShmemMod, only: MAPL_ShmInitialized, MAPL_SyncSharedMemory, &
use mapl_Shmem_mod, only: MAPL_ShmInitialized, MAPL_SyncSharedMemory, &
MAPL_BroadcastToNodes, MAPL_NodeRankList, &
MAPL_GetNewRank
use MAPL_Constants, only: MAPL_Unknown, MAPL_IsGather, MAPL_IsScatter, MAPL_UNDEF
use mapl_ErrorHandling, only: MAPL_Assert, MAPL_Verify, MAPL_Return
use mapl_GridGetGlobal, only: GridGetGlobalCellCountPerDim
use mapl_ErrorHandling_mod, only: MAPL_Assert, MAPL_Verify, MAPL_Return
use mapl_GridGetGlobal_mod, only: GridGetGlobalCellCountPerDim
use mpi
use, intrinsic :: iso_fortran_env, only: REAL64
implicit none
Expand Down
4 changes: 2 additions & 2 deletions base3g/FileIO.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "MAPL.h"

module mapl_FileIO
module mapl_FileIO_mod
use MAPL_CommsMod, only: MAPL_AM_I_ROOT
use, intrinsic :: iso_fortran_env, only: INT32, REAL32, REAL64, OUTPUT_UNIT
implicit none
Expand Down Expand Up @@ -181,4 +181,4 @@ subroutine write_parallel_r64_1d(data, unit, format, rc)

end subroutine write_parallel_r64_1d

end module mapl_FileIO
end module mapl_FileIO_mod
16 changes: 8 additions & 8 deletions base3g/FileIOShared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
!
! `FileIO_Shared` -- A Module that contains shared subroutines/functions needed by NetCDF and Binary IO
!
module mapl_FileIOShared
module mapl_FileIOShared_mod

use ESMF
use mapl_DistGridGet, only: MAPL_DistGridGet_impl => DistGridGet
use mapl_GridAccessors, only: GridGet
use mapl_GridGetGlobal, only: GridGetGlobalCellCountPerDim
use MAPL_SortMod
use mapl_DistGridGet_mod, only: MAPL_DistGridGet_impl => DistGridGet
use mapl_GridAccessors_mod, only: GridGet
use mapl_GridGetGlobal_mod, only: GridGetGlobalCellCountPerDim
use mapl_Sort_mod
use MAPL_CommsMod
use MAPL_ShmemMod
use MAPL_ExceptionHandling
use mapl_Shmem_mod
use mapl_ExceptionHandling_mod
use, intrinsic :: ISO_C_BINDING
use, intrinsic :: iso_fortran_env
use mpi
Expand Down Expand Up @@ -944,4 +944,4 @@ subroutine MAPL_Comm_Dup(comm, newcomm, rc)
end if
_RETURN(ESMF_SUCCESS)
end subroutine MAPL_Comm_Dup
end module mapl_FileIOShared
end module mapl_FileIOShared_mod
8 changes: 4 additions & 4 deletions base3g/FileMetadataUtilities.F90
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "MAPL_ErrLog.h"

module MAPL_FileMetadataUtilsMod
module mapl_FileMetadataUtils_mod
use pFIO
use Mapl_keywordenforcermod
use mapl_KeywordEnforcer_mod
use gFTL2_StringIntegerMap
use ESMF
use MAPL_ExceptionHandling
use mapl_ExceptionHandling_mod
use, intrinsic :: iso_fortran_env, only: REAL64,REAL32,INT64,INT32
implicit none

Expand Down Expand Up @@ -699,7 +699,7 @@ function get_source_file(this,rc) result(source_file)
_RETURN(_SUCCESS)
end function

end module MAPL_FileMetadataUtilsMod
end module mapl_FileMetadataUtils_mod



Expand Down
6 changes: 3 additions & 3 deletions base3g/FileMetadataUtilitiesVector.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module MAPL_FileMetadataUtilsVectorMod
use MAPL_FileMetadataUtilsMod
module mapl_FileMetadataUtilsVector_mod
use mapl_FileMetadataUtils_mod

#define _type type (FileMetadataUtils)
#define _vector FileMetadataUtilsVector
#define _iterator FileMetadataUtilsVectorIterator
#include "templates/vector.inc"

end module MAPL_FileMetadataUtilsVectorMod
end module mapl_FileMetadataUtilsVector_mod
20 changes: 10 additions & 10 deletions base3g/MAPL_LocStreamMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
!
! The module `MAPL_LocStreamMod` manipulates location streams.
!
module mapl_LocStreamMod_impl
module mapl_LocStreamMod_impl_mod

! !USES:

use ESMF
use mapl_Geom_API, only: MAPL_GridGet
use mapl_Geom_API_mod, only: MAPL_GridGet
use MAPL_Constants
use mapl_GridAccessors, only: geom_GridGet => GridGet
use mapl_NCIO, only: MAPL_ReadTilingNC4
use mapl_GridAccessors_mod, only: geom_GridGet => GridGet
use mapl_NCIO_mod, only: MAPL_ReadTilingNC4
use MAPL_CommsMod
use MAPL_HashMod
use MAPL_ShmemMod
use MAPL_ExceptionHandling
use mapl_EASEConversion, only: MAPL_ease_extent => ease_extent
use mapl_Hash_mod
use mapl_Shmem_mod
use mapl_ExceptionHandling_mod
use mapl_EASEConversion_mod, only: MAPL_ease_extent => ease_extent
use, intrinsic :: iso_fortran_env, only: REAL64, INT64
use mpi

Expand Down Expand Up @@ -3224,7 +3224,7 @@ subroutine MAPL_DistGridGet(distGrid, minIndex, maxIndex, rc)
end subroutine MAPL_DistGridGet

subroutine MAPL_GetImsJms(Imins, Imaxs, Jmins, Jmaxs, Ims, Jms, rc)
use MAPL_SortMod
use mapl_Sort_mod
use ESMF, only: ESMF_SUCCESS
integer, dimension(:), intent(in) :: Imins, Imaxs, Jmins, Jmaxs
integer, pointer :: Ims(:), Jms(:)
Expand Down Expand Up @@ -3285,4 +3285,4 @@ subroutine MAPL_GetImsJms(Imins, Imaxs, Jmins, Jmaxs, Ims, Jms, rc)
_RETURN(ESMF_SUCCESS)
end subroutine MAPL_GetImsJms

end module mapl_LocStreamMod_impl
end module mapl_LocStreamMod_impl_mod
12 changes: 6 additions & 6 deletions base3g/MemUtils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
!
! `MAPL_MemUtilsMod` -- A Module to query/print memory use per processor (Adapted by WMP from FMS memuse utility)
!
module MAPL_MemUtilsMod
module mapl_MemUtils_mod

use ESMF
use MAPL_CommsMod
use MAPL_ShmemMod
use mapl_ErrorHandling
use mapl_FileIO, only: WRITE_PARALLEL
use mapl_Shmem_mod
use mapl_ErrorHandling_mod
use mapl_FileIO_mod, only: WRITE_PARALLEL
use, intrinsic :: iso_fortran_env, only: INT64
use, intrinsic :: iso_fortran_env, only: REAL64
use mpi
Expand Down Expand Up @@ -349,7 +349,7 @@ end subroutine MAPL_MemUtilsWriteComm
!#######################################################################

subroutine MAPL_MemUsed ( memtotal, used, percent_used, RC )
use MAPL_ErrorHandlingMod, only: MAPL_RTRN
use mapl_ErrorHandling_mod, only: MAPL_RTRN
real, intent(out) :: memtotal, used, percent_used
integer, optional, intent(OUT ) :: RC

Expand Down Expand Up @@ -686,4 +686,4 @@ subroutine MAPL_MemReport(comm,file_name,line,decorator,rc)

end subroutine

end module MAPL_MemUtilsMod
end module mapl_MemUtils_mod
22 changes: 11 additions & 11 deletions base3g/NCIO.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@

! !INTERFACE:

module mapl_NCIO
module mapl_NCIO_mod

use mapl_FileIOShared, only: ArrDescr, ArrDescrSet, WRITE_PARALLEL, MAPL_TileMaskGet
use mapl_FileIOShared, only: ArrayScatterShm
use mapl_FileIOShared_mod, only: ArrDescr, ArrDescrSet, WRITE_PARALLEL, MAPL_TileMaskGet
use mapl_FileIOShared_mod, only: ArrayScatterShm
use ESMF
use mapl_GridGetGlobal, only: GridGetGlobalCellCountPerDim
use MAPL_RangeMod, only: MAPL_Range
use mapl_GridAccessors, only: geom_GridGet => GridGet
use mapl_GridGetGlobal_mod, only: GridGetGlobalCellCountPerDim
use mapl_Range_mod, only: MAPL_Range
use mapl_GridAccessors_mod, only: geom_GridGet => GridGet
use MAPL_CommsMod
use mapl_Field_API, only: MAPL_FieldEmptyComplete, MAPL_FieldClone
use MAPL_SortMod
use mapl_EASEConversion, only: MAPL_get_ease_gridname_by_cols => get_ease_gridname_by_cols
use mapl_Sort_mod
use mapl_EASEConversion_mod, only: MAPL_get_ease_gridname_by_cols => get_ease_gridname_by_cols

use MAPL_ShmemMod
use MAPL_ExceptionHandling
use mapl_Shmem_mod
use mapl_ExceptionHandling_mod
use netcdf
use pFIO
use MAPL_Constants
Expand Down Expand Up @@ -5232,4 +5232,4 @@ subroutine MAPL_WriteTilingNC4(File, GridName, im, jm, nx, ny, iTable, rTable, N
_RETURN(_SUCCESS)
end subroutine MAPL_WriteTilingNC4

end module mapl_NCIO
end module mapl_NCIO_mod
12 changes: 6 additions & 6 deletions base3g/SimpleBundleMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
!
#include "MAPL.h"

module mapl_SimpleBundleMod_impl
module mapl_SimpleBundleMod_impl_mod

use ESMF
use mapl_Geom_API, only: MAPL_GridGet
use mapl_FieldBundle_API, only: MAPL_FieldBundleGetByIndex, MAPL_FieldBundleDestroy
use mapl_ArrayReductions, only: MaxMin => MAPL_MaxMin
use mapl_Geom_API_mod, only: MAPL_GridGet
use mapl_FieldBundle_API_mod, only: MAPL_FieldBundleGetByIndex, MAPL_FieldBundleDestroy
use mapl_ArrayReductions_mod, only: MaxMin => MAPL_MaxMin
use MAPL_CommsMod, only: MAPL_AM_I_ROOT
use MAPL_Constants, only: MAPL_PI
use MAPL_ExceptionHandling
use mapl_ExceptionHandling_mod

implicit none
private
Expand Down Expand Up @@ -801,4 +801,4 @@ end subroutine AddThisField_

end subroutine BundleAddState_

end module mapl_SimpleBundleMod_impl
end module mapl_SimpleBundleMod_impl_mod
Loading
Loading