Dear Pytroll community
I was wondering if it is possible to resample the output of a composite. For example, the output of the DayNightCompositor.
To demonstrate was I mean in my script I do the following:
compositor = DayNightCompositor("dnc", lim_low=65., lim_high=90., day_night="day_night")
global_scene = Scene(filenames = files, reader = 'seviri_l1b_hrit')
global_scene.load(['day_microphysics'])
global_scene.load(['night_microphysics'])
composite = compositor([global_scene['day_microphysics'],global_scene['night_microphysics']])
from satpy import writers
img = writers.to_image(composite)
img.save(filename="<mypath>/test_file.tif")
This works perfectly and saves the image. However the image is the full disk, upside-down etc.
I was wandering if it is possible to resample the composite using a predefined “area” (defined in my areas.yaml file) with the next line:
new_scene = global_scene.resample(area, resampler = nearest, cache_dir=<mypath>).
If I use the line as is, only the first global_scene loaded is reasmpled (in my case global_scene.load(['day_microphysics'])).
Any help would be appreciated.
Best regards
Sakis
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pytroll/52c08580-1150-52e4-cdad-b770800343d9%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pytroll/9fc32236-1f6d-d9f2-51c7-555ceb264fdf%40gmail.com.