-
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
Multiple improvements #289
Conversation
Update modpath executable Add nlmod.plot.geotop_lithok_on_map() Add "concentration" to perioddata in nlmod.gwf.buy() Add optional "layer" argument to extrapolate_ds, so you can use method for geotop-data with layer="z" as well
See comment from Onno in issue #275
…in top of regis and geotop And fix codacy issue
And fix some tests Fix extrapolate_ds for 2d-data-arrays
…metries anymore Change to HHNK
And improve test
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.
Looks good!
Two comments to discuss:
- one about the naming of the fill_top_and_bottom() method and what it does.
- can we think of names for the two layer model data models that we can reference by name, and explain somewhere in the documentation. e.g. "full-3D layer model" and "Modflow layer model". Maybe we can also use those names in our function names
convert_to_modflow_layermodel
andconvert_to_3d_layermodel()
. And in that explanation we should show how inactive zones can be derived from the thickness attribute. Come to think of it we should maybe add a method,get_active_domain(ds, layer=None)
.
Anyway, those were my thoughts.
return qm | ||
|
||
|
||
def _add_geotop_lithok_legend(lithok_props, ax, lithok=None, **kwargs): |
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.
docstring :)?
return ax.legend(handles=handles, **kwargs) | ||
|
||
|
||
def _get_geotop_cmap_and_norm(lithok, lithok_props): |
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.
docstring?
) | ||
|
||
# make sure the total thickness of the two models is equal (does not assert to True yet) |
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.
Why is that... ?
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.
No idea yet... It is a difference of 0.125 if I sum the total thickness. I have no idea where this comes from.
tests/test_009_layers.py
Outdated
ds2["botm"].loc[new_layer].data[mask] == ds1["botm"].loc[layer].data[mask] | ||
).all() | ||
|
||
# make sure the top of the new layer is euqal to the top of the original layer |
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.
comment typo, euqal
fix split_layer_ds and combine_layer_ds, and add tests small fixes to notebooks
…into multiple_improvements
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.
Add
convert_to_modflow_layermodel()
, alias for remove_layer_dim_from_top + remove NaNsconvert_to_regis_layermodel()
, alias for add_layer_dim_to_top + add NaNs
plot_test(regis, regis_split, colors=colors) | ||
|
||
|
||
def test_add_layer_dim_to_top(): |
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.
add some check here?
@@ -450,13 +450,17 @@ def facet_plot( | |||
if iper is None: | |||
raise ValueError("Pass 'period' to select timestep to plot.") |
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.
should be iper?
This pull request does the following:
extrapolate_ds
accepts alayer
argument, so you can use it for geotop data as wellextrapolate_ds
for 2d (non-layered) datanlmod.plot.geotop_lithok_on_map
(tested in tests/test_002_regis_geotop.py)So the most important change is the first:
nlmod.read.get_regis(extent)
will return a Dataset without a layer dimension in the variabletop
(which can be overridden by settingdrop_layer_dim_from_top
to False by the way). Does everybode agree?