Skip to content

Commit 853d6d1

Browse files
committed
progress plus work on shf in mf6io
1 parent 753436c commit 853d6d1

File tree

9 files changed

+140
-152
lines changed

9 files changed

+140
-152
lines changed

doc/Common/gwe-sfeobs.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
SFE & runoff & rno or boundname & -- & Runoff rate applied to a reach or group of reaches multiplied by the runoff temperature. \\
1515
SFE & ext-inflow & rno or boundname & -- & Energy inflow into a reach or group of reaches calculated as the external inflow rate multiplied by the inflow temperature. \\
1616
SFE & ext-outflow & rno or boundname & -- & External outflow from a reach or group of reaches to an external boundary. If boundname is not specified for ID, then the external outflow from a specific reach is observed. In this case, ID is the reach rno. \\
17-
SFE & strmbd-cond & rno or boundname & -- & Amount of heat conductively exchanged with the streambed material.
17+
SFE & strmbd-cond & rno or boundname & -- & Amount of heat conductively exchanged with the streambed material. \\
18+
SFE & shf & rno or boundname & -- & Amount of sensible heat exchanged with the atmosphere.

doc/mf6io/gwe/gwe.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ \subsection{Multi-Aquifer Well Energy Transport (MWE) Package}
139139
\subsection{Unsaturated-Zone Energy Transport (UZE) Package}
140140
\input{gwe/uze}
141141

142+
\newpage
143+
\subsection{Sensible Heat Flux (SHF) Package}
144+
\input{gwe/shf}
145+
142146
\newpage
143147
\subsection{Flow Model Interface (FMI) Package}
144148
\input{gwe/fmi}

doc/mf6io/mf6ivar/dfn/utl-shf.dfn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ in_record true
115115
reader urword
116116
longname reach number for this entry
117117
description integer value that defines the reach number associated with the specified PERIOD data on the line. RNO must be greater than zero and less than or equal to NREACHES.
118+
numeric_index true
118119

119120
block period
120121
name shfsetting

doc/mf6io/mf6ivar/examples/gwe-sfe-example-obs.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ BEGIN continuous FILEOUT gwe_sfe02.sfe.obs.csv
2222
sfe-5-fjf FLOW-JA-FACE MYREACH1
2323
sfe-6-fjf FLOW-JA-FACE MYREACH2
2424
sfe-7-fjf FLOW-JA-FACE MYREACH3
25+
sfe-1-shf SHF 1
2526
END continuous

msvs/mf6core.vfproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,15 @@
262262
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe-lke.f90"/>
263263
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe-mwe.f90"/>
264264
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe-sfe.f90"/>
265+
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe-shf.f90"/>
265266
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe-uze.f90"/>
266-
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe.f90"/></Filter>
267+
<File RelativePath="..\src\Model\GroundWaterEnergy\gwe.f90"/>
268+
<File RelativePath="..\src\Model\GroundWaterEnergy\PbstBase.f90"/></Filter>
267269
<Filter Name="GroundWaterFlow">
268270
<Filter Name="submodules">
269271
<File RelativePath="..\src\Model\GroundWaterFlow\submodules\gwf-sfr-constant.f90"/>
270272
<File RelativePath="..\src\Model\GroundWaterFlow\submodules\gwf-sfr-steady.f90"/>
271-
<File RelativePath="..\src\Model\GroundWaterFlow\submodules\gwf-sfr-transient.f90"/></Filter>
273+
<File RelativePath="..\src\Model\GroundWaterFlow\submodules\gwf-sfr-transient.f90"/></Filter>
272274
<File RelativePath="..\src\Model\GroundWaterFlow\gwf-api.f90"/>
273275
<File RelativePath="..\src\Model\GroundWaterFlow\gwf-buy.f90"/>
274276
<File RelativePath="..\src\Model\GroundWaterFlow\gwf-chd.f90"/>

