MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
virtualgwemodelmodule Module Reference

Data Types

type  virtualgwemodeltype
 

Functions/Subroutines

subroutine, public add_virtual_gwe_model (model_id, model_name, model)
 
subroutine vgwe_create (this, name, id, model)
 
subroutine init_virtual_data (this)
 
subroutine vgwe_prepare_stage (this, stage)
 
subroutine allocate_data (this)
 
subroutine deallocate_data (this)
 
subroutine vgwe_destroy (this)
 

Function/Subroutine Documentation

◆ add_virtual_gwe_model()

subroutine, public virtualgwemodelmodule::add_virtual_gwe_model ( integer(i4b)  model_id,
character(len=*)  model_name,
class(numericalmodeltype), pointer  model 
)
Parameters
model_idglobal model id
model_namemodel name
modelthe actual model (can be null() when remote)

Definition at line 48 of file VirtualGweModel.f90.

50  integer(I4B) :: model_id !< global model id
51  character(len=*) :: model_name !< model name
52  class(NumericalModelType), pointer :: model !< the actual model (can be null() when remote)
53  ! local
54  class(VirtualGweModelType), pointer :: virtual_gwe_model
55  class(*), pointer :: obj
56 
57  allocate (virtual_gwe_model)
58  call virtual_gwe_model%create(model_name, model_id, model)
59 
60  obj => virtual_gwe_model
61  call virtual_model_list%Add(obj)
62 
type(listtype), public virtual_model_list
Here is the caller graph for this function:

◆ allocate_data()

