# EXAMPLE CONFIGURATION FILE FOR IMPORTING FROM WEATHERCAT
#
# Copyright (c) 2009-2020 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
#   WeatherCat - import obs from a one or more WeatherCat monthly .cat files
# Format is:
#   source = (CSV | WU | Cumulus | WeatherCat)
source = WeatherCat

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

[WeatherCat]
    # Parameters used when importing WeatherCat monthly .cat files
    #
    # Directory containing WeatherCat year folders that contain the monthly
    # .cat files to be imported. Format is:
    #   directory = full path without trailing /
    directory = /var/tmp

    # When importing WeatherCat monthly .cat file data the following WeeWX
    # database fields will be populated directly by the imported data:
    #   barometer
    #   dateTime
    #   dewpoint
    #   inHumidity
    #   inTemp
    #   outHumidity
    #   outTemp
    #   radiation   (if WeatherCat data available)
    #   rain
    #   rainRate
    #   UV          (if WeatherCat data available)
    #   windDir
    #   windGust
    #   windSpeed
    #   windchill
    #   extraTemp1  (if WeatherCat data available)
    #   extraTemp2  (if WeatherCat data available)
    #   extraTemp3  (if WeatherCat data available)
    #   extraHumid1 (if WeatherCat data available)
    #   extraHumid2 (if WeatherCat data available)
    #   SoilTemp1   (if WeatherCat data available)
    #   SoilTemp2   (if WeatherCat data available)
    #   SoilTemp3   (if WeatherCat data available)
    #   SoilTemp4   (if WeatherCat data available)
    #   SoilMoist1  (if WeatherCat data available)
    #   SoilMoist2  (if WeatherCat data available)
    #   LeafTemp1   (if WeatherCat data available)
    #   LeafTemp1   (if WeatherCat data available)
    #   LeafWet1    (if WeatherCat data available)
    #   LeafWet2    (if WeatherCat data available)
    #
    # 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
    #   heatindex
    #   pressure
    #   windrun
    #
    # 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

    # 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 there are no missing
    #            records from period being imported. Missing records will
    #            cause the interval field to be incorrectly calculated for some
    #            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 or some other means with the same archive interval as
    #            set in weewx.conf on this machine.
    #   x      - Use a fixed interval of 'x' minutes for every record where 'x'
    #            is a number. This setting is best used if the records to be
    #            imported are equally spaced in time but there are some missing
    #            records.
    # To import WeatherCat records it is recommended the interval setting be
    # set to the Sampling Rate setting used by WeatherCat as set on the Misc2
    # tab under WeatherCat Preferences unless the Adaptive Sampling Rate was
    # used in which case interval = derive should be used.
    # Format is:
    #   interval = (derive | conf | x)
    interval = x

    # 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 = True

    # 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 decimal point. WeatherCat monthly .cat
    # files may not always use a fullstop character as the decimal point. The
    # character must be enclosed in quotes. Format is:
    #   decimal = '.'
    decimal = '.'

    # 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

    # For correct import of the WeatherCat monthly .cat files wee_import needs
    # to know what units are used in the imported data. The units used by
    # WeatherCat are set via the 'Units/Misc1` tab under the WeatherCat
    # 'Preferences' menu. The WeatherCat unit preferences should be mirrored
    # below under the [[Units]] stanza and each assigned a WeeWX unit value. As
    # WeatherCat allows dewpoint to have different units to other temperatures
    # settings for both temperature and dewpoint should be specified; however,
    # if only temperature is specified then the temperature units will be
    # applied to all temperatures and dewpoint.
    #
    # An example [[Units]] stanza might be:
    # [[Units]]
    #     temperature = degree_F    # options are 'degree_F' or 'degree_C'
    #     dewpoint = degree_C       # options are 'degree_F' or 'degree_C'
    #     pressure = hPa            # options are 'inHg', 'mbar' or 'hPa'
    #     windspeed = km_per_hour   # options are 'mile_per_hour',
    #                               # 'km_per_hour', 'knot' or
    #                               # 'meter_per_second'
    #     precipitation = mm        # options are 'inch' or 'mm'
    [[Units]]
        temperature = degree_C
        dewpoint = degree_C
        pressure = hPa
        windspeed = km_per_hour
        precipitation = mm
