Skip to content

Create a way to calculate computed coordinates #462

@hetland

Description

@hetland

Create computed coordinates in a lazy way, given a user defined equation for defining these coordinates.

E.g.,

my_depths(params):
    # do the calculation
   return depths

Then, link ds.salt.z to my_depths, such that

ds.salt.z

returns the depths, calculated on request. Or better, an object that returns values only upon indexing.

See, e.g.,
The equations:
https://github.com/hetland/octant/blob/master/octant/depths.py

One way to do the lazy calculations just in python
https://github.com/hetland/octant/blob/68f51005480c8cb9f83098b0f751b4e8086c11b5/octant/roms.py#L244

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