If you peruse through old copies of BYTE Magazine (archive.org), sometimes you can find an oddity. I was looking through some today, and in the X 1985 issue there is a very interesting article – “*Local Effects of Nuclear Weapons*“, by John R. Fanchi. The article talked about how to calculate the effects of a nuclear blast, and provide some programs written in BASIC. Weird you say? Well consider the context, the Cold War was still going on, and people were starting to have home computers, programming in BASIC on them, so it’s not that weird really. Nobody thought that the USSR would basically collapse in five years time, and the early 1980s were full of apocalyptic movies: War Games (1983), The Day After (1983). But it was also the decade that heralded the birth of video games, punk fashion, and dance music, so go figure.

The article provides two programs, one to calculate detonation effects, such as thermal flux, overpressure, EMP range, and radiation dosage, and another to calculate nuclear fallout. These articles were always well written, and researched and included the relevant math. It’s interesting because we don’t see these sort of coding articles anymore.

Anyway, for those interested, I have translated the code to Fortran. many of these programs were fairly basic: lots of input variables, a bunch of calculations, and a loop or two and decisions.

```
! Falout - A nuclear fallout calc program
! Written by: John R. Fanchi, July 1985 in BASIC
program falout
real :: y, d
real :: vpar, dpar, vtrans, dtrans, rems
real :: alpha, beta, gamma, tfac, facmax
real :: tym, facper, facpar, disper, dispar
real :: factor, coef, effrem, norm, tymhrs
integer :: i
write(,) 'Falout - Estimating the Distribution of Nuclear Fallout'
write(,) 'Estimating radiation dosage'
write(,) 'Enter the yield of the nuclear blast in megatons: '
read(,) y
write(,) 'Enter your distance from the blast in miles: '
read(,) d
rems = 250(1000y)/(163.1416dd)
write(,*) 'Estimated radiation dosage in rems: ', rems
write(,) 'Estimating fallout distribution'
write(,) 'The distribution of fallout is treated as a'
write(,) 'random walk process similar to Brownian motion.'
write(,) 'Enter the line-of-sight wind speed (mph): '
read(,) vpar
vpar = vapr * 24.0
write(,) 'Enter the line-of-sight dispersion (sq miles/day): '
read(,) dpar
write(,) 'Enter the tranverse wind speed (mph): '
read(,) vtrans
vtrans = vtrans * 24.0
write(,) 'Enter the transverse dispersion (sq miles/day): '
read(,) dtrans
write(,) 'Radiation dosage at your location as a function of time'
write(,) ' Days Rems Norm Hrs '
alpha = dd/(4dpar)
beta = -2.0dvpar/(4.0dpar)
gamma = vparvpar/(4.0dpar)+vtransvtrans/(4.0dtrans)
tfac = sqrt(1.0+4.0alphagamma)
tymmax = (1.0+tfac)/(2.0gamma)
facmax = ((d-vpartymmax)2.0)/(4.0dpartymmax)
facmax = facmax+vtransvtranstymmax/(4.0dtrans)
do i = 1,20
tym = tymmax(1.0-0.02(10.0-i))
facpar = 0.0
facper = 0.0
dispar = d-vpartym
disper = vtranstym
facpar = dispar * dispar/(4.0dpartym)
if (dtrans /= 0.0) then
facper = disperdisper/(4.0dtranstym)
end if
factor = facpar+facper
coef = tymmax/tym
effrem = remscoefexp(facmax-factor)
norm = effrem/rems
tymhrs = tym24.0
write(*,10) tym, effrem, norm, tymhrs
end do
10 format(f8.2,f8.2,f8.2,f8.2)
end program
```