Config file - multiply-org/multiply-core GitHub Wiki

The config file is a file in YAML format ( https://en.wikipedia.org/wiki/YAML ) that lists parameters that are required during processing by a component. An (early) example of the config file looks like this:

General:
    - roi : POLYGON ( (0, 0), (0,1 )) # blahblah
    - start_time: 2017-01-01
    - end_time: 2017-12-31
    - time_interval: 1 # 1 day
    - spatial_resolution : 10 # metres
    - state_mask: /path/to/my/state_mask.tif # Or shape?
    - output_directory_root: /some/where/
    # - output_prefix: my_test_33

Inference:	# inference config
    - parameters:
        - LAI
        - soil_moisture
    - optical_operator_library: some_operator.nc   # Optional
    - sar_operator_library: some_other_operator.nc # Optional
    - a: identity
    - inflation: 1e3`

The parameters in the section 'General' are required by more than one component. They shall ensure that parameter values are equal across all components. Below the 'General' section there can be component-specific sections which can hold component-specific parameters.

When a component is called with a config file, it will first check whether all mandatory parameters are provided in a valid state. If they are not, an exception is thrown. Every component shall expect that the config file sets all parameters, but also offer command line input parameters. When a parameter is declared both in the config file and as an additional CLI parameter, the CLI value will be used. Users are responsible for setting up the config files correctly (at a later point in the project when we have a GUI, config files will be created by the platform).

Updated version for prior_engine:

General:
....
Inference:
...
Prior:
# Prior section conventions

# - 1. sub-level contains all potential variables (sm, roughness, lai, ..)
#   which are asked for/being inferred from Orchestrator/Inferrence Engine
#   and for which prior information is provided.
# - 2. sub-level contains prior type (ptype). These can be commented out
#   to be omitted. 

  General:
    # directory for Joris' prior files (in General section because used for more variables):
    directory_data: ../aux_data/Static/Vegetation/
  sm:
    climatology:
      climatology_dir: ../aux_data/Climatology/SoilMoisture/
    # dynamic:
    #     type: dynamic
    #     model:
    #         - API
    #         - other
    # recent:
    #   aux_data = ...
    # static:
    #       type: static
  lai:
    database: 
  cab:
    database:
    #climatology:
    #  database: ../aux_data/new_geotiff
    # model: