Skip to content

Commit

Permalink
fix generic read/write in wav_restart
Browse files Browse the repository at this point in the history
* need to send explicit array bounds for ice array since
it is 0:nsea
* all baselines b4b against f9531d0
  • Loading branch information
DeniseWorthen committed Sep 23, 2024
1 parent ad51cd6 commit d92e9ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions model/src/wav_restart_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ subroutine write_restart (fname, va, mapsta)
if (addrstflds) then
do i = 1,rstfldcnt
vname = trim(rstfldlist(i))
if (vname == 'ice')call write_globalfield(vname, nseal_cpl, ice)
if (vname == 'ice')call write_globalfield(vname, nseal_cpl, ice(1:nsea))
end do
end if

Expand Down Expand Up @@ -340,7 +340,7 @@ subroutine read_restart (fname, va, mapsta, mapst2)
if (addrstflds) then
do i = 1,rstfldcnt
vname = trim(rstfldlist(i))
if (vname == 'ice')call read_globalfield(wave_communicator, vname, nseal_cpl, ice, icei)
if (vname == 'ice')call read_globalfield(wave_communicator, vname, nseal_cpl, ice(1:nsea), icei)
end do
end if

Expand All @@ -365,7 +365,7 @@ subroutine write_globalfield(vname, nseal_cpl, global_input)

character(len=*) , intent(in) :: vname
integer , intent(in) :: nseal_cpl
real , intent(in) :: global_input(nsea)
real , intent(in) :: global_input(:)

! local variable
real, allocatable :: lvar(:)
Expand Down Expand Up @@ -406,8 +406,8 @@ subroutine read_globalfield(wave_communicator, vname, nseal_cpl, global_output,
type(MPI_Comm) , intent(in) :: wave_communicator ! needed for mpi_f08
character(len=*) , intent(in) :: vname
integer , intent(in) :: nseal_cpl
real , intent(out) :: global_output(nsea)
real , intent(out) :: global_2d(nx,ny)
real , intent(out) :: global_output(:)
real , intent(out) :: global_2d(:,:)

! local variables
real :: global_input(nsea)
Expand Down

0 comments on commit d92e9ff

Please sign in to comment.