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
I have a set of netcdf files with a date overlap: the last date of one file is the first date of the next file. I have one file per day and hourly outputs, and instead of having 24 indices per file, I have 25 indices. Because of this, I get an error when creating the fieldset with FieldSet.from_netcdf. To solve this, I need to read only the first 24 indices of each file. However, when doing an easy test like this for only one file:
Hi @bbarcelollull, thanks for posting this question. You are right that parcels doesn't support indexing for the time-dimensions. That would have take a lot of development effort, and in most use-cases so far there is one snapshot per file so users can easily subselect by changing the list of files they provide when creating a fieldset.
An alternative is to use FieldSet.from_xarray_dataset(), which is much more flexible because it allows you to pass xarray datasets directly
I have a set of netcdf files with a date overlap: the last date of one file is the first date of the next file. I have one file per day and hourly outputs, and instead of having 24 indices per file, I have 25 indices. Because of this, I get an error when creating the fieldset with
FieldSet.from_netcdf
. To solve this, I need to read only the first 24 indices of each file. However, when doing an easy test like this for only one file:I get the following warning:
"WARNING: time dimension in indices is not necessary anymore. It is then ignored."
And the shape of the U field (
fieldset.U.data.shape
) is (25, 2, 2, 2).Hence, indices works for all dimensions except for time. Why this happens? Can I force the code to read the time indices?
The text was updated successfully, but these errors were encountered: