-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve split layers ds #156
Conversation
now also works for other variables now also works for vertex grids split_dict can contain layer names as keys, and values do not have to add up to 1 anymore split_reindexer in attrs contains layer names now First splitted layer gets _1 suffix Less code
For when da is in another crs For when grid-refinement is used
Can now also read data from "kusthoogte" and "vaklodingen" More options to get a specific time
fixes UserWarning: Transform that is non-rectilinear or with rotation found. Unable to recalculate.
And update some documentation
Also remove imod-dependency for generation of docs
This pull request is ready for review. Tests fail as the server of Riviereland is offline, and remaining codacy issue can be ignored. |
And add documentation And change timeout to 120 seconds in some places (from 1200 seconds)
"# use imod's calculate_gxg method to calculate the GHG\n", | ||
"gxg = imod.evaluate.calculate_gxg(head_structured.sel(layer=\"HLc\"))\n", | ||
"# use nlmod's calculate_gxg method to calculate the GVG, GLG and GHG.\n", | ||
"gxg = nlmod.evaluate.calculate_gxg(head.sel(layer=\"HLc\"))\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je kan de calculate_gxg
functie ook in de gwf.output module zetten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified in commit 2ca61f7
@@ -206,7 +206,7 @@ def extrapolate_ds(ds, mask=None): | |||
return ds | |||
if mask.all(): | |||
raise (Exception("The model only contains NaNs")) | |||
if ds.gridtype == "vertex": | |||
if "gridtype" in ds.attrs and ds.gridtype == "vertex": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is de eerste check niet overbodig? Als de gridtype
attribute niet aanwezig is in de ds
krijg je nu een error bij het tweede deel ds.gridtype == "vertex"
toch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, ik wist niet dat het tweede deel van de and
niet wordt uitgevoerd als het eerste deel al False
is
And improve error logging
This pull request started with improving the split_layers method, but on top of that other improvements were made as well: