Skip to content

Commit

Permalink
bugfix for correctly recognize WIN1 format at 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
tktmyd committed Sep 4, 2019
1 parent 3147067 commit 9b0bba2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# fwin
A module for seismic waveform data in WIN and WIN32 formats
A module for reading seismic waveform data in WIN and WIN32 formats

## Important Notice
This library is under being development. Significant changes in designs of module libraries might occur in future versions.

## Compile

Expand Down
2 changes: 1 addition & 1 deletion src/fdewin_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ program fdewin_s
character(256), allocatable :: fn_win(:)
character(4), allocatable :: chid(:)
integer, allocatable :: dat(:,:), dat0(:,:)
integer, allocatable :: npts(:,:), sfreq(:), npts_all(:)
integer, allocatable :: npts(:,:), sfreq(:)
character(80) :: d_out
integer, parameter :: fsmax = 200
logical :: is_test_mode
Expand Down
5 changes: 3 additions & 2 deletions src/fwin2sac.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ program fwin2sac
if( is_all_st ) call winch__get_all_stnm(ch_tbl, stnm)
call util__read_arglst(cmpbuf, ncmp, is_all_cmp, cmpnm)
if( is_all_cmp ) call winch__get_all_cmpnm(ch_tbl, cmpnm)

nch = 0
do i=1, size(stnm)
do j=1, size(cmpnm)
!try
Expand Down Expand Up @@ -171,14 +173,13 @@ program fwin2sac
call sac__write(fn_sac, sh, dat(:,i)*ch(i)%conv, .true.)
end if
end do

end block

contains

subroutine usage_stop()

character(18) :: sp1 = ' '
character(9) :: sp2 = ' '
write(error_unit,'(A)') 'usage: fwin2sac.x <-l listfile> '
write(error_unit,'(A)') sp1//'[-t chtbl] [-c chids|chlist|all] [-s stnms|stlist|all] [-p cmpnm|cmplist|all]'
stop
Expand Down
4 changes: 2 additions & 2 deletions src/m_win.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module m_win
character(1), save, private :: azero !< binary image of zero in single-bit integer


integer, parameter :: YR_MIN = 1900
integer, parameter :: YR_MIN = 1913 !! avoid misreading 201912 as 1912
integer, parameter :: YR_MAX = 2100

contains
Expand Down Expand Up @@ -394,7 +394,7 @@ subroutine win__scan_buf(wh, buf)
bs1 = 12
bs2 = 15
end if

n = 0
!! obtain block locations & datetime information
do
Expand Down

0 comments on commit 9b0bba2

Please sign in to comment.