Skip to content

Commit

Permalink
Update PrmsBuilder.build(): replace hru_area calculation for structur…
Browse files Browse the repository at this point in the history
…ed grids
  • Loading branch information
jlarsen-usgs committed Jun 27, 2024
1 parent 95081e6 commit 6d1e14a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gsflow/builder/prms_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ def build(self, name=None, area_conv=2.47105e-4):
# area_conv converts model unit area to acres for prms
hru_area = self.cascades_obj.hru_area * area_conv
else:
cell_area = (self.modelgrid.xcs * self.modelgrid.ycs) * area_conv
hru_area = np.full(nhru, cell_area)
hru_area = np.zeros(self.modelgrid.top.shape)
for i, delc in self.delc:
for j, delr in self.delr:
hru_area[i, j] = delc * delr * area_conv

param_dict["hru_area"] = {"record": hru_area, "dtype": 2}

Expand Down

0 comments on commit 6d1e14a

Please sign in to comment.