# EXAMPLE CONFIGURATION FILE FOR IMPORTING FROM CUMULUS
#
# Copyright (c) 2009-2016 Tom Keffer <tkeffer@gmail.com> and Gary Roderick.
# See the file LICENSE.txt for your rights.

##############################################################################

# Specify our source. Available options are:
#   CSV - import obs from a single CSV format file
#   WU - import obs from a Weather Underground PWS history
#   Cumulus - import obs from a one or more Cumulus monthly log files
# Format is:
#   source = (CSV | WU | Cumulus)
source = Cumulus

##############################################################################

[Cumulus]
    # Parameters used when importing Cumulus monthly log files
    #
    # Directory containing Cumulus monthly log files to be imported. Format is:
    #   directory = full path without trailing /
    directory = C:\Users\weewx\bin\weeimport\var\cumulus

    # When importing Cumulus monthly log file data the following WeeWX database
    # fields will be populated directly by the imported data:
    #   barometer
    #   dateTime
    #   dewpoint
    #   heatindex
    #   inHumidity
    #   inTemp
    #   outHumidity
    #   outTemp
    #   radiation   (if Cumulus data available)
    #   rain        (requires Cumulus 1.9.4 or later)
    #   rainRate
    #   UV          (if Cumulus data available)
    #   windDir
    #   windGust
    #   windSpeed
    #   windchill
    #
    # The following WeeWX database fields will be populated from other
    # settings/config files:
    #   interval
    #   usUnits
    #
    # The following WeeWX database fields will be populated with values derived
    # from the imported data provided the --calc-missing command line option is
    # used during import:
    #   altimeter
    #   ET
    #   pressure
    #
    # The following WeeWX fields will be populated with derived values from the
    # imported data provided the --calc-missing command line option is used
    # during import. These fields will only be saved to the WeeWX database if
    # the WeeWX schema has been modified to accept them. Note that the pyephem
    # module is required in order to calculate maxSolarRad - refer WeeWX Users
    # Guide.
    #   appTemp
    #   cloudbase
    #   humidex
    #   maxSolarRad
    #   windrun

    # How will the interval field be determined for the imported records.
    # Available options are:
    #   derive - Derive the interval field from the timestamp of successive
    #            records. This setting is best used when the imported records
    #            are equally spaced in time and there are no missing records.
    #   conf   - Use the interval setting from weewx.conf. This setting is
    #            best used if the records to be imported have been produced by
    #            WeeWX using the same archive interval as set in weewx.conf on
    #            this machine.
    #   x      - Use a fixed interval of x minutes for every record. This
    #            setting is best used if the records to be imported are
    #            equally based in time but there are some missing records.
    #            This setting is recommended for WU imports.
    # To import Cumulus records it is recommended that the interval setting
    # be set to the value used in Cumulus as the 'data log interval'.
    # Format is:
    #   interval = (derive | conf | x)
    interval = 5
    usUnits = 16

    # Should the [StdQC] max/min limits in weewx.conf be applied to the
    # imported data. This may be useful if the source has extreme values that
    # are clearly incorrect for some observations. Available options are:
    #   True  - weewx.conf [StdQC] max/min limits are applied.
    #   False - weewx.conf [StdQC] max/min limits are not applied.
    # Format is:
    #   qc = (True | False)
    qc = False

    # Should any missing derived observations be calculated from the imported
    # data if possible. Available options are:
    #   True  - Any missing derived observations are calculated.
    #   False - Any missing derived observations are not calculated.
    # Format is:
    #   calc_missing = (True | False)
    calc_missing = True

    # Specify the character used as the date separator as Cumulus monthly log
    # files may not always use a solidus to separate date fields in the monthly
    # log files. The character must be enclosed in quotes. Must not be the same
    # as the delimiter setting below. Format is:
    #   separator = '/'
    separator = '/'

    # Specify the character used as the field delimiter as Cumulus monthly log
    # files may not always use a comma to delimit fields in the monthly log
    # files. The character must be enclosed in quotes. Must not be the same
    # as the decimal setting below. Format is:
    #   delimiter = ','
    delimiter = ';'

    # Specify the character used as the decimal point. Cumulus monthly log
    # files may not always use a fullstop character as the decimal point. The
    # character must be enclosed in quotes. Must not be the same as the
    # delimiter setting. Format is:
    #   decimal = '.'
    decimal = ','

    # Specify how imported data fields that contain invalid data (eg a numeric
    # field containing non-numeric data) are handled. Available options are:
    #   True  - The invalid data is ignored, the WeeWX target field is set to
    #           None and the import continues.
    #   False - The import is halted.
    # Format is:
    #   ignore_invalid_data = (True | False)
    # Default is True.
    ignore_invalid_data = True

    # Imported records are written to archive in transactions of tranche
    # records at a time. Increase for faster throughput, decrease to reduce
    # memory requirements. Format is:
    #   tranche = x
    # where x is an integer
    tranche = 250

    # Specify whether a UV sensor was used to produce any UV observations.
    # Available options are:
    #   True  - UV sensor was used and UV data will be imported.
    #   False - UV sensor was not used and any UV data will not be imported.
    #           UV fields will be set to None/NULL.
    # For a Cumulus monthly log file import UV_sensor should be set to False if
    # a UV sensor was NOT present when the import data was created. Otherwise
    # it may be set to True or omitted. Format is:
    #   UV_sensor = (True | False)
    UV_sensor = True

    # Specify whether a solar radiation sensor was used to produce any solar
    # radiation observations. Available options are:
    #   True  - Solar radiation sensor was used and solar radiation data will
    #           be imported.
    #   False - Solar radiation sensor was not used and any solar radiation
    #           data will not be imported. radiation fields will be set to
    #           None/NULL.
    # For a Cumulus monthly log file import solar_sensor should be set to False
    # if a solar radiation sensor was NOT present when the import data was
    # created. Otherwise it may be set to True or omitted. Format is:
    #   solar_sensor = (True | False)
    solar_sensor = True

    # For correct import of the monthly logs wee_import needs to know what
    # units are used in the imported data. The units used for temperature,
    # pressure, rain and windspeed related observations in the Cumulus monthly
    # logs are set at the Cumulus Station Configuration Screen.  The
    # [[Units]] settings below should be set to the WeeWX equivalent of the
    # units of measure used by Cumulus (eg if Cumulus used 'C' for temperature,
    # temperature should be set to 'degree_C'). Note that Cumulus does not
    # support all units used by WeeWX (eg 'mmHg') so not all WeeWX unit are
    # available options.
    [[Units]]
        temperature = degree_C      # options are 'degree_F' or 'degree_C'
        pressure    = hPa           # options are 'inHg', 'mbar' or 'hPa'
        rain        = mm            # options are 'inch' or 'mm'
        speed       = km_per_hour   # options are 'mile_per_hour',
                                    # 'km_per_hour', 'knot' or
                                    # 'meter_per_second'
