107 class(VirtualGwfExchangeType) :: this
108 integer(I4B) :: stage
109
110 integer(I4B) :: nmax
111
112
113 call this%VirtualExchangeType%prepare_stage(stage)
114
115 if (stage == stg_aft_exg_df) then
116
117
118 call this%map(this%inmvr%base(), (/stg_aft_exg_df/))
119
120 else if (stage == stg_aft_con_cr) then
121
122
123 if (this%inmvr%get() > 0) then
124 this%has_mvr = .true.
125 end if
126
127 else if (stage == stg_bfr_con_ar) then
128
129
130 if (this%has_mvr .and. this%is_local) then
131 call this%map(this%mvr_maxmvr%base(), (/stg_bfr_con_ar/))
132 end if
133
134 else if (stage == stg_aft_con_ar) then
135
136
137 nmax = 0
138 if (this%has_mvr .and. this%is_local) nmax = this%mvr_maxmvr%get()
139
140 if (nmax > 0) then
141 call this%map(this%mvr_qpactual_m1%base(), nmax, (/stg_bfr_exg_fc/))
142 call this%map(this%mvr_qpactual_m2%base(), nmax, (/stg_bfr_exg_fc/))
143 call this%map(this%mvr_qavailable_m1%base(), nmax, (/stg_bfr_exg_fc/))
144 call this%map(this%mvr_qavailable_m2%base(), nmax, (/stg_bfr_exg_fc/))
145 call this%map(this%mvr_id_mapped_m1%base(), nmax, (/stg_aft_con_rp/))
146 call this%map(this%mvr_id_mapped_m2%base(), nmax, (/stg_aft_con_rp/))
147 else
148 call this%map(this%mvr_qpactual_m1%base(), 0, (/stg_never/))
149 call this%map(this%mvr_qpactual_m2%base(), 0, (/stg_never/))
150 call this%map(this%mvr_qavailable_m1%base(), 0, (/stg_never/))
151 call this%map(this%mvr_qavailable_m2%base(), 0, (/stg_never/))
152 call this%map(this%mvr_id_mapped_m1%base(), 0, (/stg_never/))
153 call this%map(this%mvr_id_mapped_m2%base(), 0, (/stg_never/))
154 end if
155
156 end if
157