src/Model/GroundWaterEnergy/PbstBase.f90

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
!> @brief This module contains common process-based stream temperature functionality
22
!!
33
!! This module contains methods for implementing functionality associated with
4-
!! heat fluxes to a stream reach. Four sources of thermal energy commonly
4+
!! heat fluxes to a stream reach. Four sources of thermal energy commonly
55
!! accounted for in process-based stream temperature modeling include short-
6-
!! wave radiation, long-wave radiation, sensible heat flux, and latent heat
7-
!! flux.
6+
!! wave radiation, long-wave radiation, sensible heat flux, and latent heat
7+
!! flux.
88
!<
99
module PbstBaseModule
1010
use ConstantsModule, only: LINELENGTH, MAXCHARLEN, DZERO, LGP, &
@@ -22,14 +22,14 @@ module PbstBaseModule
2222
implicit none
2323

2424
private
25-
25+
2626
public :: PbstBaseType
2727
public :: pbstbase_da
28-
28+
2929
character(len=LENVARNAME) :: text = ' PBST'
30-
30+
3131
type, abstract, extends(NumericalPackageType) :: PbstBaseType
32-
32+
3333
character(len=8), dimension(:), pointer, contiguous :: status => null() !< active, inactive, constant
3434
character(len=LENPACKAGENAME) :: text = '' !< text string for package transport term
3535
integer(I4B), pointer :: ncv => null() !< number of control volumes
@@ -40,7 +40,7 @@ module PbstBaseModule
4040
!
4141
! -- table objects
4242
type(TableType), pointer :: inputtab => null() !< input table object
43-
43+
4444
contains
4545

4646
procedure :: init
@@ -55,11 +55,11 @@ module PbstBaseModule
5555
procedure :: pbst_allocate_arrays
5656
procedure :: da => pbstbase_da
5757
procedure :: pbst_check_valid
58-
58+
5959
end type PbstBaseType
60-
60+
6161
abstract interface
62-
62+
6363
!> @brief Announce package and set pointers to variables
6464
!!
6565
!! Deferred procedure called by the PbstBaseType code to process a single
@@ -74,9 +74,9 @@ function read_option(this, keyword) result(success)
7474
! -- return
7575
logical :: success
7676
end function
77-
77+
7878
end interface
79-
79+
8080
contains
8181

8282
!> @brief Initialize the PbstBaseType object
@@ -100,7 +100,7 @@ subroutine init(this, name_model, pakname, ftype, inunit, iout, ncv)
100100
this%ncv => ncv
101101
call this%parser%Initialize(this%inunit, this%iout)
102102
end subroutine init
103-
103+
104104
!> @brief Allocate and read
105105
!!
106106
!! Method to allocate and read static data for the SHF package
@@ -127,14 +127,14 @@ subroutine ar(this)
127127
! -- Read options
128128
call this%read_options()
129129
end subroutine ar
130-
130+
131131
!> @brief PaBST read and prepare for setting stress period information
132132
!<
133133
subroutine rp(this)
134134
! -- module
135135
use TimeSeriesManagerModule, only: read_value_or_time_series_adv
136136
use TdisModule, only: kper, nper
137-
! -- dummy
137+
! -- dummy
138138
class(PbstBaseType) :: this !< ShfType object
139139
! -- local
140140
integer(I4B) :: ierr
@@ -165,7 +165,7 @@ subroutine rp(this)
165165
! -- read ionper and check for increasing period numbers
166166
call this%read_check_ionper()
167167
else
168-
!
168+
!
169169
! -- PERIOD block not found
170170
if (ierr < 0) then
171171
! -- End of file found; data applies for remainder of simulation.
@@ -207,7 +207,7 @@ subroutine rp(this)
207207
call this%parser%GetNextLine(endOfBlock)
208208
if (endOfBlock) exit
209209
!
210-
! -- get feature number
210+
! -- get feature number
211211
itemno = this%parser%GetInteger()
212212
!
213213
! -- read data from the rest of the line
@@ -233,13 +233,13 @@ subroutine rp(this)
233233
ierr = count_errors()
234234
if (ierr > 0) then
235235
call this%parser%StoreErrorUnit()
236-
end if
236+
end if
237237
end subroutine rp
238238

