Skip to content

Commit

Permalink
fix restarts when ntile>0
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Mar 4, 2024
1 parent 3515360 commit ac5520f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mediator/med.F90
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ subroutine SetServices(gcomp, rc)

#ifdef CDEPS_INLINE
!------------------
! phase routine for cdeps inline capabilty
! phase routine for cdeps inline capability
!------------------

call NUOPC_CompSetEntryPoint(gcomp, ESMF_METHOD_RUN, &
Expand Down
4 changes: 3 additions & 1 deletion mediator/med_internalstate_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ module med_internalstate_mod
type(ESMF_VM) :: vm

! Global nx,ny dimensions of input arrays (needed for mediator history output)
integer, pointer :: nx(:), ny(:), ntile(:)
integer, pointer :: nx(:), ny(:)
! Number of nx*ny domains (needed for cubed-sphere and regional domains)
integer, pointer :: ntile(:)

! Import/Export Scalars
character(len=CL) :: flds_scalar_name = ''
Expand Down
4 changes: 4 additions & 0 deletions mediator/med_phases_restart_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ subroutine med_phases_restart_write(gcomp, rc)
if (is_local%wrap%comp_present(n)) then
nx = is_local%wrap%nx(n)
ny = is_local%wrap%ny(n)
if (is_local%wrap%ntile(n) > 0) then
nx = is_local%wrap%ntile(n)*is_local%wrap%ny(n)*is_local%wrap%nx(n)
ny = 1
end if
! Write import field bundles
if (ESMF_FieldBundleIsCreated(is_local%wrap%FBimp(n,n),rc=rc)) then
call med_io_write(io_file, is_local%wrap%FBimp(n,n), whead(m), wdata(m), nx, ny, &
Expand Down

0 comments on commit ac5520f

Please sign in to comment.