fortran编写简单的形成地震同相轴,用的是雷克子波
- program main
- parameter (lt=100, nmx=60, dt=0.002)
- real trace(lt), txdata(lt, nmx)
-
- f0=25.0
-
- open(1,file='synthetic_100_60.dat',access='direct',recl=4*lt)
- do ix=1, nmx
- do it=1,lt
- trace(it)=0.0
- enddo
- do it=1,lt
- if(it.eq.30)then
- call RICKER_WAVELET(trace(it), f0, lt-it, dt)
- elseif(it.eq.3*ix)then
- call RICKER_WAVELET(trace(it), f0, lt-it, dt)
- elseif(it.eq.-3*ix+60)then
- call RICKER_WAVELET(trace(it), f0, lt-it, dt)
- endif
- txdata(it,ix)=trace(it)
- enddo
- enddo
- do ix=1,nmx
- write(1,rec=ix)(txdata(it,ix),it=1,lt)
- enddo
- close(1)
- end
- ******************************************************
- c this is the program to make a ricker wavelet with a main frequence
- SUBROUTINE RICKER_WAVELET(TRACE, F0, LT, DT)
- PARAMETER (PI=3.14159265359)
- REAL FO
- real TRACE(LT)
- DO IT=1,LT
- W=PI*F0*IT*DT
- TRACE(IT)=0.0
- TRACE(IT)=(1.0-2*W*W)*EXP(-W*W)
- END DO
-
- RETURN
-
- END
复制代码 |