ec-jrc / pyPoseidon

Framework for Hydrodynamic simulations
https://pyposeidon.readthedocs.io/
European Union Public License 1.2
20 stars 7 forks source link

`to_2d()` should seam all the data variables by default #164

Closed pmav99 closed 9 months ago

pmav99 commented 10 months ago

When you have more than one data variables, you need to call to_2d() for each one and merge the datasets afterwards.

It would be nice if, instead, you could just call:

ds_2d = to_2d(ds, grid=[xn, yn, tri3n])

If someone wants to filter the variables where the "seaming" happens, they should do it like this:

to_2d(ds[["elev", "depth"]], mesh=[...])
brey commented 10 months ago

I have researched that, however there are node valued variables that are not space variants for resample to work. Such is the case of e.g. wetdry_node variable which is boolean.

I have update the to_2d to get a list and perform the operation for all user-described variables with one call.