Trollduction is a configurable framework for satellite image batch production.
This documentation is a work in progress, but the most important bits should be present. The missing details will be added once noticed.
Trollduction builds on the principle that satellite image batch production is event based, and that different processing steps are chained together to produce the final products. This is why trollduction is a collection of independent elements of this chain, which are then communicating together through lightweight network messages.
- The different elements provided are:
- trollstalker: triggers an event message each time a file is put in given directory
- l2processor: generates rgb/channel images when an appropriate event message is received
- gatherer: gathers polar satellite granules together given an area of interest, and sends an event message when a matching group of granules has been gathered
- aapp_runner: runs the AAPP software on raw hrpt files, when such an event message is received, to generate level 1 data
- viirs_dr_runner: runs the CSPP software on Suomi-NPP RDR files to generate level 1 data
- modis_dr_runner: runs the SPA software on EOS-Terra/Aqua PDS files to generate level 1 data
- pps_runner: triggers processing of PPS main script once AAPP or CSPP is ready with a level-1 file
- Install other required packages:
and the Pytroll packages:
- mpop - select pre-master branch
- mipp - select pre-master branch
- pyresample - select pre-master branch
- posttroll - select develop branch
- pyorbital - select develop branch
- trollsift - select master branch
- trollduction - select master branch
- pytroll-schedule - select develop branch
- pyspectral - select pre-master branch
- pykdtree - select master branch
- python-geotiepoints - select develop branch
- trollimage - select develop branch
- pycoast - select pre-master branch
- Configure mpop
- modify mpop.cfg to suit your needs
- add configurations for satellites you are going to use (see the templates in mpop/etc/)
- Create Trollduction configuration files
- use examples/trollstalker_config.ini_template as a template
- use examples/l2processor_config.ini_template as a template
- save config file to your chosen place without the _template ending
- Create Trollduction product configuration file
- use examples/product_config_hrpt.xml_template as a template
- save the file to the path defined in your l2processor_config.ini without the _template ending
- define your output_dir in the xml file
- topic from the trollstalker_config.ini must be included in the list of topics in l2processor_config.ini
- Create logging configurations for trollduction and trollstalker
- use examples/l2processor_logging.ini_template and examples/trollstalker_logging.ini_template as templates
- check the log filename (by default logs go to /tmp/ directory)
- save these configs to the path defined in your l2processor_config.ini and trollstalker_config.ini without the _template ending
- Start posttroll/bin/nameserver
- this will register the different subscribers on the network and relay the messages between different processes
- Start trollduction/bin/trollstalker.py
- file watcher that sends messages of new files available for processing
- for example: ./trollstalker.py -c /path/to/trollstalker_config.ini -C noaa_hrpt
- Start Trollduction trollduction/bin/l2processor.py
- ./l2processor.py -c /path/to/l2processor_config.ini -C noaa_hrpt
- this should print your configuration and stop to wait for new messages
Copy a suitable file to your data input directory
Check the output directory for images
Listener module for Trollduction.
PyTroll listener class for reading messages for Trollduction
Add message to queue
Create a subscriber instance using specified addresses and message types.
Stop subscriber and delete the instance
XML reader for Trollduction system and product configuration files.
Return a copy of the data.
Return the requested info.
Class for reading and storing product lists.
Check area groups.
Parse product list XML file.
Retrieves the filepattern configuration file for trollstalker, and returns the parsed XML as a dictionary. Optional argument fname can be used to specify the file. If fname is None, the systemwide file is read.
Read XML file and return the root tree.
Parse the given XML file to dictionary.
PanusTimedRotatingFileHandler(template, *args, **kwargs)¶
Like TimedRotatingFileHandler with a custom filename template.
do a rollover; If there is a backup count, then we have to get a list of matching filenames, sort them and remove the oldest ones.
Determine the files to delete when rolling over.
More specific than the earlier method, which assumed the date to be a suffix.