! Program to calculate wave types
!
program waves

    real :: waveHt, wavePer, beachS, inshoreB
    ! Define gravitational acceleration cm sec^(-2)
    real, parameter :: gC = 981.0 

    write (*,*) 'Enter wave data: '
    write (*,*) '    breaker wave height (cm): '
    read (*,*) waveHt 
    write (*,*) '    wave period (sec):  '
    read (*,*) wavePer
    write (*,*) '    beach slope:  '
    read(*,*) beachS 

! Perform calculations
 
    inshoreB = waveHt / (gC * beachS * (wavePer**2));

    if (inshoreB < 0.003) then
        write (*,*) 'Breaking waves are surging'
    else if (inshoreB > 0.068) then
        write (*,*) 'Breaking waves are spilling'
    else
        write (*,*) 'Breaking waves are plunging'
    end if 

end program waves
