ACHMartin / seastar_project

4 stars 0 forks source link

What outputs for each function: Full DataSet with the additional fields or the computed DataArray #182

Closed ACHMartin closed 1 year ago

ACHMartin commented 1 year ago

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 1 year ago

I would go for the DataArray output for: compute_radial_surface_current potentially for compute_current_magnitude_and_direction

DavidMcCann-NOC commented 1 year ago

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 1 year ago

Perhaps start with functions that only return one or two output arrays (e.g., U, V)

DavidMcCann-NOC commented 1 year ago

Closed with #224