subroutine virtualgwemodelmodule::allocate_data ( class(virtualgwemodeltype this)
private

Definition at line 158 of file VirtualGweModel.f90.

159  class(VirtualGweModelType) :: this
160 
161  !allocate (this%cnd_idiffc)
162  allocate (this%cnd_idisp)
163  !allocate (this%cnd_diffc)
164  allocate (this%cnd_alh)
165  allocate (this%cnd_alv)
166  allocate (this%cnd_ath1)
167  allocate (this%cnd_ath2)
168  allocate (this%cnd_atv)
169  allocate (this%cnd_ktw)
170  allocate (this%cnd_kts)
171  allocate (this%fmi_gwfhead)
172  allocate (this%fmi_gwfsat)
173  allocate (this%fmi_gwfspdis)
174  allocate (this%fmi_gwfflowja)
175  allocate (this%est_porosity)
176  allocate (this%incnd)
177  allocate (this%inest)
178 

◆ deallocate_data()

subroutine virtualgwemodelmodule::deallocate_data ( class(virtualgwemodeltype this)
private

Definition at line 181 of file VirtualGweModel.f90.

182  class(VirtualGweModelType) :: this
183 
184  !deallocate (this%cnd_idiffc)
185  deallocate (this%cnd_idisp)
186  !deallocate (this%cnd_diffc)
187  deallocate (this%cnd_alh)
188  deallocate (this%cnd_alv)
189  deallocate (this%cnd_ath1)
190  deallocate (this%cnd_ath2)
191  deallocate (this%cnd_atv)
192  deallocate (this%cnd_ktw)
193  deallocate (this%cnd_kts)
194  deallocate (this%fmi_gwfhead)
195  deallocate (this%fmi_gwfsat)
196  deallocate (this%fmi_gwfspdis)
197  deallocate (this%fmi_gwfflowja)
198  deallocate (this%est_porosity)
199  deallocate (this%incnd)
200  deallocate (this%inest)
201 

◆ init_virtual_data()

subroutine virtualgwemodelmodule::init_virtual_data ( class(virtualgwemodeltype this)
private

Definition at line 80 of file VirtualGweModel.f90.

81  class(VirtualGweModelType) :: this
82 
83  !call this%set(this%cnd_idiffc%base(), 'IDIFFC', 'CND', MAP_ALL_TYPE)
84  call this%set(this%cnd_idisp%base(), 'IDISP', 'CND', map_all_type)
85  !call this%set(this%cnd_diffc%base(), 'DIFFC', 'CND', MAP_NODE_TYPE)
86  call this%set(this%cnd_alh%base(), 'ALH', 'CND', map_node_type)
87  call this%set(this%cnd_alv%base(), 'ALV', 'CND', map_node_type)
88  call this%set(this%cnd_ath1%base(), 'ATH1', 'CND', map_node_type)
89  call this%set(this%cnd_ath2%base(), 'ATH2', 'CND', map_node_type)
90  call this%set(this%cnd_atv%base(), 'ATV', 'CND', map_node_type)
91  call this%set(this%cnd_ktw%base(), 'KTW', 'CND', map_node_type)
92  call this%set(this%cnd_kts%base(), 'KTS', 'CND', map_node_type)
93  call this%set(this%fmi_gwfhead%base(), 'GWFHEAD', 'FMI', map_node_type)
94  call this%set(this%fmi_gwfsat%base(), 'GWFSAT', 'FMI', map_node_type)
95  call this%set(this%fmi_gwfspdis%base(), 'GWFSPDIS', 'FMI', map_node_type)
96  call this%set(this%fmi_gwfflowja%base(), 'GWFFLOWJA', 'FMI', map_conn_type)
97  call this%set(this%est_porosity%base(), 'POROSITY', 'EST', map_node_type)
98  call this%set(this%incnd%base(), 'INCND', '', map_all_type)
99  call this%set(this%inest%base(), 'INEST', '', map_all_type)
100 

◆ vgwe_create()

subroutine virtualgwemodelmodule::vgwe_create ( class(virtualgwemodeltype this,
character(len=*)  name,
integer(i4b)  id,
class(numericalmodeltype), pointer  model 
)

Definition at line 65 of file VirtualGweModel.f90.

66  class(VirtualGweModelType) :: this
67  character(len=*) :: name
68  integer(I4B) :: id
69  class(NumericalModelType), pointer :: model
70 
71  ! create base
72  call this%VirtualModelType%create(name, id, model)
73  this%container_type = vdc_gwemodel_type
74 
75  call this%allocate_data()
76  call this%init_virtual_data()
77 

◆ vgwe_destroy()

subroutine virtualgwemodelmodule::vgwe_destroy ( class(virtualgwemodeltype this)
private

Definition at line 204 of file VirtualGweModel.f90.

205  class(VirtualGweModelType) :: this
206 
207  call this%VirtualModelType%destroy()
208  call this%deallocate_data()
209 

◆ vgwe_prepare_stage()

subroutine virtualgwemodelmodule::vgwe_prepare_stage ( class(virtualgwemodeltype this,
integer(i4b)  stage 
)
private

Definition at line 103 of file VirtualGweModel.f90.

104  class(VirtualGweModelType) :: this
105  integer(I4B) :: stage
106  ! local
107  integer(I4B) :: nr_nodes, nr_conns
108 
109  ! prepare base (=numerical) model data items
110  call this%VirtualModelType%prepare_stage(stage)
111 
112  nr_nodes = 0
113  nr_conns = 0
114 
115  if (stage == stg_aft_mdl_df) then
116 
117  !call this%map(this%cnd_idiffc%base(), (/STG_AFT_MDL_DF/))
118  call this%map(this%cnd_idisp%base(), (/stg_aft_mdl_df/))
119  call this%map(this%incnd%base(), (/stg_aft_mdl_df/))
120  call this%map(this%inest%base(), (/stg_aft_mdl_df/))
121 
122  else if (stage == stg_bfr_con_ar) then
123 
124  nr_nodes = this%element_maps(map_node_type)%nr_virt_elems
125  nr_conns = this%element_maps(map_conn_type)%nr_virt_elems
126 
127  call this%map(this%x%base(), nr_nodes, &
128  (/stg_bfr_con_ar, stg_bfr_exg_ad, stg_bfr_exg_cf/))
129  call this%map(this%ibound%base(), nr_nodes, (/stg_bfr_con_ar/))
130 
131  !if (this%cnd_idiffc%get() > 0) then
132  ! call this%map(this%cnd_diffc%base(), nr_nodes, (/STG_BFR_CON_AR/))
133  !end if
134 
135  if (this%cnd_idisp%get() > 0) then
136  call this%map(this%cnd_alh%base(), nr_nodes, (/stg_bfr_con_ar/))
137  call this%map(this%cnd_alv%base(), nr_nodes, (/stg_bfr_con_ar/))
138  call this%map(this%cnd_ath1%base(), nr_nodes, (/stg_bfr_con_ar/))
139  call this%map(this%cnd_ath2%base(), nr_nodes, (/stg_bfr_con_ar/))
140  call this%map(this%cnd_atv%base(), nr_nodes, (/stg_bfr_con_ar/))
141  call this%map(this%cnd_ktw%base(), nr_nodes, (/stg_bfr_con_ar/))
142  call this%map(this%cnd_kts%base(), nr_nodes, (/stg_bfr_con_ar/))
143  end if
144 
145  call this%map(this%fmi_gwfhead%base(), nr_nodes, (/stg_bfr_exg_ad/))
146  call this%map(this%fmi_gwfsat%base(), nr_nodes, (/stg_bfr_exg_ad/))
147  call this%map(this%fmi_gwfspdis%base(), 3, nr_nodes, (/stg_bfr_exg_ad/))
148  call this%map(this%fmi_gwfflowja%base(), nr_conns, (/stg_bfr_exg_ad/))
149 
150  if (this%incnd%get() > 0 .and. this%inest%get() > 0) then
151  call this%map(this%est_porosity%base(), nr_nodes, (/stg_aft_con_ar/))
152  end if
153 
154  end if
155