Skip to content

Commit

Permalink
Remove broken ncd_io_1d_log_glob
Browse files Browse the repository at this point in the history
For now I'm just removing the ability to try to call this with a 1-d
logical, rather than trying to fix the code.

Fixes #24
  • Loading branch information
billsacks committed Aug 3, 2018
1 parent 0df1704 commit 0a36ae0
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions src/main/ncdio_pio.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module ncdio_pio
interface ncd_io
module procedure ncd_io_char_var0_start_glob

!DIMS 0,1
!DIMS 0
module procedure ncd_io_{DIMS}d_log_glob

!DIMS 0,1,2,3
Expand Down Expand Up @@ -1192,11 +1192,11 @@ contains
end subroutine ncd_io_char_var0_start_glob

!------------------------------------------------------------------------
!DIMS 0,1
!DIMS 0
subroutine ncd_io_{DIMS}d_log_glob(varname, data, flag, ncid, readvar, nt, posNOTonfile)
!
! !DESCRIPTION:
! netcdf I/O of global integer variable
! netcdf I/O of global logical variable
!
! !ARGUMENTS:
class(file_desc_t) , intent(inout) :: ncid ! netcdf file id
Expand Down Expand Up @@ -1242,12 +1242,7 @@ contains
call shr_sys_abort(' ERROR: bad integer value for logical data'//errMsg(sourcefile, __LINE__))
end if
#else
allocate(idata1d(size(data)))
data = (idata1d == 1)
if ( any(idata1d /= 0 .and. idata1d /= 1) )then
call shr_sys_abort(' ERROR: read in bad integer value(s) for logical data'//errMsg(sourcefile, __LINE__))
end if
deallocate(idata1d)
call shr_sys_abort('ncd_io_*_log_glob not implemented for DIMS > 0')
#endif
endif
if (present(readvar)) readvar = varpresent
Expand All @@ -1267,18 +1262,7 @@ contains
status = pio_put_var(ncid, varid, start, count, idata1d)
deallocate(idata1d)
#else
start(1) = 1 ; count(1) = size(data)
start(2) = 1 ; count(2) = 1
if (present(nt)) start(2) = nt
allocate(idata1d(size(data)))
where( data )
idata1d = 1
elsewhere
idata1d = 0
end where
call ncd_inqvid (ncid, varname, varid, vardesc)
status = pio_put_var(ncid, varid, start, count, idata1d)
deallocate( idata1d )
call shr_sys_abort('ncd_io_*_log_glob not implemented for DIMS > 0')
#endif

endif ! flag
Expand Down

0 comments on commit 0a36ae0

Please sign in to comment.