E
E
Elena Skorokhod2021-07-06 12:00:23
Python
Elena Skorokhod, 2021-07-06 12:00:23

How to extract part of information from OLCI satellite data in .nc format in python?

Hello! I'm trying to learn python. I need to extract some of the data from a .nc file and save it in a tabular form (an OLCI satellite color scanner, the trouble is that this is not 1 file with all the information, but a whole folder of nc files, separately coordinates, separately flags, separately products and etc.). After spending ages on the internet, I came up with satpy.

At the moment my script looks like this:

import satpy
from satpy import Scene, find_files_and_readers
from datetime import datetime
import xarray as xr

#Поиск и чтение файлов формата .nc OLCI L2 
files = find_files_and_readers(sensor='olci',
                                             start_time=datetime(2019, 5, 9), #YYYY, MM, DD
                                             end_time=datetime(2019, 5, 11),
                                             base_dir="C:/Users/79788/OLCI", #здесь все просто, папка, где находятся файлы nc 
                                             reader='olci_l2') #указываем каким образом читать файл 'availible_readers'


Through scn.available_dataset_ids() I got to the list of data.
Of these, I need 'latitude', 'longtitude', 'chl_nn', 'chl_oc4me', 'iop_nn', 'trsp', 'tsm_nn', 'wqsf'
How to do this correctly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question