MODFLOW 6  version 6.7.0.dev1
USGS Modular Hydrologic Model
chfmodule Module Reference

Channel Flow (CHF) Module.

Data Types

type  chfmodeltype
 

Functions/Subroutines

subroutine, public chf_cr (filename, id, modelname)
 Create a new surface water flow model object. More...
 
subroutine set_namfile_options (this)
 Handle namefile options. More...
 
subroutine log_namfile_options (this, found)
 Write model namfile options to list file. More...
 

Variables

integer(i4b), parameter, public chf_nbasepkg = 7
 CHF base package array descriptors. More...
 
character(len=lenpackagetype), dimension(chf_nbasepkg), public chf_basepkg = ['DISV1D6', 'DFW6 ', 'CXS6 ', 'OC6 ', 'IC6 ', 'OBS6 ', 'STO6 ']
 candidates for input and these will be loaded in the order specified. More...
 
integer(i4b), parameter, public chf_nmultipkg = 50
 CHF multi package array descriptors. More...
 
character(len=lenpackagetype), dimension(chf_nmultipkg), public chf_multipkg
 
integer(i4b), parameter niunit_chf = CHF_NBASEPKG + CHF_NMULTIPKG
 

Function/Subroutine Documentation

◆ chf_cr()

subroutine, public chfmodule::chf_cr ( character(len=*), intent(in)  filename,
integer(i4b), intent(in)  id,
character(len=*), intent(in)  modelname 
)
Parameters
[in]filenameinput file
[in]idconsecutive model number listed in mfsim.nam
[in]modelnamename of the model

Definition at line 55 of file chf.f90.

56  ! modules
57  ! dummy
58  character(len=*), intent(in) :: filename !< input file
59  integer(I4B), intent(in) :: id !< consecutive model number listed in mfsim.nam
60  character(len=*), intent(in) :: modelname !< name of the model
61  ! local
62  class(ChfModelType), pointer :: this
63  class(BaseModelType), pointer :: model
64 
65  ! Allocate a new model
66  allocate (this)
67  model => this
68  call addbasemodeltolist(basemodellist, model)
69 
70  ! call parent initialize routine
71  call this%initialize('CHF', filename, id, modelname)
72 
73  ! set and log namefile options
74  call this%set_namfile_options()
75 
76  ! Create utility objects
77  call budget_cr(this%budget, this%name)
78 
79  ! create model packages
80  call this%create_packages()
81 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_namfile_options()

subroutine chfmodule::log_namfile_options ( class(chfmodeltype this,
type(chfnamparamfoundtype), intent(in)  found 
)

Definition at line 131 of file chf.f90.

133  class(ChfModelType) :: this
134  type(ChfNamParamFoundType), intent(in) :: found
135 
136  write (this%iout, '(1x,a)') 'BEGIN NAMEFILE OPTIONS'
137 
138  if (found%print_input) then
139  write (this%iout, '(4x,a)') 'STRESS PACKAGE INPUT WILL BE PRINTED '// &
140  'FOR ALL MODEL STRESS PACKAGES'
141  end if
142 
143  if (found%print_flows) then
144  write (this%iout, '(4x,a)') 'PACKAGE FLOWS WILL BE PRINTED '// &
145  'FOR ALL MODEL PACKAGES'
146  end if
147 
148  if (found%save_flows) then
149  write (this%iout, '(4x,a)') &
150  'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL'
151  end if
152 
153  write (this%iout, '(1x,a)') 'END NAMEFILE OPTIONS'
154 

◆ set_namfile_options()

subroutine chfmodule::set_namfile_options ( class(chfmodeltype this)
private

Set pointers to IDM namefile options, then create the list file and log options.

Definition at line 89 of file chf.f90.

94  class(ChfModelType) :: this
95  type(ChfNamParamFoundType) :: found
96  character(len=LENMEMPATH) :: input_mempath
97  character(len=LINELENGTH) :: lst_fname
98 
99  ! set input model namfile memory path
100  input_mempath = create_mem_path(this%name, 'NAM', idm_context)
101 
102  ! copy option params from input context
103  call mem_set_value(lst_fname, 'LIST', input_mempath, found%list)
104  call mem_set_value(this%inewton, 'NEWTON', input_mempath, found%newton)
105  call mem_set_value(this%inewtonur, 'UNDER_RELAXATION', input_mempath, &
106  found%under_relaxation)
107  call mem_set_value(this%iprpak, 'PRINT_INPUT', input_mempath, &
108  found%print_input)
109  call mem_set_value(this%iprflow, 'PRINT_FLOWS', input_mempath, &
110  found%print_flows)
111  call mem_set_value(this%ipakcb, 'SAVE_FLOWS', input_mempath, found%save_flows)
112 
113  ! create the list file
114  call this%create_lstfile(lst_fname, this%filename, found%list, &
115  'CHANNEL FLOW MODEL (CHF)')
116 
117  ! activate save_flows if found
118  if (found%save_flows) then
119  this%ipakcb = -1
120  end if
121 
122  ! log set options
123  if (this%iout > 0) then
124  call this%log_namfile_options(found)
125  end if
126 
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=linelength) idm_context
Here is the call graph for this function:

Variable Documentation

◆ chf_basepkg

character(len=lenpackagetype), dimension(chf_nbasepkg), public chfmodule::chf_basepkg = ['DISV1D6', 'DFW6 ', 'CXS6 ', 'OC6 ', 'IC6 ', 'OBS6 ', 'STO6 ']

Definition at line 33 of file chf.f90.

33  character(len=LENPACKAGETYPE), dimension(CHF_NBASEPKG) :: &
34  CHF_BASEPKG = ['DISV1D6', 'DFW6 ', 'CXS6 ', &
35  'OC6 ', 'IC6 ', 'OBS6 ', &
36  'STO6 ']

◆ chf_multipkg

character(len=lenpackagetype), dimension(chf_nmultipkg), public chfmodule::chf_multipkg

Definition at line 43 of file chf.f90.

43  character(len=LENPACKAGETYPE), dimension(CHF_NMULTIPKG) :: CHF_MULTIPKG

◆ chf_nbasepkg

integer(i4b), parameter, public chfmodule::chf_nbasepkg = 7

CHF model base package types. Only listed packages are candidates

Definition at line 32 of file chf.f90.

32  integer(I4B), parameter :: CHF_NBASEPKG = 7

◆ chf_nmultipkg

integer(i4b), parameter, public chfmodule::chf_nmultipkg = 50

CHF model multi-instance package types. Only listed packages are

Definition at line 42 of file chf.f90.

42  integer(I4B), parameter :: CHF_NMULTIPKG = 50

◆ niunit_chf

integer(i4b), parameter chfmodule::niunit_chf = CHF_NBASEPKG + CHF_NMULTIPKG
private

Definition at line 49 of file chf.f90.

49  integer(I4B), parameter :: NIUNIT_CHF = chf_nbasepkg + chf_nmultipkg