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
Saving each scene in a separate image file #1087
Comments
@anikfal thank you for the bug report. This is actually a know issue that we haven't solved yet, but doesn't come from the @djhoese and @sfinkens have been working on grouping files for the |
@mraspaud Thank you for your reply.
Yes. They are 4 sample data files (MSG SEVIRI) with 15 minute intervals between each time slots.
I found it better to separate my favorite files in another directory, instead of indicating the time range. Because Anyway, in my case (Linux OS), by using a simple shell script and modifying the python code, it is possible to workaround this issue: New python code (code1.py) to be used in the shell script from satpy.scene import Scene
from glob import glob
import sys
files = glob(sys.argv[1])
scn = Scene(reader="seviri_l1b_nc", filenames=files)
composite = 'dust'
scn.load([composite])
scn.save_datasets(writer='simple_image') Shell script (code2.sh) to run code1.py for multiple data files for filename in my_directory/W_XX-EUMETSAT-Darmstadt,VIS+IR+HRV+IMAGERY,MSG1+SEVIRI_C_EUMG_2019040106*
do
python code1.py $filename
done |
@anikfal There is some python code to handle this, but I think for your use case your shell script might be the simplest solution. The MultiScene class has a Glad you got something working. |
I'm closing this as it seems to work now for the OP. I opened another issue for the start and end time limits not working. |
Description
By using
scn.save_datasets(writer='simple_image')
, all the scenes would be saved into one single image file. Rather I want each scene to be saved in a separate file.Code
Output showing all the scenes saved in one single file
The text was updated successfully, but these errors were encountered: