Skip to content

Copy dataset units in geocode.py #683

@EJFielding

Description

@EJFielding

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions