I am currently trying to validate my CROCO model output with some CTD observation data which is at some fixed longitude and latitude points. For this I need model output data say salinity at this same or nearest lat_rho and lon_rho as for CTD data.
I tried to find the corresponding index from lat_rho and lon_rho but due to staggered grid I am facing difficulties to get it correctly. Can any one pleasse help to to overcome with this problem??
I tried accordingly to get corresponding indexes as you suggested however I am not getting it correctly.
For an example, I need the corresponding indexes for lon1= 53.7640 and lat1=26.3720, so I defined them as lon1 at lat1 and then I am using the same code as you mentioned above to find the indx1 and indx2.
I am getting the index values at this steps but once I look on lat_rho(indx1,indx2) and lon_rho(indx1,indx2) at these indexes I am getting the coordinate lon_rho as 49.4085 and lat_rho as 31.3533 which are far away from my set locations lon1 and lat1 which are 53.7640 & 26.3720 respectively.
I will be glad if I can be pointed to ways to solve this issue.
Have you any idea to choose the indexes for some fixed longitude and latitude points from lat_rho & lon_rho on a staggered grid? I hope now you shall be able to understand that what I am looking for.