Upgrades to a Fortran Program for Estimating Stream Transit Losses of Reusable Water, El Paso and Pueblo Counties, Colorado

Scientific Investigations Report 2018-5163
Prepared in cooperation with the Pikes Peak Regional Water Authority and the Colorado Water Conservation Board
By:  and 

Links

Abstract

In 2016, the U.S. Geological Survey, in cooperation with Pikes Peak Regional Water Authority and the Colorado Water Conservation Board, began a study to modernize a Fortran transit-loss accounting program developed by the U.S. Geological Survey to estimate net reusable flows in Fountain and Monument Creeks in El Paso and Pueblo Counties, Colorado. More than 6,000 lines of this FORTRAN77 transit-loss accounting program were revised to comply with the newer Fortran 2003 standard. The upgrade to the newer standard involved making changes in formatting and syntax on each line and, when available, adding new programming constructs that comply with the new standard. These upgrades produced a more readable Fortran program that includes safeguards to prevent accidental mistyping of variables and unintentional changes in named constants during program execution. Program revisions also introduced dynamic array allocation, whole array processing, and handling of input errors to the upgraded transit-loss accounting program.

During the upgrade from FORTRAN77 to the Fortran 2003 standard, revisions were made incrementally to the original transit-loss Fortran program. Because FORTRAN77 is a subset of Fortran 2003, the legacy FORTRAN77 statements and the upgraded Fortran 2003 statements can be compiled within the same program, permitting program revisions to be gradually phased in on a line-by-line basis. This incremental approach helped mitigate risks of introducing logic errors into the Fortran program that could produce incorrect transit-loss estimates.

Verification of the upgraded transit-loss accounting program focused on reproducing archived reusable return flows (RRF) for historical daily runs from January 5, 2015, to October 31, 2018. Because interim files storing daily streambank losses were not historically archived, no record of antecedent streambank storage losses to hydraulically connected alluvial deposits were available to provide initial conditions for each daily run. To overcome the problem of missing historical bank storage and recovery files that contain important information relating to antecedent streambank storage conditions, a 104-day “spin-up” period was required before RRFs calculated by the upgraded program and the original program matched. Estimated daily reusable return flows from archived output generated by the original program and output generated by the upgraded program were compared after this initial “spin-up” period. Daily reusable return flow estimates at delivery nodes and at the bottoms of subreaches from the upgraded Fortran program matched those output by the original program to within 0.01 and 0.0001 cubic feet per second, respectively.

Suggested Citation

Colarullo, S.J., and Miller, L.D., 2019, Upgrades to a Fortran program for estimating stream transit losses of reusable water, El Paso and Pueblo Counties, Colorado: U.S. Geological Survey Scientific Investigations Report 2018–5163, 21 p., https://doi.org/10.3133/sir20185163.

ISSN: 2328-0328 (online)

Study Area

Table of Contents

  • Acknowledgments
  • Abstract
  • Introduction
  • Description of the Transit-Loss Accounting Program
  • Transit-Loss Accounting Program Modifications, 1987–2012
  • Upgrade of the Transit-Loss Accounting Program from FORTRAN77 to Fortran 2003
  • Summary
  • References Cited
Publication type Report
Publication Subtype USGS Numbered Series
Title Upgrades to a Fortran program for estimating stream transit losses of reusable water, El Paso and Pueblo Counties, Colorado
Series title Scientific Investigations Report
Series number 2018-5163
DOI 10.3133/sir20185163
Year Published 2019
Language English
Publisher U.S. Geological Survey
Publisher location Reston, VA
Contributing office(s) Colorado Water Science Center
Description Report: vi, 21 p.; 1 Sheet (14 x 26 inches)
Country United States
State Colorado
City El Paso, Pueblo
Online Only (Y/N) Y
Additional Online Files (Y/N) Y
Google Analytic Metrics Metrics page
Additional publication details