This program was originally written in Fortran in 1989 by David R. Brown and the American Public Power Association.
The following sources provided data on the electrical properties of different conductors:
The program calculates noise at ground level, y=0, for a range of X coordinates
For example, if xstart is 0, xstop is 10 and the number of data points is 3, then the program will calculate noise at ground level at the following distances away from the distribution line: 0 feet, 5 feet, 10 feet.
{xstart: XSTART}
{xstop: XSTOP}
{n_datapoints: Number of Data Points}
# Click the Blue Plane to preview this as a CrossCompute tool
conductor_table_path = 'conductors.csv'
phase_table_path = 'phases.csv'
shield_table_path = 'shields.csv'
span_table_path = 'spans.csv'
xstart = 0
xstop = 250
n_datapoints = 51
target_folder = '/tmp'
from os.path import join
output_text_path = join(target_folder, 'anoise.log')
target_text_path = join(target_folder, 'anoise.txt')
from macros import transmogrify_conductors
conductor_text_path = transmogrify_conductors(join(
target_folder, 'conductors.dat'), conductor_table_path)
from macros import transmogrify_pylons
pylon_text_path = transmogrify_pylons(join(
target_folder, 'pylons.dat',
), phase_table_path, shield_table_path, span_table_path)
from subprocess import run
executable = 'anoise.out'
script = 'anoise.f'
output_text = run([
'gfortran',
'-o',
executable,
script,])
from os.path import expanduser
from subprocess import check_output, STDOUT
output_text = check_output([
join('.', executable),
conductor_text_path,
pylon_text_path,
expanduser(target_text_path),
str(xstart),
str(xstop),
str(n_datapoints),
], stderr=STDOUT)
with open(output_text_path, 'wb') as output_file:
output_file.write(output_text)
print('output_text_path = ' + output_text_path)
print('target_text_path = ' + target_text_path)