Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/fv_io: fix a few minor errors #284

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions tools/fv_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,9 @@ subroutine remap_restart(Atm)
call read_restart(Atm(1)%Rsf_restart, ignore_checksum=Atm(1)%flagstruct%ignore_rst_cksum)
call close_file(Atm(1)%Rsf_restart)
Atm(1)%Rsf_restart_is_open = .false.
call mpp_error(NOTE,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
Atm%flagstruct%srf_init = .false.
else
call mpp_error(NOTE,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
Atm%flagstruct%srf_init = .false.
endif

if ( Atm(1)%flagstruct%fv_land ) then
Expand All @@ -740,6 +741,7 @@ subroutine remap_restart(Atm)
if (Atm(1)%Mg_restart_is_open) then
call read_data(Atm(1)%Mg_restart, 'ghprime', Atm(1)%sgh)
call close_file(Atm(1)%Mg_restart)
Atm(1)%Mg_restart_is_open = .false.
else
call mpp_error(NOTE,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
endif
Expand All @@ -749,6 +751,7 @@ subroutine remap_restart(Atm)
if (Atm(1)%Lnd_restart_is_open) then
call read_data(Atm(1)%Lnd_restart, 'oro', Atm(1)%oro)
call close_file(Atm(1)%Lnd_restart)
Atm(1)%Lnd_restart_is_open = .false.
else
call mpp_error(NOTE,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
endif
Expand Down Expand Up @@ -1463,11 +1466,13 @@ subroutine fv_io_write_BCs(Atm, timestamp)
if (Atm%neststruct%BCfile_sw_is_open) then
call write_restart_bc(Atm%neststruct%BCfile_sw)
call close_file(Atm%neststruct%BCfile_sw)
Atm%neststruct%BCfile_sw_is_open = .false.
endif

if (Atm%neststruct%BCfile_ne_is_open) then
call write_restart_bc(Atm%neststruct%BCfile_ne)
call close_file(Atm%neststruct%BCfile_ne)
Atm%neststruct%BCfile_ne_is_open = .false.
endif

deallocate(all_pelist)
Expand Down Expand Up @@ -1497,11 +1502,13 @@ subroutine fv_io_read_BCs(Atm)
if (Atm%neststruct%BCfile_sw_is_open) then
call read_restart_bc(Atm%neststruct%BCfile_sw, ignore_checksum=Atm%flagstruct%ignore_rst_cksum)
call close_file(Atm%neststruct%BCfile_sw)
Atm%neststruct%BCfile_sw_is_open = .false.
endif

if (Atm%neststruct%BCfile_ne_is_open) then
call read_restart_bc(Atm%neststruct%BCfile_ne, ignore_checksum=Atm%flagstruct%ignore_rst_cksum)
call close_file(Atm%neststruct%BCfile_ne)
Atm%neststruct%BCfile_ne_is_open = .false.
endif


Expand Down