Reputation: 250
I have grid ascii file from opendap output with 4 dimension attributes (time, depth, latitude, longitude), respectively. How to read/import this file into separated XYZ dataframe based on its dimension (i.e. time and depth).
data : https://1drv.ms/t/s!Agp9DFdh1v1vhcpwnWgylJE_aV3E8A?e=FSx2Ex
data structures:
# the first column value represent [time][depth][latitude] dimension, respectively
thetao.thetao[2][8][25][13] ## dimension value of [time][depth][latitude][longitude]
[0][0][0], 7058, 7195, 7173, 7083, 6974, 6896, 6879, 6911, 7034, 7222, 7419, 7580, 7717
[0][0][1], 6726, 6857, 6884, 6810, 6725, 6651, 6607, 6613, 6745, 6998, 7262, 7469, 7630
[0][0][2], 6426, 6512, 6564, 6544, 6492, 6443, 6385, 6346, 6422, 6631, 6904, 7129, 7331
[0][0][3], 6361, 6349, 6376, 6414, 6424, 6423, 6399, 6305, 6253, 6283, 6445, 6638, 6862
....
XZY output for each time at certain depth
# sample for the first row data
latitude longitude sst
1 1 7058
1 2 7195
1 3 7173
1 4 7083
1 5 6974
1 6 6896
1 7 6879
1 8 6911
1 9 7034
1 10 7222
1 11 7419
1 12 7580
1 13 7717
....
Upvotes: 0
Views: 87