Skip to content

Commit

Permalink
fix bugs in binary and pio2 updates (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig committed Mar 2, 2022
1 parent 09238c7 commit 52a7054
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
21 changes: 20 additions & 1 deletion cicecore/cicedynB/infrastructure/io/io_binary/ice_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ module ice_restart
implicit none
private
public :: init_restart_write, init_restart_read, &
read_restart_field, write_restart_field, final_restart
read_restart_field, write_restart_field, final_restart, &
query_field

real(kind=dbl_kind) :: time_forc = -99. ! historic now local

Expand Down Expand Up @@ -892,6 +893,24 @@ subroutine final_restart()

end subroutine final_restart

!=======================================================================

! Inquire field existance, doesn't work in binary files so set to true and return
! author T. Craig

logical function query_field(nu,vname)

integer (kind=int_kind), intent(in) :: nu ! unit number
character (len=*) , intent(in) :: vname ! variable name

! local variables

character(len=*), parameter :: subname = '(query_field)'

query_field = .true.

end function query_field

!=======================================================================

end module ice_restart
Expand Down
12 changes: 6 additions & 6 deletions cicecore/cicedynB/infrastructure/io/io_pio2/ice_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ subroutine init_restart_write(filename_spec)
call define_rest_field(File,'vvel',dims)

if (grid_ice == 'CD') then
call define_rest_field(ncid,'uvelE',dims)
call define_rest_field(ncid,'vvelE',dims)
call define_rest_field(ncid,'uvelN',dims)
call define_rest_field(ncid,'vvelN',dims)
call define_rest_field(File,'uvelE',dims)
call define_rest_field(File,'vvelE',dims)
call define_rest_field(File,'uvelN',dims)
call define_rest_field(File,'vvelN',dims)
endif

if (grid_ice == 'C') then
call define_rest_field(ncid,'uvelE',dims)
call define_rest_field(ncid,'vvelN',dims)
call define_rest_field(File,'uvelE',dims)
call define_rest_field(File,'vvelN',dims)
endif


Expand Down

0 comments on commit 52a7054

Please sign in to comment.