OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
231 stars 113 forks source link

Question about reader_netCDF_CF_unstructured.py #1287

Open helena2281 opened 2 months ago

helena2281 commented 2 months ago

I have some questions about reader_netCDF_CF_unstructured.py code.

If you look at the get_variable function, there is a slight difference between node_variable and face_variable in the part that fetches the data at the closest point to the particle position. The node_variables says to extract the required data using sigma_ind when dvar.dimensions has 'siglev'. On the other hand, face_variables use sigma_ind to extract data when 'siglay' is in the variable dimension.

In my opinion, if node_variables, face_variables, or depth dimensions exist, they can all use 'siglay' the same, but what made them set them differently? Is there any special reason?

face_variable interpolating image

node_variable interpolating image

gauteh commented 2 months ago

I think I made this change because siglay was for face_variables and siglev was for node variables, otherwise the dimensions did not match up. But it has been a while since I did this.