-
Notifications
You must be signed in to change notification settings - Fork 20
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 time units for MFDatasets #435
Comments
Correct. I'll post once I've looked into it a bit more. |
Added MFTime unit test for the netCDF4-python library
Note:
|
Time variables now use MFTime if the source dataset is multi-file.
Fixed in |
No go.
Tested on |
@huard If it's not too much trouble, could you pass along the metadata dumps for the two files? |
|
It wasn't clear, but except for the tracking_id and creation date, the metadata is identical for both files. |
Ha, I figured. Always good to check though. Thanks for passing the metadata along. I think the correct approach is to have the bounds variable inherit the calendar from its parent variable. Interesting that they listed the units on the time bounds and not the calendar. The calendar is also non-standard in this file. |
This data does present a problem. The calendar is already inherited from the parent for bounds variables in
import ocgis
rd = ocgis.RequestDataset(paths)
rd.dimension_map.set_bounds(ocgis.constants.DimensionMapKey.TIME, None)
ops = ocgis.OcgOperations(dataset=rd, ...) What do you think? |
1. Is out in this case, as the source files are read-only.
2. I'm not familiar enough with ocgis to have an informed opinion.
How would time subsetting work then if `time_bnds` is not available ? It
would use `time` instead?
I've tried your proposal but I'm missing something.
rd.dimension_map is a dict without a `set_bounds` method.
…On Fri, Apr 28, 2017 at 12:40 PM Ben Koziol ***@***.***> wrote:
This data does present a problem. The calendar is already inherited from
the parent for bounds variables in ocgis, but MFTime operates from-file
so there is no opportunity to intercept the metadata. There are two options
as I see it:
1. Add the appropriate attribute to the source data.
2. Use the dimension_map to ignore the time bounds altogether:
import ocgis
rd = ocgis.RequestDataset(paths)
rd.dimension_map.set_bounds(ocgis.constants.DimensionMapKey.TIME, None)
ops = ocgis.OcgOperations(dataset=rd, ...)
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#435 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAE9Q3P_wE78de1gmg6DjNTjYbMyyelrks5r0haJgaJpZM4LsslO>
.
|
Yes.
The dimension map was just recently objectified. You'll need to pull and re-install. Sorry, I should have mentioned that. |
Seems to work. Thanks ! |
This bug affects time indexing when the following conditions are met:
What happens is that ocgis does not recognize that the time units are different for each file, and is not able to group data over a period (for example an average from 2030 to 2050).
netcdf4 has a MFTime class that handles this case, but it does not appear to be used in ocgis.
The text was updated successfully, but these errors were encountered: