**4. Features in extended DHM (EDHM)**

The changes made in DHM can be grouped into three categories, as detailed below. No changes were made to the format or structure of variables input and output files.

### **4.1 Major enhancements**


The changes in the above array sizes were done in the main code and the associated subroutines FLOODC, QFP, QFC, and CHANPL.


**45**

**DHM** **Line #**

1727 **Table 1.** *Detailed listing of the differences between the DHM and EDHM source codes.*

**Content** COMMON/BLK 1/FP(250,8),FC(250,6)

**Line #**

1727

**EDHM** **Content** COMMON/BLK 1/FP(9999,8),FC(9999,6)

*Examination of Hydrologic Computer Programs DHM and EDHM*

*DOI: http://dx.doi.org/10.5772/intechopen.94283*

#### *Hydrology*


*Hydrology*

**EDHM**

**Content**

COMMON/BLK 1/FP(9999,8),FC(9999,6)

COMMON/BLK 2/KIN(99),H(99,15,2), KOUT(99),HOUT(99,15,3)

COMMON/BLK 3/NOSTA(99),STA(99,15,2),NODFX(99)

COMMON/BLK 4/DMAX(9999,2),TIMEX(9999,2)

COMMON/BLK 5/KINP(99),HP(99,15,2)

DIMENSION NODDC(99),VEL(9999,4),R(99,2),Q(4)

FORMAT(10X,5I5,1X,F6.4,2X,F6.1,1X,F5.1)

FORMAT(/,10X,'INFLOW HYDROGRAPH AT NODE #',I4,/,

FORMAT(10X,I4,1X,I4)

FORMAT(10X,I4

,2X,F5.4,1X,F7.1,1X,F7.1,1X,F7.1,5X,F7.1)

FORMAT(10X,'OUTFLOW NODE # ',I4,

FORMAT(/,10X,'STAGE CURVE AT NODE #',I4,/,

FORMAT(10X,'INFLOW RATE AT NODE ',I4,' IS EQUAL TO ',F10.2)

FORMAT(/,5X,'NODE',7X,10(I4,7X))

FORMAT(10X,'OUTFLOW RATE AT NODE ',I4,' IS EQUAL TO ',F10.2)

COMMON/BLK 1/FP(9999,8),FC(9999,6)

COMMON/BLK 2/KIN(99),H(99,15,2), KOUT(99),HOUT(99,15,3)

COMMON/BLK 3/NOSTA(99),STA(99,15,2),NODFX(99)

COMMON/BLK 4/DMAX(9999,2),TIMEX(9999,2)

COMMON/BLK 1/FP(9999,8),FC(9999,6)

COMMON/BLK 1/FP(9999,8),FC(9999,6)

**44**

**DHM** **Line #**

12 14 16 18 20 26 271 281 291 297 303 311 333 335 357 1275 1277 1279 1281 1567 1647

**Content** COMMON/BLK 1/FP(250,8),FC(250,6)

COMMON/BLK 2/KIN(10),H(10,15,2), KOUT(10),HOUT(10,15,3)

COMMON/BLK 3/NOSTA(10),STA(10,15,2),NODFX(50)

COMMON/BLK 4/DMAX(250,2),TIMEX(250,2)

COMMON/BLK 5/KINP(10),HP(10,15,2)

DIMENSION NODDC(50),VEL(250,4),R(10,2),Q(4)

FORMAT(10X,5I4,1X,F6.4,2X,F6.1,1X,F5.1)

FORMAT(/,10X,'INFLOW HYDROGRAPH AT NODE #',I3,/,

FORMAT(10X,I3,1X,I3)

FORMAT(10X,I3

,2X,F5.4,1X,F7.1,1X,F7.1,1X,F7.1,5X,F7.1)

FORMAT(10X,'OUTFLOW NODE # ',I3,

FORMAT(/,10X,'STAGE CURVE AT NODE #',I3,/,

FORMAT(10X,'INFLOW RATE AT NODE ',I3,' IS EQUAL TO ',F10.2)

FORMAT(/,5X,'NODE',7X,10(I3,8X))

FORMAT(10X,'OUTFLOW RATE AT NODE ',I3,' IS EQUAL TO ',F10.2)

COMMON/BLK 1/FP(250,8),FC(250,6)

COMMON/BLK 2/KIN(10),H(10,15,2), KOUT(10),HOUT(10,15,3)

COMMON/BLK 3/NOSTA(10),STA(10,15,2),NODFX(50)

COMMON/BLK 4/DMAX(250,2),TIMEX(250,2)

COMMON/BLK 1/FP(250,8),FC(250,6)

COMMON/BLK 1/FP(250,8),FC(250,6)

1277 1279 1281 1567 1647

357 1275

333 335

303 311

14 16 18 20 26 271 281 291 297

**Line #**

12

> **Table 1.** *Detailed listing of the differences between the DHM and EDHM source codes.*

#### *Examination of Hydrologic Computer Programs DHM and EDHM DOI: http://dx.doi.org/10.5772/intechopen.94283*

#### **4.2 Minor enhancements**

The two minor enhancements that were made in DHM code are (a) to accommodate the increased number of cells in EDHM, the fixed format output descriptor has been expanded by one digit and (b) to better align the variables in the output file, the inter variable spacing was decreased by one digit. A detailed listing of all the major and minor changes made in the DHM source code, along with the corresponding line numbers, is shown in **Table 1**.

### **4.3 Compiler details**

After reviewing the currently available compilers in Windows for Fortran 77 codes, we have chosen the Intel Fortran Compiler within the Microsoft Visual Studio integrated development environment (IDE) to make the enhancements in DHM and for generating the.EXE file. This interface is ideal to debug and execute Fortran 77 programs. The compiler can optimize the performance of source codes for Intel CPUs. It offers broad support for current and previous Fortran standards and also tools by which a robust, high-performance code can be created in serial and parallel environments. The Math Kernel Library (Intel MKL) and the Debugger tools in the compiler, creates a solid foundation for building robust, high-performance codes. The end executable file (.EXE) although optimized for Intel CPUs, can also run on x86 compatible CPUs such as those from AMD.
