What outputs for each function: Full DataSet with the additional fields or the computed DataArray
Closed this issue · 4 comments
ACHMartin commented
We tend to do return the full DataSet with the additional field.
Should we return the DataArray instead. I think it believe of the cases, perhaps we can discuss here the cases where DataArray output should be prefer.
The new API would be:
dsl2['newField'] = compute_new_field(dsl2)
instead of the current:
dsl2 = compute_new_field(dsl2)
ACHMartin commented
I would go for the DataArray output for:
compute_radial_surface_current
potentially for
compute_current_magnitude_and_direction
DavidMcCann-NOC commented
I've had similar thoughts, and it wouldn't be too much effort to change. It'll be more transparent in a lot of cases I think
DavidMcCann-NOC commented
Perhaps start with functions that only return one or two output arrays (e.g., U, V)
DavidMcCann-NOC commented
Closed with #224