sensor_name: visir
composite_identification_keys:
  name:
    required: true
  resolution:
    transitive: false

modifiers:
  sunz_corrected:
    modifier: !!python/name:satpy.modifiers.SunZenithCorrector
    optional_prerequisites:
    - solar_zenith_angle

  effective_solar_pathlength_corrected:
    modifier: !!python/name:satpy.modifiers.EffectiveSolarPathLengthCorrector
    optional_prerequisites:
      - solar_zenith_angle

  co2_corrected:
    modifier: !!python/name:satpy.modifiers.CO2Corrector
    prerequisites:
    - 10.8
    - 13.4

  nir_reflectance:
    modifier: !!python/name:satpy.modifiers.NIRReflectance
    prerequisites:
    - 11
    optional_prerequisites:
    - solar_zenith_angle
    - 13.4
    sunz_threshold: 85.0

  nir_emissive:
    modifier: !!python/name:satpy.modifiers.NIREmissivePartFromReflectance
    prerequisites:
    - 11
    optional_prerequisites:
    - solar_zenith_angle
    - 13.4
    sunz_threshold: 85.0
  atm_correction:
    modifier: !!python/name:satpy.modifiers.PSPAtmosphericalCorrection
    optional_prerequisites:
    - satellite_zenith_angle

  rayleigh_corrected:
    modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
    atmosphere: us-standard
    aerosol_type: rayleigh_only
    prerequisites:
    - wavelength: 0.67
      modifiers: [sunz_corrected]
    optional_prerequisites:
    - satellite_azimuth_angle
    - satellite_zenith_angle
    - solar_azimuth_angle
    - solar_zenith_angle

  rayleigh_corrected_marine_tropical:
    modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
    atmosphere: tropical
    aerosol_type: marine_tropical_aerosol
    prerequisites:
    - wavelength: 0.67
      modifiers: [sunz_corrected]
    optional_prerequisites:
    - satellite_azimuth_angle
    - satellite_zenith_angle
    - solar_azimuth_angle
    - solar_zenith_angle

  rayleigh_corrected_desert:
    modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
    atmosphere: tropical
    aerosol_type: desert_aerosol
    prerequisites:
    - wavelength: 0.67
      modifiers: [sunz_corrected]
    optional_prerequisites:
    - satellite_azimuth_angle
    - satellite_zenith_angle
    - solar_azimuth_angle
    - solar_zenith_angle

  rayleigh_corrected_land:
    modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
    atmosphere: us-standard
    aerosol_type: continental_average_aerosol
    prerequisites:
    - wavelength: 0.67
      modifiers: [sunz_corrected]
    optional_prerequisites:
    - satellite_azimuth_angle
    - satellite_zenith_angle
    - solar_azimuth_angle
    - solar_zenith_angle

