splitting a big file in to three dimetional arrays

May 1, 2012 at 01:50:43
Specs: Linux i686
I have a file type of the following.i want to Extract the data values from the raw data files create three dimensional awk arrays that contain for every location and time of observation the raw OMI data how can i do it using awk

Day: 275 Oct 1, 2004 OMI TO3 STD OZONE GEN:08:011 Asc LECT: 01:49 pm

Longitudes: 360 bins centered on 179.5 W to 179.5 E (1.00 degree steps)

Latitudes : 180 bins centered on 89.5 S to 89.5 N (1.00 degree steps)

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 lat = -89.5

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 lat = -88.5

0147144 0 0140142 0 0 0141143140 0141145147143 0 0 0 0 0 0 0

0141145 0 0 0140142143 0 0 0 0 0 0141141 0 0 0 0 0 0 0 0

0142 0 0 0 0 0 0140142142143 0 0 0142141 0 0 0 0 0 0 0 0

0140 0 0 0143 0142139140139140 0143145 0145 0 0 0 0 0 0 0 0

149143 0 0 0 0143142143 0 0143 0 0142141 0 0 0 0 0 0 0 0 0

139140 0 0 0 0141143143143142141142143140143 0 0 0 0 0 0 0 0 0

142 0 0 0 0 0142142141143143143 0143143 0 0 0 0 0 0 0 0 0 0

142 0 0 0 0 0142142143141140 0 0142140 0 0 0 0 0 0 0 0 0140

140 0 0 0 0 0139140140141140 0142 0141141 0 0 0 0 0 0 0 0140

140 0 0 0 0141139140139140 0 0 0 0 0 0 0 0 0 0 0 0 0 0138

0 0 0 0 0 0136 0139141138138 0 0 0 0 0 0 0 0 0 0 0 0141

0 0 0 0 0 0142140138137 0137 0 0 0 0 0 0 0 0 0 0 0 0140

0 0 0 0 0 0140138138 0140 0142 0142 0 0 0 0 0 0 0 0141142

0 0 0 0 0 0142145144 0142 0141144 0 0 0 0 0 0 0 0 0145 0

0 0 0 0 0 0 0144 0 0 lat = -87.5

146145145145143147146148146 0 0 0147146144144146147144144 0143144143144

147146148146147146147146142 0 0 0142143144143144141141141140143143142144

143143143141142142143 0144 0 0143144147144144144140 0141140146143142140

141138140142140140141140 0 0 0 0142140140144143142143 0143145144145144

144145145 0147146 0143 0 0 0 0147145144142 0140141141144144142140140

141142141 0143 0141 0 0 0 0143143143143142143 0143143142142141143143

142142141141141143143 0 0 0 0143143144142143142143143144142143142144144

143143141141142 0141 0 0 0 0143143142142140141140141140143142142141142

140141 0142 0140 0140 0 0142143143143142143141 0139141142141141139140

141141 0143 0 0139 0 0 0140141140139139 0138139 0140140140137138137

139136140138 0137139 0 0 0139139139136139136135137135137138136138139139

138 0138140139 0139 0 0138137139136138139138 0138139140140140140140139

140141 0141141143 0 0 0141141141142143142141143143144143144145144145144

143144145145 0144 0 0 0145146145146146 0143142145145145146144146145145

0 0 0 0 0 0 0 0145146 lat = -86.5


See More: splitting a big file in to three dimetional arrays

Report •

#1
May 1, 2012 at 09:23:46
I don't have a clue what you are trying to do. But awk struggles with arrays greater than 1 dimension. You have to simulate multidimensional arrays in awk.

Check out this link for dealing with arrays in awk - including arrays-of-arrays:

http://www.gnu.org/software/gawk/ma...

It might give you some ideas.


Report •
Related Solutions


Ask Question