Conversation
- add prt submodule with PRT packages (missing FMI at the moment)
- deprecate mpf, add ibound kwarg - add structured kwarg to pg_from_pd (needed for structured models)
- allow directly registering solution pkgs if model is passed - add EMS package
- add hash_xarray_coords() to compute hashes on coordinates - add hash_xarray_data_vars() to compute hashes on data arrays - optionally include metadata to hash, default is False - include NumpyEncoder to allow dumping numpy objects to json. - add an ugly fix to cast layer dtype to the one the cached dataset is using Co-authored-by: Bas des Tombe <bdestombe@gmail.com>
* Update regis.get_layer_names() to return pre 2.2.3 names * Renaming regis layer names if version > 2.2.3 If regis version would receive a small version bump, the origional code would crash. With the proposed changes less likely so. * formatting * Refactor get_layer_names function to accept dataset as an argument and streamline layer name assignment in get_regis function. * Remove unused import of 'get' from the arrow module in regis.py * Removed trainling white space
* add option to maken cross section animation with variable heads * remove logger and small fix * fix comments Davíd and add norm by default * remove animation from local grid refinement, add aniomation for Schoonhoven * remove comment * textual
And change `assert ds.gridtype == "structured"` to `assert is_structured(ds)`
Add PRT support
- usually not necessary but I think this was causing a weird error for me
Voronoi example
mini adjustment to ensure we get the right int in our modpath input
* Mutiple changes Add method `nlmod.grid.gdf_area_per_index_to_da' Replace `"angrot" in ds.attrs and ds.attrs["angrot"] != 0.0` by `is_rotated(ds_out)` in `nlmod.grid` Add docstring to `nlmod.time.dataframe_to_flopy_timeseries` Add `nlmod.plot.get_ahn_colormap` Add parameter `season_filename` to `nlmod.gwf.surface_water.gdf_to_seasonal_pkg` * Fix Codacy issues * Add docstring to `nlmod.plot.get_ahn_colormap` * Change some names
Add pathlib.Path to the list of supported types in _same_function_arguments for proper cache validation when Path objects are used as function arguments.
| return lay * shape[1] * shape[2] + row * shape[2] + col | ||
|
|
||
|
|
||
| def get_node_vertex(lay, icell2d, shape): |
There was a problem hiding this comment.
missing docstring for parameters shape?
There was a problem hiding this comment.
Also, what is the shape for a vertex grid? Not (nrow, ncol) right?
There was a problem hiding this comment.
It is (nlay, ncpl). The modflow manual uses ncpl to define the number of icell2d-cells. Added this to the docstring.
nlmod/dims/grid.py
Outdated
| col : int | ||
| column number. | ||
| shape : tuple | ||
| shape of the model grid. |
There was a problem hiding this comment.
Maybe good to add a definition of the shape: (nrow, ncol)
There was a problem hiding this comment.
it is (nlay, nrow, ncol) I think. Added this to the docstring
| obs_ds["modellayer"].values = ds["layer"][ | ||
| obs_ds["modellayer"].astype(int) | ||
| ].values | ||
| elif drop_nan_layers: |
There was a problem hiding this comment.
maybe we can convert (i)layer to an int when we drop nans.
There was a problem hiding this comment.
I do not really know what you mean by this. Let;s handle this later, I am afraid to break stuff now.
nlmod/dims/time.py
Outdated
|
|
||
|
|
||
| def get_time_step_length(perlen, nstp, tsmult): | ||
| """Get the length of the timesteps within a singe stress-period. |
|
All 26 remaining codacy issues cannot be solved, as most are not real issues. |
So with support for PRT and the renaming of all download-methods, I think it's time for a new version: 0.10.0.