composites:

  airmass:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - wavelength: 6.2
      - wavelength: 7.3
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - wavelength: 9.7
        - wavelength: 10.8
    - wavelength: 6.2
    standard_name: airmass

  ash:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 12.0
      - 10.8
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 10.8
      - 8.7
    - 10.8
    standard_name: ash

  cloudtop:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - 3.9
    - 10.8
    - 12.0
    standard_name: cloudtop

  convection:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - 6.2
        - 7.3
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - 3.9
        - 10.8
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - 1.6
        - 0.6
    standard_name: convection

  snow:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 0.8
      modifiers: [sunz_corrected]
    - wavelength: 1.63
      modifiers: [sunz_corrected]
    - wavelength: 3.9
      modifiers: [nir_reflectance]
    standard_name: snow

  day_microphysics:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 0.85
      modifiers: [sunz_corrected]
    - wavelength: 3.9
      modifiers: [nir_reflectance]
    - 10.8
    standard_name: day_microphysics

  dust:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 12.0
      - 10.8
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 10.8
      - 8.7
    - 10.8
    standard_name: dust

  fog:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 12.0
      - 10.8
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 10.8
      - 8.7
    - 10.8
    standard_name: fog

  green_snow:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - 1.63
    - 0.635
    - 10.8
    standard_name: green_snow

  natural_color_raw:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 1.63
    - wavelength: 0.85
    - wavelength: 0.635
    standard_name: natural_color

  natural_color:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 1.63
      modifiers: [sunz_corrected]
    - wavelength: 0.85
      modifiers: [sunz_corrected]
    - wavelength: 0.635
      modifiers: [sunz_corrected]
    standard_name: natural_color

  night_fog:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 12.0
      - 10.8
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 10.8
      - 3.9
    - 10.8
    standard_name: night_fog

  overview_raw:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - 0.6
    - 0.8
    - 10.8
    standard_name: overview

  overview:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 0.6
      modifiers: [sunz_corrected]
    - wavelength: 0.8
      modifiers: [sunz_corrected]
    - 10.8
    standard_name: overview

  true_color_raw:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - 0.65
    - 0.5
    - 0.45
    standard_name: true_color

  natural_with_night_fog:
    compositor: !!python/name:satpy.composites.DayNightCompositor
    standard_name: natural_with_night_fog
    prerequisites:
      - natural_color
      - night_fog
      - solar_zenith_angle

  precipitation_probability:
    compositor: !!python/name:satpy.composites.cloud_products.PrecipCloudsRGB
    prerequisites:
      - pc_precip_light
      - pc_precip_moderate
      - pc_precip_intense
      - pc_status_flag
    standard_name: precipitation_probability

  cloudmask:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - cma
    - cma_pal
    standard_name: cloudmask

  cloudmask_extended:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - cma_extended
    - cma_extended_pal
    standard_name: cloudmask

  cloudmask_probability:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - cmaprob
    - cmaprob_pal
    standard_name: cloudmask_probability

  cloudtype:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - ct
    - ct_pal
    standard_name: cloudtype

  cloud_top_height:
    compositor: !!python/name:satpy.composites.cloud_products.CloudTopHeightCompositor
    prerequisites:
    - ctth_alti
    - ctth_alti_pal
    - ctth_status_flag
    standard_name: cloud_top_height

  cloud_top_pressure:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - ctth_pres
    - ctth_pres_pal
    standard_name: cloud_top_pressure

  cloud_top_temperature:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - ctth_tempe
    - ctth_tempe_pal
    standard_name: cloud_top_temperature

  cloud_top_phase:
    compositor: !!python/name:satpy.composites.PaletteCompositor
    prerequisites:
    - cmic_phase
    - cmic_phase_pal
    standard_name: cloud_top_phase

  cloud_drop_effective_radius:
    compositor: !!python/name:satpy.composites.ColorizeCompositor
    prerequisites:
    - cmic_reff
    - cmic_reff_pal
    standard_name: cloud_drop_effective_radius

  cloud_optical_thickness:
    compositor: !!python/name:satpy.composites.ColorizeCompositor
    prerequisites:
    - cmic_cot
    - cmic_cot_pal
    standard_name: cloud_optical_thickness

  cloud_water_path:
    compositor: !!python/name:satpy.composites.ColorizeCompositor
    prerequisites:
    - cmic_cwp
    - cmic_cwp_pal
    standard_name: cloud_water_path

  ice_water_path:
    compositor: !!python/name:satpy.composites.ColorizeCompositor
    prerequisites:
    - cmic_iwp
    - cmic_iwp_pal
    standard_name: ice_water_path

  liquid_water_path:
    compositor: !!python/name:satpy.composites.ColorizeCompositor
    prerequisites:
    - cmic_lwp
    - cmic_lwp_pal
    standard_name: liquid_water_path

  night_microphysics:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 12.0
      - 10.8
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
      - 10.8
      - 3.9
    - 10.8
    standard_name: night_microphysics

  ir108_3d:
    compositor: !!python/name:satpy.composites.GenericCompositor
    standard_name: ir108_3d
    prerequisites:
      - wavelength: 10.8

  ir_cloud_day:
    standard_name: ir_cloud_day
    compositor: !!python/name:satpy.composites.CloudCompositor
    prerequisites:
      - 10.8
    transition_min: 258.15
    transition_max: 298.15
    transition_gamma: 3.0

  natural_enh:
    compositor: !!python/name:satpy.composites.NaturalEnh
    standard_name: natural_enh
    prerequisites:
    - wavelength: 1.6
      modifiers: [sunz_corrected]
    - wavelength: 0.8
      modifiers: [sunz_corrected]
    - wavelength: 0.6
      modifiers: [sunz_corrected]

  _night_background:
    compositor: !!python/name:satpy.composites.StaticImageCompositor
    standard_name: night_background
    url: "https://neo.gsfc.nasa.gov/archive/blackmarble/2016/global/BlackMarble_2016_01deg_geo.tif"
    known_hash: "sha256:146c116962677ae113d9233374715686737ff97141a77cc5da69a9451315a685"  # optional

  _night_background_hires:
    compositor: !!python/name:satpy.composites.StaticImageCompositor
    standard_name: night_background
    url: "https://neo.gsfc.nasa.gov/archive/blackmarble/2016/global/BlackMarble_2016_3km_geo.tif"
    known_hash: "sha256:e915ef2a20d84e2a59e1547d3ad564463ad4bcf22bfa02e0e0b8ed1cd722e9c0"  # optional

  cloud_phase_distinction:
    description: >
      Day Cloud Phase Distinction RGB, for GOESR: NASA, NOAA
      Cloud Type RGB, for  EUMETSAT (https://www.eumetsat.int/website/home/Images/ImageLibrary/DAT_3958037.html)
    references:
      CIRA Quick Guide: https://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_DayCloudPhaseDistinction_final_v2.pdf
      Cloud Type recipe and typical colours: https://www.eumetsat.int/fr/media/45659
    ## it uses the default used in etc/enhancements/generic.yaml
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - wavelength: 10.3
      - wavelength: 0.64
        modifiers: [sunz_corrected, rayleigh_corrected]
      - wavelength: 1.6
        modifiers: [sunz_corrected]
    standard_name: cloud_phase_distinction

  cloud_phase_distinction_raw:
    description: >
      same as cloud_phase_distinction
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - wavelength: 10.3
      - wavelength: 0.64
      - wavelength: 1.6
    standard_name: cloud_phase_distinction

  cloud_phase:
    description: >
      EUMETSAT Cloud Phase RGB product
    references:
      EUMETRAIN Quick Guide: https://resources.eumetrain.org/rgb_quick_guides/quick_guides/CloudPhaseRGB.pdf
      Recipe : https://resources.eumetrain.org/RGBguide/recipes/RGB_recipes.pdf
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - wavelength: 1.6
        modifiers: [sunz_corrected]
      - wavelength: 2.25
        modifiers: [sunz_corrected]
      - wavelength: 0.67
        modifiers: [sunz_corrected, rayleigh_corrected]
    standard_name: cloud_phase

  cloud_phase_raw:
    description: >
      same as cloud_phase RGB product, without modifiers
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - wavelength: 1.6
      - wavelength: 2.25
      - wavelength: 0.67
    standard_name: cloud_phase

  cimss_cloud_type:
    description: >
      Cloud Type RGB, candidate for standard FCI RGB
    references:
      EUMETRAIN Quick Guide: https://resources.eumetrain.org/rgb_quick_guides/quick_guides/CloudTypeRGB.pdf
      Recipe : https://resources.eumetrain.org/RGBguide/recipes/RGB_recipes.pdf
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - wavelength: 1.38
        modifiers: [sunz_corrected]
      - wavelength: 0.64
        modifiers: [sunz_corrected]
      - wavelength: 1.61
        modifiers: [sunz_corrected]
    standard_name: cimss_cloud_type

  cimss_cloud_type_raw:
    description: >
      Cloud Type RGB, candidate for standard FCI RGB.  Raw version without sun zenith correction.
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - wavelength: 1.38
      - wavelength: 0.64
      - wavelength: 1.61
    standard_name: cimss_cloud_type

  essl_low_level_moisture:
    description: >
      Greyscale low level moisture using the ratio between the
      0.91 µm and the 0.86 µm channels.  Developed by the
      European Severe Storms Laboratory (ESSL).  For a color version,
      see essl_colorized_low_level_moisture.
    compositor: !!python/name:satpy.composites.RatioCompositor
    prerequisites:
    - wavelength: 0.905
    - wavelength: 0.86
    standard_name: essl_low_level_moisture

  day_essl_low_level_moisture:
    description: >
      Daytime only version of essl_low_level_moisture.
      Nighttime part of the scene will be masked out.
    compositor: !!python/name:satpy.composites.DayNightCompositor
    day_night: day_only
    prerequisites:
    - name: essl_low_level_moisture
    standard_name: day_essl_low_level_moisture

  essl_colorized_low_level_moisture:
    description: >
      Colorized low level moisture using the ratio between the
      0.91 µm and the 0.86 µm channels.  Developed by the
      European Severe Storms Laboratory (ESSL).  The colorization
      is still under development and may be subject to change.
    compositor: !!python/name:satpy.composites.RatioCompositor
    prerequisites:
    - wavelength: 0.86
    - wavelength: 0.905
    standard_name: essl_colorized_low_level_moisture

  day_essl_colorized_low_level_moisture:
    description: >
      Daytime only version of essl_colorized_low_level_moisture.
      Nighttime part of the scene will be masked out.
    compositor: !!python/name:satpy.composites.DayNightCompositor
    day_night: day_only
    prerequisites:
    - name: essl_colorized_low_level_moisture
    standard_name: day_essl_colorized_low_level_moisture
