Skip to content

Commit

Permalink
include longitude and latitude for GEB subgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
jensdebruijn committed Oct 31, 2024
1 parent c3afec2 commit 1a31732
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions geb/HRUs.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,19 @@ def __init__(self, data, model) -> None:
self.scaling, axis=1
)
self.cell_size = self.data.grid.cell_size / self.scaling

# get lats and lons for subgrid
self.lon = np.linspace(
self.gt[0] + self.cell_size / 2,
self.gt[0] + self.cell_size * submask_width - self.cell_size / 2,
submask_width,
)
self.lat = np.linspace(
self.gt[3] + self.cell_size / 2,
self.gt[3] + self.cell_size * submask_height - self.cell_size / 2,
submask_height,
)

if self.model.load_initial_data:
self.land_use_type = np.load(
os.path.join(self.data.get_save_state_path(), "HRU.land_use_type.npz")
Expand Down

0 comments on commit 1a31732

Please sign in to comment.