Skip to content
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

Add support for Time Pattern #69

Open
SimonDelmas opened this issue Feb 13, 2025 · 3 comments
Open

Add support for Time Pattern #69

SimonDelmas opened this issue Feb 13, 2025 · 3 comments

Comments

@SimonDelmas
Copy link

First of all, thank you for this very useful package.

I encounter an issue with HEC-DSS time pattern (which are described here). It is a special case of time series that is not associated with a specific time and differ from a regular time series by its "D" part of the pathname which is "TS-Pattern".
Catalog initialization always failed on with file that contains such data as it try to cast the D part into a datetime.

Support for TS-PATTERN would be appreciated. Ignoring them in the catalog creation to avoid failure in case the file contains this kind of data could be a simple first step.

Thank you for your attention to this issue.

Regards

@oskarhurst
Copy link
Contributor

Hello @SimonDelmas, could you send me a DSS file that contains a HEC-DSS time pattern to use for testing.

@ktarbet
Copy link
Contributor

ktarbet commented Feb 19, 2025

The existing read/write methods use a zStructTimeSeries *tss. We would need to break down the tss into individual parts , times[], values[], like the other read/write methods for regular timeseries.

ztsStorePattern(long long *ifltab, zStructTimeSeries *tss)
int ztsRetrievePattern(long long *ifltab, zStructTimeSeries *tss, int retrieveDoublesFlag)

Also I think we would only return doubles for simplicity/consistency.

https://github.com/HydrologicEngineeringCenter/hec-dss/blob/master/heclib/heclib_c/src/SemiPublic/ztsStorePattern.c

@SimonDelmas
Copy link
Author

@oskarhurst please find an example from an HMS simulation here.
Note that I have change the extension to bypass Github file upload policy.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants