Welcome to trollduction’s documentation!¶
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.
How does Trollduction work?¶
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 images when an appropriate event message is received
- gatherer: gathers polar satellite granules together given an area of interest, and send an event messages when a matching group of granules has been gathered
- aapp_runner: runs the NWP-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
Setting things up cheat sheet¶
- Install other required packages
- mpop - select pre-master branch
- posttroll - select develop branch
- trollduction - select feature-aapp-and-npp branch
- pytroll-schedule - select develop branch
- Configure mpop
- modify mpop.cfg to suit your needs
- add configurations for satellites you are going to use
- 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 trollduction/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
- Create logging configurations for trollduction and trollstalker
- use trollduction/examples/td_logging.ini_template and trollduction/examples/stalker_logging.ini_tempalate as templates
- check the log filename (by default logs go to /tmp/ directory)
- save these configs to the path defined in you l2processor_config.ini and trollstalker_config.ini without the _template ending
- Start posttroll/bin/nameserver
- this will register the different components on the network
- 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
Indices and tables¶
Listener module for Trollduction.
- class trollduction.listener.Listener(topics=None, queue=None)¶
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.
- class trollduction.xml_read.ProductList(fname)¶
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.
- trollduction.xml_read.parse_xml(tree, also_empty=False)¶
Parse the given XML file to dictionary.
- class trollduction.custom_handler.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.