Apr-08-2020, 03:48 AM
Hi,
I have a data array of coastal grid cells and I need to find adjacent ocean cells from a different dataset.
To begin with, I have a 3D data array with lat, lon and time dimensions.
In this data array, whenever the variable is not equal to zero, I want to store this value in a new matrix with time as the x axis and the lat,lon coordinates as the y axis.
I have written a loop for this. A screenshot of the code and the data array is attached.
I hope you can have a look at the for loop and help me figure out how to refine it.
Once this matrix is created, I will look at the lat,lon pairs and find the adjacent cells from another dataset.
I need help with figuring out the loop for the first part.
Hope you can help.
Thank you.
I have a data array of coastal grid cells and I need to find adjacent ocean cells from a different dataset.
To begin with, I have a 3D data array with lat, lon and time dimensions.
In this data array, whenever the variable is not equal to zero, I want to store this value in a new matrix with time as the x axis and the lat,lon coordinates as the y axis.
I have written a loop for this. A screenshot of the code and the data array is attached.
I hope you can have a look at the for loop and help me figure out how to refine it.
Once this matrix is created, I will look at the lat,lon pairs and find the adjacent cells from another dataset.
I need help with figuring out the loop for the first part.
Hope you can help.
Thank you.