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

Make station dimension for hisfiles less hard-coded #876

Open
veenstrajelmer opened this issue Jun 19, 2024 · 0 comments
Open

Make station dimension for hisfiles less hard-coded #876

veenstrajelmer opened this issue Jun 19, 2024 · 0 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jun 19, 2024

Recently (from DIMRset 2.27.03 onwards, 30 may 2014), the hisfile was refactored and the stations dimension was renamed to station.

That dimension is hardcoded in interpolate_grid2bnd.py:

hisstations_pd = data_xr_his.stations.to_dataframe() #TODO: add check if stations are strings? (whether preprocess_hisnc was used)

And also in get_nc.py:

raise ValueError(f'ERROR: unexpected number of dimensions in requested squeezed variable ({data_xr_sel[varname].shape}), first use data_xr.isel(stations=int) to select a single station') #TODO: can also have a different cause, improve message/testing?

Try to derive the station dimension automatically just like dfmt.preprocess_hisnc() and prevent hard-coding.

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

1 participant