Python Forum
Creating look up table/matrix from 3d data array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating look up table/matrix from 3d data array
#1
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.

Attached Files

Thumbnail(s)
   
Reply


Messages In This Thread
Creating look up table/matrix from 3d data array - by chai0404 - Apr-08-2020, 03:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating 2D Array jpinko 1 2,182 Nov-23-2020, 09:05 PM
Last Post: jefsummers
  Adding data in 3D array from 2D numpy array asmasattar 0 2,169 Jul-23-2020, 10:55 AM
Last Post: asmasattar
  Read json array data by pandas vipinct 0 1,901 Apr-13-2020, 02:24 PM
Last Post: vipinct
  sequential sampling from an array to a matrix nsansen 1 1,960 Mar-29-2020, 08:15 PM
Last Post: deanhystad
  Identifying consecutive masked values in a 3D data array chai0404 12 5,636 Feb-01-2020, 12:59 PM
Last Post: perfringo
  Creating new rows and adding them to empty data frame kapilan15 0 1,650 May-31-2019, 10:19 AM
Last Post: kapilan15
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 2,932 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  while creating a array using numpy.arrange, how to negate only the last 50 numbers? vicky53 1 2,647 Apr-06-2019, 11:52 AM
Last Post: scidam
  How to transform array into dataframe or table? python_newbie09 2 14,613 Mar-29-2019, 07:48 PM
Last Post: python_newbie09
  creating an empty NumPy array in Python sandeepatel 2 4,644 Jan-16-2019, 09:24 AM
Last Post: rinu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020