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

Dealing with station ID as string #291

Open
belasi01 opened this issue Dec 2, 2024 · 1 comment
Open

Dealing with station ID as string #291

belasi01 opened this issue Dec 2, 2024 · 1 comment

Comments

@belasi01
Copy link

belasi01 commented Dec 2, 2024

This is not a critical issue, but often station names are in alphanumeric or string format, not always numeric. The current version only deals with station as numeric values, yielding the following error:

File "/Users/simonbelanger/PycharmProjects/HyperCP/Source/ProcessL1aqc.py", line 799, in processL1aqc
ancGroup.datasets["STATION"].data = np.array(station, dtype=[('NONE', '<f8')])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: 'BedfordBassin'

It would be nice if HyperCP can deal with that.

Or is there another way to avoid this error?

Simon

@oceancolorcoder
Copy link
Contributor

Fair question. May be a ticklish work-around. We will take it up. Suggest that in the meantime you translate station names into number.

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

2 participants