variables:
  air_density:
    canonical_units: kg m-3
    cell_methods: "time: mean"
    description: Air density.
    dimensions: "[density]"
    standard_name: air_density
  areacello:
    canonical_units: m2
    cell_methods: "area: sum"
    description: Cell area (over the ocean).
    dimensions: "[area]"
    standard_name: cell_area
  discharge:
    canonical_units: m3 s-1
    cell_methods: "time: mean"
    description: The amount of water, in all phases, flowing in the river channel and flood plain.
    standard_name: water_volume_transport_in_river_channel
  evspsblpot:
    canonical_units: kg m-2 s-1
    cell_methods: "time: mean"
    description: Potential evapotranspiration flux.
    dimensions: "[discharge]"
    standard_name: water_potential_evapotranspiration_flux
    data_flags:
      - negative_accumulation_values:
  hurs:
    canonical_units: '%'
    cell_methods: "time: mean"
    description: Relative humidity.
    dimensions: "[]"
    standard_name: relative_humidity
    data_flags:
      - percentage_values_outside_of_bounds:
  huss:
    canonical_units: '1'
    cell_methods: "time: mean"
    description: Specific humidity.
    dimensions: "[]"
    standard_name: specific_humidity
  lat:
    canonical_units: degrees_north
    description: Latitude.
    dimensions: "[]"
    standard_name: latitude
  pr:
    canonical_units: kg m-2 s-1
    cell_methods: "time: mean"
    description: Surface precipitation flux (all phases).
    dimensions: "[precipitation]"
    standard_name: precipitation_flux
    data_flags:
      - negative_accumulation_values:
      - very_large_precipitation_events:
          thresh: 300 mm d-1
      - values_op_thresh_repeating_for_n_or_more_days:
          op: eq
          n: 5
          thresh: 5 mm d-1
      - values_op_thresh_repeating_for_n_or_more_days:
          op: eq
          n: 10
          thresh: 1 mm d-1
  prc:
    canonical_units: kg m-2 s-1
    cell_methods: "time: mean"
    description: Precipitation flux due to the convection schemes of the model (all phases).
    dimensions: "[precipitation]"
    standard_name: convective_precipitation_flux
    data_flags:
      - negative_accumulation_values:
  prsn:
    canonical_units: kg m-2 s-1
    cell_methods: "time: mean"
    description: Surface snowfall flux.
    dimensions: "[mass]/([area][time])"  # Not precipitation because it's not referring to liquid water
    standard_name: snowfall_flux
    data_flags:
      - negative_accumulation_values:
  prsnd:
    canonical_units: m s-1
    cell_methods: "time: mean"
    description: Surface snowfall rate.
    dimensions: "[length]/[time]"
    data_flags:
      - negative_accumulation_values:
  ps:
    canonical_units: Pa
    cell_methods: "time: mean"
    description: Air pressure at surface
    standard_name: surface_air_pressure
    data_flags:
      - values_repeating_for_n_or_more_days:
          n: 5
  psl:
    canonical_units: Pa
    cell_methods: "time: mean"
    description: Air pressure at sea level.
    dimensions: "[pressure]"
    standard_name: air_pressure_at_sea_level
    data_flags:
      - values_repeating_for_n_or_more_days:
          n: 5
  rls:
    canonical_units: W m-2
    cell_methods: "time: mean"
    description: Net longwave radiation.
    dimensions: "[radiation]"
    standard_name: surface_net_downward_longwave_flux
  rss:
    canonical_units: W m-2
    cell_methods: "time: mean"
    description: Net shortwave radiation.
    dimensions: "[radiation]"
    standard_name: surface_net_downward_shortwave_flux
  rlds:
    canonical_units: W m-2
    cell_methods: "time: mean"
    description: Incoming longwave radiation.
    dimensions: "[radiation]"
    standard_name: surface_downwelling_longwave_flux
  rsds:
    canonical_units: W m-2
    cell_methods: "time: mean"
    description: Incoming shortwave radiation.
    dimensions: "[radiation]"
    standard_name: surface_downwelling_shortwave_flux
  rlus:
    canonical_units: W m-2
    cell_methods: "time: mean"
    description: Outgoing longwave radiation.
    dimensions: "[radiation]"
    standard_name: surface_upwelling_longwave_flux
  rsus:
    canonical_units: W m-2
    cell_methods: "time: mean"
    description: Outgoing shortwave radiation.
    dimensions: "[radiation]"
    standard_name: surface_upwelling_shortwave_flux
  sfcWind:
    canonical_units: m s-1
    cell_methods: "time: mean"
    description: Surface wind speed.
    dimensions: "[speed]"
    standard_name: wind_speed
    data_flags:
      - wind_values_outside_of_bounds:
          upper: 46.0 m s-1
          lower: 0 m s-1
      - values_op_thresh_repeating_for_n_or_more_days:
          op: gt
          thresh: 2.0 m s-1
          n: 6
  sfcWindmax:
    canonical_units: m s-1
    cell_methods: "time: max"
    description: Surface maximum wind speed.
    dimensions: "[speed]"
    standard_name: wind_speed
    data_flags:
      - wind_values_outside_of_bounds:
          upper: 46.0 m s-1
          lower: 0 m s-1
      - values_op_thresh_repeating_for_n_or_more_days:
          op: gt
          thresh: 2.0 m s-1
          n: 6
  sfcWindfromdir:
    cmip6: False
    canonical_units: degree
    cell_methods: "time: mean"
    description: Surface wind direction of provenance.
    dimensions: "[]"
    standard_name: wind_from_direction
  siconc:
    canonical_units: '%'
    cell_methods: "time: mean"
    description: Sea ice concentration (area fraction).
    dimensions: "[]"
    standard_name: sea_ice_area_fraction
    data_flags:
      - percentage_values_outside_of_bounds:
  smd:
    canonical_units: mm d-1
    cell_methods: "time: mean"
    description: Soil moisture deficit.
    dimensions: "[precipitation]"
    standard_name: soil_moisture_deficit
  snc:
    canonical_units: '%'
    cell_methods: "time: mean"
    description: Surface area fraction covered by snow.
    dimensions: "[]"
    standard_name: surface_snow_area_fraction
    data_flags:
      - percentage_values_outside_of_bounds:
  snd:
    canonical_units: m
    cell_methods: "time: mean"
    description: Surface snow thickness.
    dimensions: "[length]"
    standard_name: surface_snow_thickness
    data_flags:
      - negative_accumulation_values:
  snr:
    canonical_units: kg m-3
    cell_methods: "time: mean"
    description: Surface snow density.
    dimensions: "[density]"
    standard_name: surface_snow_density
  snw:
    canonical_units: kg m-2
    cell_methods: "time: mean"
    description: Surface snow amount.
    dimensions: "[mass]/[area]"
    standard_name: surface_snow_amount
    data_flags:
      - negative_accumulation_values:
  sund:
    cmip6: False
    canonical_units: s
    cell_methods: "time: mean"
    description: Duration of sunshine.
    dimensions: "[time]"
    standard_name: duration_of_sunshine
  swe:
    canonical_units: m
    cell_methods: "time: mean"
    description: Surface snow water equivalent amount
    dimensions: "[length]"
    standard_name: lwe_thickness_of_snow_amount
    data_flags:
      - negative_accumulation_values:
  streamflow:
    canonical_units: m3 s-1
    cell_methods: "time: mean"
    description: The amount of water, in all phases, flowing in the river channel and flood plain.
    standard_name: water_volume_transport_in_river_channel
  tas:
    canonical_units: K
    cell_methods: "time: mean"
    description: Mean surface temperature.
    dimensions: "[temperature]"
    standard_name: air_temperature
    data_flags:
      - temperature_extremely_high:
          thresh: 60 degC
      - temperature_extremely_low:
          thresh: -90 degC
      - tas_exceeds_tasmax:
      - tas_below_tasmin:
      - values_repeating_for_n_or_more_days:
          n: 5
      - outside_n_standard_deviations_of_climatology:
          n: 5
          window: 5
  tasmax:
    canonical_units: K
    cell_methods: "time: maximum"
    description: Maximum surface temperature.
    dimensions: "[temperature]"
    standard_name: air_temperature
    data_flags:
      - temperature_extremely_high:
          thresh: 60 degC
      - temperature_extremely_low:
          thresh: -90 degC
      - tas_exceeds_tasmax:
      - tasmax_below_tasmin:
      - values_repeating_for_n_or_more_days:
          n: 5
      - outside_n_standard_deviations_of_climatology:
          n: 5
          window: 5
  tasmin:
    canonical_units: K
    cell_methods: "time: minimum"
    description: Minimum surface temperature.
    dimensions: "[temperature]"
    standard_name: air_temperature
    data_flags:
      - temperature_extremely_high:
          thresh: 60 degC
      - temperature_extremely_low:
          thresh: -90 degC
      - tasmax_below_tasmin:
      - tas_below_tasmin:
      - values_repeating_for_n_or_more_days:
          n: 5
      - outside_n_standard_deviations_of_climatology:
          n: 5
          window: 5
  tdps:
    canonical_units: K
    cell_methods: "time: mean"
    description: Mean surface dew point temperature.
    dimensions: "[temperature]"
    standard_name: dew_point_temperature
  thickness_of_rainfall_amount:
    canonical_units: m
    cell_methods: "time: sum"
    description: >
      Accumulated depth of rainfall, i.e. the thickness of a layer of liquid water
      having the same mass per unit area as the rainfall amount.
    dimensions: "[length]"
    standard_name: thickness_of_rainfall_amount
  ua:
    canonical_units: m s-1
    cell_methods: "time: mean"
    description: Eastward component of the wind velocity (in the atmosphere).
    dimensions: "[speed]"
    standard_name: eastward_wind
  uas:
    canonical_units: m s-1
    cell_methods: "time: mean"
    description: Eastward component of the wind velocity (at the surface).
    dimensions: "[speed]"
    standard_name: eastward_wind
  vas:
    canonical_units: m s-1
    cell_methods: "time: mean"
    description: Northward component of the wind velocity (at the surface).
    dimensions: "[speed]"
    standard_name: northward_wind
  wind_speed:
    canonical_units: m s-1
    cell_methods: "time: mean"
    description: Wind speed.
    dimensions: "[speed]"
    standard_name: wind_speed
  wsgsmax:
    cmip6: False
    canonical_units: m s-1
    cell_methods: "time: maximum"
    description: Maximum surface wind speed.
    dimensions: "[speed]"
    standard_name: wind_speed_of_gust
    data_flags:
      - wind_values_outside_of_bounds:
          upper: 76.0 m s-1
          lower: 0 m s-1
      - values_op_thresh_repeating_for_n_or_more_days:
          op: gt
          thresh: 4.0 m s-1
          n: 5
