TR-388, 2Nd Edition WRAP Programming Manual
Total Page:16
File Type:pdf, Size:1020Kb
Texas Water Resources Institute TR-388, 2nd Edition August 2012 Water Rights Analysis Package (WRAP) Programming Manual Ralph A. Wurbs and Richard J. Hoffpauir Texas A&M University Water Rights Analysis Package (WRAP) Programming Manual by Ralph A. Wurbs and Richard J. Hoffpauir Texas A&M University TR-388 Texas Water Resources Institute College Station, Texas August 2012 Water Rights Analysis Package (WRAP) Programming Manual by Ralph A. Wurbs and Richard J. Hoffpauir Texas A&M University for the Texas Commission on Environmental Quality Austin, Texas 78711-3087 under Contract 582-9-89809 (2008-2011) Contract 582-12-10220 (2011-2013) Technical Report 388 Texas Water Resources Institute The Texas A&M University System College Station, Texas 77843-2118 Second Edition August 2012 TABLE OF CONTENTS Chapter 1 Introduction ................................................................................................................. 1 WRAP Modeling System ......................................................................................................... 1 Compilers and Integrated Development Environments ........................................................... 2 HEC-DSS Data Storage System ............................................................................................... 8 Fortran Language ...................................................................................................................... 9 Chapter 2 SIM ............................................................................................................................... 19 Organization of SIM ................................................................................................................. 19 Input and Output Files .............................................................................................................. 23 Subroutines ............................................................................................................................... 24 HECLIB Subroutines ................................................................................................................ 27 Variables for Defining Array Sizes .......................................................................................... 28 Definition of Variables ............................................................................................................. 29 Chapter 3 SIMD ............................................................................................................................ 65 Organization of SIMD .............................................................................................................. 68 Input and Output Files .............................................................................................................. 68 Subroutines ............................................................................................................................... 69 Definition of Variables ............................................................................................................. 71 Information for Tracking Changes to Flow in the Routing Arrays ........................................ 83 Information for Tracking Reverse Routing in Water Availability …...................................... 87 Chapter 4 SALT ............................................................................................................................ 91 Organization of SALT .............................................................................................................. 91 Input and Output Files .............................................................................................................. 92 Subroutines ............................................................................................................................... 93 Definition of Variables ............................................................................................................. 93 Chapter 5 TABLES ...................................................................................................................... 103 Organization of TABLES ......................................................................................................... 103 Input and Output Files .............................................................................................................. 105 Subroutines ............................................................................................................................... 107 HECLIB Subroutines ............................................................................................................... 112 Definition of Variables ............................................................................................................. 112 Variables Exclusive of Those in the CRM Subroutines .......................................................... 112 Definition of Variables in the Conditional Reliability Modeling (CRM) Subroutines ........... 135 Chapter 6 HYD ............................................................................................................................. 143 Organization of HYD ............................................................................................................... 143 Input and Output Files .............................................................................................................. 147 Subroutines ............................................................................................................................... 148 Definition of Variables ............................................................................................................ 151 iii Definition of Variables Excluding Subroutines EXTEND, CRITERIA, and EFFLOW ....... 151 Variables in Subroutines EXTEND, CRITERIA, and EFFLOW ........................................... 160 Chapter 7 DAY ............................................................................................................................ 171 Organization of DAY ….......................................................................................................... 171 Input and Output Files ............................................................................................................ 171 Subroutines ............................................................................................................................. 172 Functions .................................................................................................................................. 174 Definition of Variables ............................................................................................................ 176 Chapter 8 WinWRAP .................................................................................................................. 183 Compaq/Intel Visual Fortran Features for Developing Graphical User Interfaces ................ 184 Differences between WinWRAP and the Other WRAP Programs ........................................ 184 Organization of WinWRAP .................................................................................................... 185 LIST OF FIGURES 2.1 Outline of SIM Simulation ....................................................................................................... 20 3.1 Outline of SIMD Simulation .................................................................................................... 66 4.1 Organization of SALT .............................................................................................................. 92 LIST OF TABLES 1.1 WRAP Programs ...................................................................................................................... 2 1.2 Project Configuration Properties Menu for the Intel Compiler ................................................ 6 1.3 Fortran Statements .................................................................................................................... 12 1.4 Fortran Example ....................................................................................................................... 18 2.1 SIM Input and Output Files ...................................................................................................... 24 3.1 Additional SIMD Input and Output Files Not Included in SIM .............................................. 68 4.1 SALT Input and Output Files ................................................................................................... 93 5.1 Organization of TABLES by TIN File Input Record Types .................................................. 104 5.2 TABLES Input and Output Files .............................................................................................. 105 5.3 Features that Result in Files Being Opened ............................................................................. 106 5.4 TABLES Subprograms ............................................................................................................ 108 6.1 HYD Input and Output Files .................................................................................................... 147 6.2 HYD Subroutines .................................................................................................................... 148 7.1 Day Input and Output Files ..................................................................................................... 171 8.1 WinWRAP Interface ..............................................................................................................