-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read swath in loop #2703
Comments
Could you describe your directory structure more? It sounds like all you want is: from glob import glob
for swath_dir in glob("dir_of_all_swaths/*"):
files = find_files_and_readers(base_dir=swath_dir, reader="slstr_l1b")
scn = Scene(filenames=files, reader="slstr_l1b") Note I have no experience with this reader and its files so let me know if I'm completely wrong. Most people familiar with this reader might have started their holidays already though so we might have to wait a while for a better answer. |
hi, the code you mention is also effective for one swath. Maybe I should explain the structure bit better... the swath files are as follows ...
the codes above take hope this is not reader specific |
If the glob string in my code is |
not exactly! the |
I'm not sure I understand the question fully, but would something like this be what you need?
|
hi, not exactly!! |
Are your "unique_id" directories the directories ending in ".SEN3"? If so, then I think you can avoid using from glob import glob
for swath_dir in glob("dir_of_all_swaths/*.SEN3"):
scn = Scene(filenames=glob(os.path.join(swath_dir, "*.nc")), reader="slstr_l1b") That is, I expect |
hi, @djhoese that does work, thanks and cheers both @simonrp84 @djhoese |
hi I am reading slstr l1b product, using satpy by the following
when I do the above, I am reading all swath folders on the dates, but I want to iterate through the loop through each folder and extract outpout, and save. is there any easy way to find the swath folders one by one and save the output?
The text was updated successfully, but these errors were encountered: