MODFLOW 6  version 6.7.0.dev0
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 54 of file chf.f90.

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

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

◆ 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 88 of file chf.f90.

93  class(ChfModelType) :: this
94  type(ChfNamParamFoundType) :: found
95  character(len=LENMEMPATH) :: input_mempath
96  character(len=LINELENGTH) :: lst_fname
97 
98  ! set input model namfile memory path
99  input_mempath = create_mem_path(this%name, 'NAM', idm_context)
100 
101  ! copy option params from input context
102  call mem_set_value(lst_fname, 'LIST', input_mempath, found%list)
103  call mem_set_value(this%inewton, 'NEWTON', input_mempath, found%newton)
104  call mem_set_value(this%inewtonur, 'UNDER_RELAXATION', input_mempath, &
105  found%under_relaxation)
106  call mem_set_value(this%iprpak, 'PRINT_INPUT', input_mempath, &
107  found%print_input)
108  call mem_set_value(this%iprflow, 'PRINT_FLOWS', input_mempath, &
109  found%print_flows)
110  call mem_set_value(this%ipakcb, 'SAVE_FLOWS', input_mempath, found%save_flows)
111 
112  ! create the list file
113  call this%create_lstfile(lst_fname, this%filename, found%list, &
114  'CHANNEL FLOW MODEL (CHF)')
115 
116  ! activate save_flows if found
117  if (found%save_flows) then
118  this%ipakcb = -1
119  end if
120 
121  ! log set options
122  if (this%iout > 0) then
123  call this%log_namfile_options(found)
124  end if
125 
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 48 of file chf.f90.

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