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

Copy dataset units in geocode.py #683

Closed
1 task
EJFielding opened this issue Oct 18, 2021 · 1 comment · Fixed by #910
Closed
1 task

Copy dataset units in geocode.py #683

EJFielding opened this issue Oct 18, 2021 · 1 comment · Fixed by #910

Comments

@EJFielding
Copy link

EJFielding commented Oct 18, 2021

Description of the desired feature

The new addition of UNIT in the velocity.h5 output files is very helpful when we have run timeseries2velocity.py with a step function fit. It would be great if these UNIT were copied to the geocoded output when we run geocode.py velocity.h5.

Is your feature request related to a problem? Please describe

The velocity.h5 file has units.

HDF5 dataset "/step20210908        ": shape (1155, 2053)        , dtype <float32>
  UNIT    m
HDF5 dataset "/step20210908Std     ": shape (1155, 2053)        , dtype <float32>
  UNIT    m
HDF5 dataset "/velocity            ": shape (1155, 2053)        , dtype <float32>
  UNIT    m/year
HDF5 dataset "/velocityStd         ": shape (1155, 2053)        , dtype <float32>
  UNIT    m/year

After running geocode.py on it, the units are lost in the geo_velocity.h5 file:

HDF5 dataset "/step20210908        ": shape (1155, 2053)        , dtype <float32>
HDF5 dataset "/step20210908Std     ": shape (1155, 2053)        , dtype <float32>
HDF5 dataset "/velocity            ": shape (1155, 2053)        , dtype <float32>
HDF5 dataset "/velocityStd         ": shape (1155, 2053)        , dtype <float32>

Describe the solution you'd like

It would be great if the UNIT values were copied over by geocode.py.

Describe alternatives you have considered

Additional context

Are you willing to help implement and maintain this feature?

  • Yes
  • [ x] No
@EJFielding
Copy link
Author

Thanks for adding this.

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

Successfully merging a pull request may close this issue.

2 participants