You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you create a model dataset with 3 layers using nlmod.get_ds the layers are named 1, 2, 3 by default. I propose to use the Python zero-based approach and name them 0, 1, 2.
I encountered this when trying to add DataArrays to a dataset using the steps below. It took me ages to find out what was happening.
I create a model dataset with 3 layers using get_ds. The layers are numbered 1, 2, 3
I create and run a model using the dataset
I use nlmod.gwf.get_budget_da to get the budget data array using the gwf object. This returns a DataArray with the layers numbered 0, 1, 2 because it does not know the layer numbering in the dataset.
I add the DataArray from step 3 to the dataset of step 1. The first layer is removed from the DataArray and a layer with only nan's is appended at the end.
The text was updated successfully, but these errors were encountered:
The naming 1, 2, 3 was chosen so that titles in figures are one-based ('layer 1' for the first layer). But your example shows this can cause strange errors. Therefore making layer zero-based is probably better.
When you create a model dataset with 3 layers using
nlmod.get_ds
the layers are named 1, 2, 3 by default. I propose to use the Python zero-based approach and name them 0, 1, 2.I encountered this when trying to add DataArrays to a dataset using the steps below. It took me ages to find out what was happening.
get_ds
. The layers are numbered 1, 2, 3nlmod.gwf.get_budget_da
to get the budget data array using thegwf
object. This returns a DataArray with the layers numbered 0, 1, 2 because it does not know the layer numbering in the dataset.The text was updated successfully, but these errors were encountered: