Skip to content

Index function for requested indices (fixes #282 #283)

Index function to compute thresholded occurrences. Name: CountThresholdedOccurrences, suggestion for another name?

Use -f to import metadata file with index definitions:

indices:
  txgt0rrge1:
    reference: SMHI
    default_period: annual
    output:
      var_name: "txgt0rrge1"
      standard_name:
      proposed_standard_name: 
      long_name: "Number of precipitation days with daily minimum temperature above zero degC (Precip >= 1 and Tmin > 0)"
      units: "1"
      cell_methods:
        - time: sum within days
        - time: sum over days
    input:
      low_data: tasmin
      high_data: pr
    index_function:
      name: count_thresholded_occurrences
      parameters:
        threshold_low_data:
          kind: quantity
          standard_name: air_temperature
          long_name: "Level crossing value for daily air temperature"
          data: 0
          units: "degree_Celsius"
        threshold_high_data:
          kind: quantity
          standard_name: lwe_precipitation_rate
          long_name: "Wet day threshold"
          data: 1
          units: "mm day-1"
        logical_condition:
            kind: logical
            base_operator:
            logical:
              and:
                - low_data > threshold_low_data
                - high_data >= threshold_high_data
    ET:
      short_name:
      long_name:
      definition:
      comment:

  txgt13lt18:
    reference: SMHI
    default_period: annual
    output:
      var_name: "txgt13lt18"
      standard_name:
      proposed_standard_name: 
      long_name: "Number of days with daily maximum temperature above thirteen degC and below eighteen degC (13 < Tmax < 18)"
      units: "1"
      cell_methods:
        - time: sum within days
        - time: sum over days
    input:
      data: tasmax
    index_function:
      name: count_thresholded_occurrences
      parameters:
        threshold_low_data:
          kind: quantity
          standard_name: air_temperature
          long_name: "Level crossing value for daily air temperature"
          data: 13
          units: "degree_Celsius"
        threshold_high_data:
          kind: quantity
          standard_name: air_temperature
          long_name: "Level crossing value for daily air temperature"
          data: 18
          units: "degree_Celsius"
        logical_condition:
          kind: logical
          base_operator:
          logical:
            and:
              - low_data > threshold_low_data
              - high_data < threshold_high_data

    ET:
      short_name:
      long_name:
      definition:
      comment:
Edited by Carolina Nilsson

Merge request reports