conversions:
  amount2rate:  # Standard names allowed in automatic `amount2rate` and `rate2amount` conversions.
    dimensionality:  # amount.dimensionality / flux.dimensionality
      time: 1
    valid_names:
    # First element of each entry is the amount, second is the flux (or rate)
      - [convective_precipitation_amount, convective_precipitation_flux]
      - [convective_rainfall_amount, convective_rainfall_flux]
      - [convective_snowfall_amount, convective_snowfall_flux]
      - [graupel_and_hail_fall_amount, graupel_and_hail_fall_flux]
      - [graupel_fall_amount, graupel_fall_flux]
      - [hail_fall_amount, hail_fall_flux]
      - [lwe_thickness_of_convective_precipitation_amount, lwe_convective_precipitation_rate]
      - [lwe_thickness_of_convective_snowfall_amount, lwe_convective_snowfall_rate]
      - [lwe_thickness_of_precipitation_amount, lwe_precipitation_rate]
      - [lwe_thickness_of_snowfall_amount, lwe_snowfall_rate]
      - [lwe_thickness_of_stratiform_precipitation_amount, lwe_stratiform_precipitation_rate]
      - [lwe_thickness_of_stratiform_snowfall_amount, lwe_stratiform_snowfall_rate]
      - [thickness_of_convective_rainfall_amount, convective_rainfall_rate]
      - [precipitation_amount, precipitation_flux]
      - [rainfall_amount, rainfall_flux]
      - [thickness_of_rainfall_amount, rainfall_rate]
      - [runoff_amount, runoff_flux]
      - [snowfall_amount, snowfall_flux]
      - [stratiform_graupel_fall_amount, stratiform_graupel_flux]
      - [stratiform_precipitation_amount, stratiform_precipitation_flux]
      - [stratiform_rainfall_amount, stratiform_rainfall_flux]
      - [thickness_of_stratiform_rainfall_amount, stratiform_rainfall_rate]
      - [stratiform_snowfall_amount, stratiform_snowfall_flux]
      - [subsurface_runoff_amount, subsurface_runoff_flux]
      - [surface_runoff_amount, surface_runoff_flux]
      - [surface_snow_melt_amount, surface_snow_melt_flux]
      - [transpiration_amount, transpiration_flux]
      - [water_potential_evaporation_amount, water_potential_evaporation_flux]
  amount2lwethickness:
    # Standard names of liquid water quantities, thus allowed in thickness to amount and rate to flux conversions
    # First element of each entry is the mass over area (amount, flux), second is the thickness (thickness, rate)
    dimensionality:  # amount.dimensionality / thickness.dimensionality
      mass: 1
      length: -3
    valid_names:
      - [convective_precipitation_flux, lwe_convective_precipitation_rate]
      - [convective_precipitation_amount, lwe_thickness_of_convective_precipitation_amount]
      - [convective_rainfall_amount, thickness_of_convective_rainfall_amount]
      - [convective_rainfall_flux, convective_rainfall_rate]
      - [convective_snowfall_amount, lwe_thickness_of_convective_snowfall_amount]
      - [convective_snowfall_flux, lwe_convective_snowfall_rate]
      - [precipitation_flux, lwe_precipitation_rate]
      - [snowfall_flux, lwe_snowfall_rate]
      - [stratiform_precipitation_flux, lwe_stratiform_precipitation_rate]
      - [stratiform_snowfall_flux, lwe_stratiform_snowfall_rate]
      - [canopy_water_amount, lwe_thickness_of_canopy_water_amount]
      - [precipitation_amount, lwe_thickness_of_precipitation_amount]
      - [snowfall_amount, lwe_thickness_of_snowfall_amount]
      - [stratiform_precipitation_amount, lwe_thickness_of_stratiform_precipitation_amount]
      - [stratiform_snowfall_amount, lwe_thickness_of_stratiform_snowfall_amount]
      - [surface_snow_amount, lwe_thickness_of_surface_snow_amount]
      - [water_evaporation_amount, lwe_thickness_of_water_evaporation_amount]
      - [rainfall_amount, thickness_of_rainfall_amount]
      - [rainfall_flux, rainfall_rate]
      - [stratiform_rainfall_amount, thickness_of_stratiform_rainfall_amount]
      - [stratiform_rainfall_flux, stratiform_rainfall_rate]
