Fortran 77 Examples

By Dr. Steve Gao

1. Write to a text (ASCII) file

2. Read a text (ASCII) file to a 1-D array and write a text file

3. Read and write SAC files

4. Read a SAC file and some header values (e.g., event locations)

5. Executing Linux system commands inside Fortran

6. Write and execute a SAC program in fortran

7. An example of the use of subroutines

8. Smooth a SAC file

9. The use of the function amin1

10. Get the average of an array

11. Converting earthquake time into decimal year

12. Number of quakes per day

13. Number of quakes per day using arrays to speed up the processing

14. Real-life research: Spatial distribution of seismic b_values

15. Counting quakes in a circle using the subroutine distazsub.f