From 8e5a1b758902fad7e33194361cd6da8c22944676 Mon Sep 17 00:00:00 2001 From: Marshall Ward Date: Wed, 13 Oct 2021 16:11:44 -0400 Subject: [PATCH] FMS1: Don't create IO domains for single-PE domain FMS mpp domain creation is done in the `clone_MD_to_d2D` function, and currently an IO domain is always created within the MPP domain. This has caused problems with single-PE runs in FMS1, where the `write_field` logic was not able to reach the part which removes halo data if an IO domain was present, and halo data was being written to the restart files. This issue arose when `PARALLEL_RESTARTFILES` was set to `True` for single-PE tests. This does not appear to be a problem with FMS2, and no action is needed by the FMS team. --- config_src/infra/FMS1/MOM_domain_infra.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config_src/infra/FMS1/MOM_domain_infra.F90 b/config_src/infra/FMS1/MOM_domain_infra.F90 index 590637158f..7eff4597f3 100644 --- a/config_src/infra/FMS1/MOM_domain_infra.F90 +++ b/config_src/infra/FMS1/MOM_domain_infra.F90 @@ -1716,13 +1716,13 @@ subroutine clone_MD_to_d2D(MD_in, mpp_domain, min_halo, halo_size, symmetric, & symmetry=symmetric_dom, xextent=xextent, yextent=yextent, name=dom_name) endif - if ((MD_in%io_layout(1) + MD_in%io_layout(2) > 0) .and. & - (MD_in%layout(1)*MD_in%layout(2) > 1)) then - call mpp_define_io_domain(mpp_domain, MD_in%io_layout) - else - call mpp_define_io_domain(mpp_domain, (/ 1, 1 /) ) + if (MD_in%layout(1) * MD_in%layout(2) > 1) then + if ((MD_in%io_layout(1) + MD_in%io_layout(2) > 0)) then + call mpp_define_io_domain(mpp_domain, MD_in%io_layout) + else + call mpp_define_io_domain(mpp_domain, [1, 1] ) + endif endif - end subroutine clone_MD_to_d2D !> Returns the index ranges that have been stored in a MOM_domain_type