diff --git a/doc/ReleaseNotes/develop.tex b/doc/ReleaseNotes/develop.tex index c8af7f32e8f..6903068916d 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-cnd.f90 b/src/Model/GroundWaterEnergy/gwe-cnd.f90 index 4840c75af3c..704a450276c 100644 --- a/src/Model/GroundWaterEnergy/gwe-cnd.f90 +++ b/src/Model/GroundWaterEnergy/gwe-cnd.f90 @@ -653,7 +653,7 @@ subroutine source_griddata(this) if (this%idisp > 0) then if (.not. (found%alh .and. found%ath1)) then write (errmsg, '(1x,a)') & - 'if dispersivities are specified then ALH and ATH1 are required.' + 'If dispersivities are specified then ALH and ATH1 are required.' call store_error(errmsg) end if ! -- If alv not specified then point it to alh diff --git a/src/Model/GroundWaterEnergy/gwe-est.f90 b/src/Model/GroundWaterEnergy/gwe-est.f90 index 3d17c299034..39fbf9dbdd7 100644 --- a/src/Model/GroundWaterEnergy/gwe-est.f90 +++ b/src/Model/GroundWaterEnergy/gwe-est.f90 @@ -680,21 +680,35 @@ 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.' + 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.' + 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)') & 'Latent heat of vaporization of the water has been set to: ', & this%latheatvap case default - write (errmsg, '(a,a)') 'UNKNOWN EST OPTION: ', trim(keyword) + write (errmsg, '(a,a)') 'Unknown EST option: ', trim(keyword) call store_error(errmsg) call this%parser%StoreErrorUnit() end select @@ -769,45 +783,45 @@ subroutine read_data(this) aname(4)) lname(4) = .true. case default - write (errmsg, '(a,a)') 'UNKNOWN GRIDDATA TAG: ', trim(keyword) + write (errmsg, '(a,a)') 'Unknown griddata tag: ', trim(keyword) call store_error(errmsg) call this%parser%StoreErrorUnit() end select end do write (this%iout, '(1x,a)') 'END PROCESSING GRIDDATA' else - write (errmsg, '(a)') 'REQUIRED GRIDDATA BLOCK NOT FOUND.' + write (errmsg, '(a)') 'Required griddata block not found.' call store_error(errmsg) call this%parser%StoreErrorUnit() end if ! ! -- Check for required porosity if (.not. lname(1)) then - write (errmsg, '(a)') 'POROSITY NOT SPECIFIED IN GRIDDATA BLOCK.' + write (errmsg, '(a)') 'Porosity not specified in griddata block.' call store_error(errmsg) end if if (.not. lname(3)) then - write (errmsg, '(a)') 'CPS NOT SPECIFIED IN GRIDDATA BLOCK.' + write (errmsg, '(a)') 'CPS not specified in griddata block.' call store_error(errmsg) end if if (.not. lname(4)) then - write (errmsg, '(a)') 'RHOS NOT SPECIFIED IN GRIDDATA BLOCK.' + write (errmsg, '(a)') 'RHOS not specified in griddata block.' call store_error(errmsg) end if ! ! -- Check for required decay/production rate coefficients if (this%idcy > 0) then if (.not. lname(2)) then - write (errmsg, '(a)') 'FIRST OR ZERO ORDER DECAY IS & - &ACTIVE BUT THE FIRST RATE COEFFICIENT IS NOT SPECIFIED. DECAY & - &MUST BE SPECIFIED IN GRIDDATA BLOCK.' + write (errmsg, '(a)') 'First or zero order decay is & + &active but the first rate coefficient is not specified. Decay & + &must be specified in griddata block.' call store_error(errmsg) end if else if (lname(2)) then - write (warnmsg, '(a)') 'FIRST OR ZERO ORER DECAY & - &IS NOT ACTIVE BUT DECAY WAS SPECIFIED. DECAY WILL & - &HAVE NO AFFECT ON SIMULATION RESULTS.' + write (warnmsg, '(a)') 'First or zero orer decay & + &is not active but decay was specified. Decay will & + &have no affect on simulation results.' call store_warning(warnmsg) write (this%iout, '(1x,a)') 'WARNING. '//warnmsg end if diff --git a/src/Model/GroundWaterEnergy/gwe-lke.f90 b/src/Model/GroundWaterEnergy/gwe-lke.f90 index d7b1ff41fd7..c2e23a07516 100644 --- a/src/Model/GroundWaterEnergy/gwe-lke.f90 +++ b/src/Model/GroundWaterEnergy/gwe-lke.f90 @@ -209,7 +209,7 @@ subroutine find_lke_package(this) ! ! -- Error if flow package not found if (.not. found) then - write (errmsg, '(a)') 'COULD NOT FIND FLOW PACKAGE WITH NAME '& + write (errmsg, '(a)') 'Could not find flow package with name '& &//trim(adjustl(this%flowpackagename))//'.' call store_error(errmsg) call this%parser%StoreErrorUnit() diff --git a/src/Model/GroundWaterEnergy/gwe-mwe.f90 b/src/Model/GroundWaterEnergy/gwe-mwe.f90 index 1dfac96562e..c8e2315fb1d 100644 --- a/src/Model/GroundWaterEnergy/gwe-mwe.f90 +++ b/src/Model/GroundWaterEnergy/gwe-mwe.f90 @@ -202,7 +202,7 @@ subroutine find_mwe_package(this) ! ! -- Error if flow package not found if (.not. found) then - write (errmsg, '(a)') 'COULD NOT FIND FLOW PACKAGE WITH NAME '& + write (errmsg, '(a)') 'Could not find flow package with name '& &//trim(adjustl(this%flowpackagename))//'.' call store_error(errmsg) call this%parser%StoreErrorUnit() diff --git a/src/Model/GroundWaterEnergy/gwe-sfe.f90 b/src/Model/GroundWaterEnergy/gwe-sfe.f90 index 844ca92d053..3966675cfda 100644 --- a/src/Model/GroundWaterEnergy/gwe-sfe.f90 +++ b/src/Model/GroundWaterEnergy/gwe-sfe.f90 @@ -208,7 +208,7 @@ subroutine find_sfe_package(this) ! ! -- Error if flow package not found if (.not. found) then - write (errmsg, '(a)') 'COULD NOT FIND FLOW PACKAGE WITH NAME '& + write (errmsg, '(a)') 'Could not find flow package with name '& &//trim(adjustl(this%flowpackagename))//'.' call store_error(errmsg) call this%parser%StoreErrorUnit() diff --git a/src/Model/GroundWaterEnergy/gwe-uze.f90 b/src/Model/GroundWaterEnergy/gwe-uze.f90 index ee429ac8313..f43a48e01f3 100644 --- a/src/Model/GroundWaterEnergy/gwe-uze.f90 +++ b/src/Model/GroundWaterEnergy/gwe-uze.f90 @@ -200,7 +200,7 @@ subroutine find_uze_package(this) ! ! -- Error if flow package not found if (.not. found) then - write (errmsg, '(a)') 'COULD NOT FIND FLOW PACKAGE WITH NAME '& + write (errmsg, '(a)') 'Could not find flow package with name '& &//trim(adjustl(this%flowpackagename))//'.' call store_error(errmsg) call this%parser%StoreErrorUnit()