239239
!> @brief pbst_set_stressperiod()
240240
!!
241241
!! To be overridden by Pbst sub-packages
242-
!<
242+
!<
243243
subroutine pbst_set_stressperiod(this, itemno)
244244
! -- dummy
245245
class(PbstBaseType), intent(inout) :: this
@@ -270,10 +270,10 @@ subroutine pbst_set_stressperiod(this, itemno)
270270
write (errmsg, '(a,a)') &
271271
'Unknown '//trim(this%text)//' status keyword: ', text//'.'
272272
call store_error(errmsg)
273-
end if
273+
end if
274274
case default
275275
!
276-
! -- call the specific package to deal with parameters specific to the
276+
! -- call the specific package to deal with parameters specific to the
277277
! process
278278
call this%subpck_set_stressperiod(itemno, keyword, found)
279279
! -- terminate with error if data not valid
@@ -303,7 +303,7 @@ subroutine subpck_set_stressperiod(this, itemno, keyword, found)
303303
logical, intent(inout) :: found
304304
! -- to be overwritten by pbst subpackages (or "utilities")
305305
end subroutine subpck_set_stressperiod
306-
306+
307307
!> @brief Read the SHF-specific options from the OPTIONS block
308308
!<
309309
subroutine read_options(this)
@@ -374,7 +374,7 @@ end subroutine read_options
374374
!> @ brief Read additional options for sub-package
375375
!!
376376
!! Read additional options for the SFE boundary package. This method should
377-
!! be overridden by option-processing routine that is in addition to the
377+
!! be overridden by option-processing routine that is in addition to the
378378
!! base options available for all PbstBase packages.
379379
!<
380380
subroutine pbst_options(this, option, found)
@@ -416,7 +416,7 @@ subroutine pbstbase_allocate_scalars(this)
416416
! -- allocate time series manager
417417
allocate (this%tsmanager)
418418
end subroutine pbstbase_allocate_scalars
419-
419+
420420
!> @ brief Allocate arrays
421421
!!
422422
!! Allocate base process-based stream temperature package transport arrays
@@ -430,9 +430,9 @@ subroutine pbst_allocate_arrays(this)
430430
integer(I4B) :: n
431431
!
432432
! -- Note: For the time-being, no call to parent class allocation of arrays
433-
! as is done in tsp-apt.f90, for example. Remember that this class
434-
! extends NumericalPackage.f90 which doesn't have a standard set of
435-
! arrays to be allocated, only scalars.
433+
! as is done in tsp-apt.f90, for example. Remember that this class
434+
! extends NumericalPackage.f90 which doesn't have a standard set of
435+
! arrays to be allocated, only scalars.
436436
!call this%BndType%allocate_arrays()
437437
!
438438
! -- allocate character array for status
@@ -444,7 +444,6 @@ subroutine pbst_allocate_arrays(this)
444444
end do
445445
end subroutine pbst_allocate_arrays
446446

447-
448447
!> @brief Deallocate package memory
449448
!!
450449
!! Deallocate package scalars and arrays.
@@ -460,7 +459,7 @@ subroutine pbstbase_da(this)
460459
!
461460
! -- Deallocate time series manager
462461
deallocate (this%tsmanager)
463-
!
462+
!
464463
! -- deallocate scalars
465464
call mem_deallocate(this%ncv)
466465
!
@@ -478,7 +477,7 @@ subroutine pbstbase_da(this)
478477
end if
479478

480479
end subroutine pbstbase_da
481-
480+
482481
!> @brief Process-based stream temperature transport (or utility) routine
483482
!!
484483
!! Determine if a valid feature number has been specified.
@@ -499,4 +498,4 @@ function pbst_check_valid(this, itemno) result(ierr)
499498
end if
500499
end function pbst_check_valid
501500

502-
end module PbstBaseModule
501+
end module PbstBaseModule

0 commit comments

Comments
 (0)