diff --git a/doc/ReleaseNotes/develop.tex b/doc/ReleaseNotes/develop.tex index 141f0f283cb..4e5faf20e1a 100644 --- a/doc/ReleaseNotes/develop.tex +++ b/doc/ReleaseNotes/develop.tex @@ -35,6 +35,7 @@ \item When using SFT in a model where some of the stream reaches are not connected to an active GWF cell (the cellid parameter is set equal to either 0 or NONE) memory access violations were occurring. The program was fixed by setting the correct number of reaches connected to GWF cells. The program was tested using a new example with a DISU grid type and multiple GWF cells deactivated (idomain equals 0) that host SFR reaches. \item Support for temperature observations was missing in the Observation (OBS) utility for a GWE model and has been added. \item UZF was not writing a message to the GWF listing file when it had finished reading the PACKAGEDATA block. An appropriate message is now written to the GWF listing file. + \item Error checking was added to the EST package to ensure that the inputs HEAT\_CAPACITY\_WATER and DENSITY\_WATER are not 0.0. Values of 0.0 for either parameter result in a divide by zero error. % \item xxx \end{itemize} diff --git a/src/Model/GroundWaterEnergy/gwe-est.f90 b/src/Model/GroundWaterEnergy/gwe-est.f90 index 3d17c299034..baba67e537d 100644 --- a/src/Model/GroundWaterEnergy/gwe-est.f90 +++ b/src/Model/GroundWaterEnergy/gwe-est.f90 @@ -680,14 +680,30 @@ subroutine read_options(this) write (this%iout, fmtidcy2) case ('HEAT_CAPACITY_WATER') this%cpw = this%parser%GetDouble() - write (this%iout, '(4x,a,1pg15.6)') & - 'Heat capacity of the water has been set to: ', & - this%cpw + if (this%cpw <= 0.0) then + write (errmsg, '(a)') 'SPECIFIED VALUE FOR THE HEAT CAPACITY OF & + &WATER MUST BE GREATER THAN 0.0 OR A DIVIDE BY ZERO ERROR & + &WILL OCCUR.' + call store_error(errmsg) + call this%parser%StoreErrorUnit() + else + write (this%iout, '(4x,a,1pg15.6)') & + 'Heat capacity of the water has been set to: ', & + this%cpw + end if case ('DENSITY_WATER') this%rhow = this%parser%GetDouble() - write (this%iout, '(4x,a,1pg15.6)') & - 'Density of the water has been set to: ', & - this%rhow + if (this%rhow <= 0.0) then + write (errmsg, '(a)') 'SPECIFIED VALUE FOR THE DENSITY OF & + &WATER MUST BE GREATER THAN 0.0 OR A DIVIDE BY ZERO ERROR & + &WILL OCCUR.' + call store_error(errmsg) + call this%parser%StoreErrorUnit() + else + write (this%iout, '(4x,a,1pg15.6)') & + 'Density of the water has been set to: ', & + this%rhow + end if case ('LATENT_HEAT_VAPORIZATION') this%latheatvap = this%parser%GetDouble() write (this%iout, '(4x,a,1pg15.6)') &