Skip to content

Commit

Permalink
fix(csub): Add additional inelastic- and elastic-compaction-cell obs. (
Browse files Browse the repository at this point in the history
…#356)

Closes #302
  • Loading branch information
jdhughes-usgs authored Mar 21, 2020
1 parent 09e411d commit b6fda1f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/Common/gwf-csubobs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
CSUB & inelastic-compaction & icsubno or boundname & -- & inelastic interbed compaction in a interbed or group of interbeds. \\
CSUB & elastic-compaction & icsubno or boundname & -- & elastic interbed compaction a interbed or group of interbeds. \\
CSUB & coarse-compaction & cellid & -- & elastic compaction in coarse-grained materials in a GWF cell. \\
CSUB & inelastic-compaction-cell & cellid & -- & inelastic compaction in all interbeds in a GWF cell. \\
CSUB & elastic-compaction-cell & cellid & -- & elastic compaction in coarse-grained materials and all interbeds in a GWF cell. \\
CSUB & compaction-cell & cellid & -- & total compaction in coarse-grained materials and all interbeds in a GWF cell. \\

CSUB & thickness & icsubno or boundname & -- & thickness of a interbed or group of interbeds. \\
Expand Down
26 changes: 26 additions & 0 deletions src/Model/GroundWaterFlow/gwf3csub8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6392,6 +6392,16 @@ subroutine csub_df_obs(this)
this%obs%obsData(indx)%ProcessIdPtr => csub_process_obsID
!
! -- Store obs type and assign procedure pointer
! for inelastic-compaction-cell observation type.
call this%obs%StoreObsType('inelastic-compaction-cell', .true., indx)
this%obs%obsData(indx)%ProcessIdPtr => csub_process_obsID
!
! -- Store obs type and assign procedure pointer
! for elastic-compaction-cell observation type.
call this%obs%StoreObsType('elastic-compaction-cell', .true., indx)
this%obs%obsData(indx)%ProcessIdPtr => csub_process_obsID
!
! -- Store obs type and assign procedure pointer
! for compaction-cell observation type.
call this%obs%StoreObsType('compaction-cell', .true., indx)
this%obs%obsData(indx)%ProcessIdPtr => csub_process_obsID
Expand Down Expand Up @@ -6582,6 +6592,20 @@ subroutine csub_bd_obs(this)
v = this%tcompe(n)
case ('COARSE-COMPACTION')
v = this%cg_tcomp(n)
case ('INELASTIC-COMPACTION-CELL')
!
! -- no coarse inelastic component
if (j > 1) then
v = this%tcompi(n)
end if
case ('ELASTIC-COMPACTION-CELL')
!
! -- add the coarse component
if (j == 1) then
v = this%cg_tcomp(n)
else
v = this%tcompe(n)
end if
case ('COMPACTION-CELL')
!
! -- add the coarse component
Expand Down Expand Up @@ -6803,6 +6827,8 @@ subroutine csub_rp_obs(this)
obsrv%ObsTypeId == 'SKE-CELL' .or. &
obsrv%ObsTypeId == 'SK-CELL' .or. &
obsrv%ObsTypeId == 'THETA-CELL' .or. &
obsrv%ObsTypeId == 'INELASTIC-COMPACTION-CELL' .or. &
obsrv%ObsTypeId == 'ELASTIC-COMPACTION-CELL' .or. &
obsrv%ObsTypeId == 'COMPACTION-CELL') then
if (.NOT. obsrv%BndFound) then
obsrv%BndFound = .true.
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Constants.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module ConstantsModule
integer(I4B), parameter :: LENORIGIN = LENMODELNAME + LENPACKAGENAME + 1
integer(I4B), parameter :: LENFTYPE = 5
integer(I4B), parameter :: LENOBSNAME = 40
integer(I4B), parameter :: LENOBSTYPE = 20
integer(I4B), parameter :: LENOBSTYPE = 30
integer(I4B), parameter :: LENTIMESERIESNAME = LENOBSNAME
integer(I4B), parameter :: LENTIMESERIESTEXT = 12
integer(I4B), parameter :: LENDATETIME = 30
Expand Down
5 changes: 3 additions & 2 deletions src/Utilities/Observation/Obs3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,9 @@ subroutine read_obs_blocks(this, fname)
type(ObsOutputType), pointer :: obsOutput => null()
! formats
50 format(/,'Observations read from file "',a,'":',/, &
'Name',38x,'Type',29x,'Time',9x,'Location data',/, &
'---------------------------------------- -------------------------------', &
'Name',38x,'Type',40x,'Time',9x,'Location data',/, &
'---------------------------------------- ', &
'------------------------------------------', &
' ----------- --------------------------' )
!
numspec = -1
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Observation/Observe.f90
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ subroutine WriteTo(this, iout)
class(ObserveType), intent(inout) :: this
integer(I4B), intent(in) :: iout
! formats
20 format(a,2x,a,a,t76,'All times',t89,'"',a,'"')
20 format(a,2x,a,a,t87,'All times',t100,'"',a,'"')
!
write(iout,20)this%Name, 'Continuous ', this%ObsTypeId, &
trim(this%IDstring)
Expand Down

0 comments on commit b6fda1f

Please sign in to comment.