Skip to content

WIP: Ndv postprocess module part1#129

Open
nielsdevleeschouwer wants to merge 45 commits into
masterfrom
NDV-postprocess-module-part1
Open

WIP: Ndv postprocess module part1#129
nielsdevleeschouwer wants to merge 45 commits into
masterfrom
NDV-postprocess-module-part1

Conversation

@nielsdevleeschouwer

Copy link
Copy Markdown
Contributor

Overhaul of postprocessing module part 1:

What has been implemented

  • Initialize a PostProcess object for a scenario.
  • Inspect routing outputs (routing vectors, optional missing-routing vectors, and routing tables without river pixels).
  • Explore sink-related vectors: sediment export to rivers, sewer inflow, and combined sinks.
  • Inspect ranked sediment-load outputs for prioritization.
  • Delineate and inspect point-of-interest (POI) subcatchments.
  • Delineate and inspect buffer subcatchments.
  • Identify and visualize priority subcatchments with two approaches:
    • top-n selection,
    • percentage-based selection using sedi_export + sewer_in.
  • Run and inspect the grass-strip postprocessing workflow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your ini file contains absolute paths (/nas/homes/niels-1000010/GitHub). Use relative paths instead.

return fig, ax

self._mask.plot = plot
self._mask.file_path = mask

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file_path argument for RasterFile-objects is a realy good addition. However, in the class RasterFile it is only stored when rp=None and file_path.suffix=.sdat. Can you adjust the RasterFile-object attributes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in c853d4d

Comment thread docs/getting-started/postprocess.ipynb Outdated
"os.chdir(\"../..\")\n",
"\n",
"# Select the example results folder used in this tutorial\n",
"home_folder = Path(\"/nas/homes/niels-1000010/GitHub/pywatemsedem/tests/postprocess/langegracht\")"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you refer to relative paths?

)


def check_and_create_folder(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the only function that was tested in test_folders.py. Rremove this test and add new tests for the new fodler.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests for the postprocessing module must be reveiwed as well.

@daarende

Copy link
Copy Markdown
Contributor

@nielsdevleeschouwer your refactoring is looking good! I really like the similar approach with the factory and the use of modelinput and modeloutput objects.

However, some remarks:

  • Why did you add testfiles for the Langegracht? There are already testfiles for Langegracht that you used for the tests of modelinput/modeloutput modules. I think it is better to use these files to limit the size of the repo. Also, several rasters of the testfiles added in this branch are corrupt (I cannot open them).
  • Tests are failing, can you check this?
  • Can you add tests for the new postproccessin module?

I already did some small changes (see my commits), so make sure to pull these updates :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants