diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 7451eb109..c9a0e042d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 | diff --git a/infrastructure/source/mesh/global_mesh_mod.F90 b/infrastructure/source/mesh/global_mesh_mod.F90 index 1dbcb74f0..724845a71 100644 --- a/infrastructure/source/mesh/global_mesh_mod.F90 +++ b/infrastructure/source/mesh/global_mesh_mod.F90 @@ -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 @@ -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 @@ -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 !=========================================================================== @@ -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 ] @@ -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. diff --git a/infrastructure/source/mesh/partition_mod.F90 b/infrastructure/source/mesh/partition_mod.F90 index a9ff9097e..b99ad5f47 100644 --- a/infrastructure/source/mesh/partition_mod.F90 +++ b/infrastructure/source/mesh/partition_mod.F90 @@ -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 )