Skip to content

Commit

Permalink
Merge pull request #89 from WikiWatershed/tt/include-low-density-open
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadain authored Dec 29, 2021
2 parents 0d95314 + a255572 commit 9a89831
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 221 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Ensure you have Python 3.9 and [pipenv](https://pipenv.pypa.io/en/latest/) avail
$ pipenv sync
```

### Running Locally

```bash
$ pipenv run ./run.py --json test/integrationtests/input_4_output.json test/integrationtests/input_4.gms
```

### Testing

```bash
Expand Down
5 changes: 4 additions & 1 deletion gwlfe/WriteOutputFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,10 @@ def WriteOutput(z):
SumWxYrEnd = z.WxYrEnd

# Which land use sources to include in the totals.
sources = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
# These are indices of this array: https://github.com/WikiWatershed/model-my-watershed/blob/415be752ea7b66ae5e1d15afe1a11cf4051dbd5e/src/mmw/mmw/settings/gwlfe_settings.py#L23-L39
# This list matches the land type in the Loads list below
# 13 was added and 4, 5, 9 removed in https://github.com/WikiWatershed/gwlf-e/pull/84
sources = (0, 1, 2, 3, 6, 7, 8, 10, 11, 12, 13)

# ha
AreaTotal = sum(z.Area[l] for l in sources)
Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main():

if (args.json != None):
with open(args.json, "w") as file:
json.dump(result, file, indent=2, sort_keys=True)
json.dump(result, file, indent=4, sort_keys=True)


if __name__ == '__main__':
Expand Down
Loading

0 comments on commit 9a89831

Please sign in to comment.