Skip to content
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# Contributors

| GitHub user | Real Name | Affiliation | Date |
| ---------------- | ---------------------- | ----------- | ---------- |
| andrewcoughtrie | Andrew Coughtrie | Met Office | 2025.12.12 |
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| jedbakerMO | Jed Baker | Met Office | 2025-12-29 |
| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 |
| mo-marqh | Mark Hedley | Met Office | 2025-12-11 |
| mo-rickywong | Ricky Wong | Met Office | 2025-01-30 |
| mike-hobson | Mike Hobson | Met Office | 2025-12-17 |
| MatthewHambley | Matthew Hambley | Met Office | 2025-12-15 |
| mo-lottieturner | Lottie Turner | Met Office | 2025-12-16 |
| tommbendall | Thomas Bendall | Met Office | 2026-01-23 |
| yaswant | Yaswant Pradhan | Met Office | 2025-12-16 |
| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-08 |
| harry-shepherd | Harry Shepherd | Met Office | 2026-01-08 |
| EdHone | Ed Hone | Met Office | 2026-01-09 |
| tom-j-h | Tom Hill | Met Office | 2026-01-19 |
| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-12 |
| t00sa | Sam Clarke-Green | Met Office | 2026-01-27 |
| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-30 |
| jcsmeto | James Cunningham-Smith | Met Office | 2026-02-06 |
| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 |
| GitHub user | Real Name | Affiliation | Date |
| ------------------ | ---------------------- | ----------- | ---------- |
| andrewcoughtrie | Andrew Coughtrie | Met Office | 2025.12.12 |
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| jedbakerMO | Jed Baker | Met Office | 2025-12-29 |
| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 |
| mo-marqh | Mark Hedley | Met Office | 2025-12-11 |
| mo-rickywong | Ricky Wong | Met Office | 2025-01-30 |
| mike-hobson | Mike Hobson | Met Office | 2025-12-17 |
| MatthewHambley | Matthew Hambley | Met Office | 2025-12-15 |
| mo-lottieturner | Lottie Turner | Met Office | 2025-12-16 |
| tommbendall | Thomas Bendall | Met Office | 2026-01-23 |
| yaswant | Yaswant Pradhan | Met Office | 2025-12-16 |
| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-08 |
| harry-shepherd | Harry Shepherd | Met Office | 2026-01-08 |
| EdHone | Ed Hone | Met Office | 2026-01-09 |
| tom-j-h | Tom Hill | Met Office | 2026-01-19 |
| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-12 |
| t00sa | Sam Clarke-Green | Met Office | 2026-01-27 |
| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-30 |
| jcsmeto | James Cunningham-Smith | Met Office | 2026-02-06 |
| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 |
| ukmo-juan-castillo | Juan M Castillo | Met Office | 2026-02-25 |
43 changes: 43 additions & 0 deletions infrastructure/source/mesh/global_mesh_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ module global_mesh_mod
! Collection of global mesh maps in global cell IDs
type(global_mesh_map_collection_type), allocatable :: global_mesh_maps

! Partition all meshes in the intergrid mesh maps or just the default
logical(l_def) :: partition_nmeshes

!-------------------------------------------------------------
! Supplementary data: Only held for outputting to file.
! These may not actually be used in the main model though may
Expand Down Expand Up @@ -206,6 +209,8 @@ module global_mesh_mod
procedure, public :: get_target_mesh_names
procedure, public :: get_nmaps
procedure, public :: get_mesh_maps
procedure, public :: get_partition_nmeshes
procedure, public :: set_partition_nmeshes

procedure, public :: is_geometry_spherical
procedure, public :: is_geometry_planar
Expand Down Expand Up @@ -404,6 +409,13 @@ function global_mesh_constructor( ugrid_mesh_data ) result(self)
allocate ( self%global_mesh_maps, &
source = global_mesh_map_collection_type() )

! Partition all meshes in the intergrid map by default
if (self%ntarget_meshes > 0) then
self%partition_nmeshes = .true.
else
self%partition_nmeshes = .false.
end if

end function global_mesh_constructor

!===========================================================================
Expand Down Expand Up @@ -459,6 +471,7 @@ function global_mesh_constructor_unit_test_data() result (self)

self%void_cell = void
self%ntarget_meshes = 0
self%partition_nmeshes = .false.
self%domain_extents(:,1) = [ -2.0_r_def, -2.0_r_def ]
self%domain_extents(:,2) = [ 2.0_r_def, -2.0_r_def ]
self%domain_extents(:,3) = [ 2.0_r_def, 2.0_r_def ]
Expand Down Expand Up @@ -1214,6 +1227,36 @@ function get_mesh_maps( self) result( global_maps )

end function get_mesh_maps

!---------------------------------------------------------------------------
!> @brief Returns if all meshes in the intergrid maps need to be partitioned
!>
!> @return True if all meshes in the intergrid maps need to be partitioned
!>
function get_partition_nmeshes( self ) result (partition_nmeshes)

implicit none

class(global_mesh_type), intent(in) :: self

logical(l_def) :: partition_nmeshes

partition_nmeshes = self%partition_nmeshes

end function get_partition_nmeshes

!---------------------------------------------------------------------------
!> @brief Sets the value of partition_nmeshes
!>
subroutine set_partition_nmeshes( self, partition_nmeshes )

implicit none

class(global_mesh_type), intent(inout) :: self
logical(l_def), intent(in) :: partition_nmeshes

self%partition_nmeshes = partition_nmeshes

end subroutine set_partition_nmeshes

!---------------------------------------------------------------------------
!> @brief Gets the array of names of target meshes.
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/source/mesh/partition_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ subroutine partitioner_rectangular_panels( global_mesh, &
void_cell = global_mesh%get_void_cell()
cross_panels = .false.
n_cross_panels = 1
any_maps = global_mesh%get_nmaps() > 0
any_maps = global_mesh%get_nmaps() > 0 .and. global_mesh%get_partition_nmeshes()

nullify( last )
nullify( start_subsect )
Expand Down