Skip to content

Commit

Permalink
Use fileset rather than threading for decompositon
Browse files Browse the repository at this point in the history
MOM IO was using the `threading` flag rather than `fileset` to determine
whether a file should be forced as single file rather than
domain-decomposed.  This patch applies the correct flag.
  • Loading branch information
marshallward authored and adcroft committed Jun 14, 2023
1 parent cb4574b commit 273da2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/framework/MOM_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,14 @@ subroutine create_MOM_file(IO_handle, filename, vars, novars, fields, &
if (one_file) then
if (domain_set) then
call IO_handle%open(filename, action=OVERWRITE_FILE, &
MOM_domain=domain, threading=thread)
MOM_domain=domain, threading=thread, fileset=SINGLE_FILE)
else
call IO_handle%open(filename, action=OVERWRITE_FILE, threading=thread)
call IO_handle%open(filename, action=OVERWRITE_FILE, threading=thread, &
fileset=SINGLE_FILE)
endif
else
call IO_handle%open(filename, action=OVERWRITE_FILE, MOM_domain=Domain)
call IO_handle%open(filename, action=OVERWRITE_FILE, MOM_domain=Domain, &
threading=thread, fileset=thread)
endif

! Define the coordinates.
Expand Down
4 changes: 2 additions & 2 deletions src/framework/MOM_io_file.F90
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,8 @@ subroutine open_file_infra(handle, filename, action, MOM_domain, threading, file
! True if the domain is replaced with a single-file IO layout.

use_single_file_domain = .false.
if (present(MOM_domain) .and. present(threading)) then
if (threading == SINGLE_FILE) &
if (present(MOM_domain) .and. present(fileset)) then
if (fileset == SINGLE_FILE) &
use_single_file_domain = .true.
endif

Expand Down

0 comments on commit 273da2f

Please sign in to comment.