sensor_name: visir/ahi

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

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

composites:
  green:
    compositor: !!python/name:satpy.composites.ahi.GreenCorrector
    # FUTURE: Set a wavelength...see what happens. Dependency finding
    #         probably wouldn't work.
    prerequisites:
    # should we be using the most corrected or least corrected inputs?
    # what happens if something requests more modifiers on top of this?
    - wavelength: 0.51
      modifiers: [sunz_corrected, rayleigh_corrected]
    - wavelength: 0.85
      modifiers: [sunz_corrected]
    standard_name: toa_bidirectional_reflectance

  green_true_color_reproduction:
    # JMA True Color Reproduction green band
    # http://www.jma.go.jp/jma/jma-eng/satellite/introduction/TCR.html
    compositor: !!python/name:satpy.composites.ahi.GreenCorrector
    fractions: [0.6321, 0.2928, 0.0751]
    prerequisites:
    - name: B02
      modifiers: [sunz_corrected, no_aerosol_rayleigh_corrected]
    - name: B03
      modifiers: [sunz_corrected, no_aerosol_rayleigh_corrected]
    - name: B04
      modifiers: [sunz_corrected]
    standard_name: none

  green_nocorr:
    compositor: !!python/name:satpy.composites.ahi.GreenCorrector
    # FUTURE: Set a wavelength...see what happens. Dependency finding
    #         probably wouldn't work.
    prerequisites:
    # should we be using the most corrected or least corrected inputs?
    # what happens if something requests more modifiers on top of this?
    - wavelength: 0.51
    - wavelength: 0.85
    standard_name: toa_reflectance

  airmass:
    # PDF slides: https://www.eumetsat.int/website/home/News/ConferencesandEvents/DAT_2833302.html
    # Under session 2 by Akihiro Shimizu (JMA)
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B08
          - name: B10
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B12
          - name: B14
      - name: B08
    standard_name: airmass

  ash:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B15
          - name: B13
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B14
          - name: B11
      - name: B13
    standard_name: ash

  dust:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B15
          - name: B13
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B14
          - name: B11
      - name: B13
    standard_name: dust

  fog:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B15
          - name: B13
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B14
          - name: B11
      - name: B13
    standard_name: fog

  night_microphysics:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B15
          - name: B13
      - compositor: !!python/name:satpy.composites.DifferenceCompositor
        prerequisites:
          - name: B14
          - name: B07
      - name: B13
    standard_name: night_microphysics

  fire_temperature:
    # CIRA: Original VIIRS
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 3.85
      calibration: radiance
    - wavelength: 2.26
      calibration: radiance
    - wavelength: 1.61
      calibration: radiance
    standard_name: fire_temperature
    name: fire_temperature
  fire_temperature_awips:
    # CIRA: EUMETSAT
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 3.85
    - wavelength: 2.26
    - wavelength: 1.61
    standard_name: fire_temperature
    name: fire_temperature_awips

  fire_temperature_eumetsat:
    # CIRA: AWIPS
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 3.85
    - wavelength: 2.26
    - wavelength: 1.61
    standard_name: fire_temperature
    name: fire_temperature_eumetsat
  fire_temperature_39refl:
    # CIRA: All bands in Reflectance units (%)
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 3.85
      modifiers: [nir_reflectance]
    - wavelength: 2.26
      modifiers: [sunz_corrected]
    - wavelength: 1.61
      modifiers: [sunz_corrected]
    standard_name: fire_temperature
    name: fire_temperature_39refl

  overview:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - name: B03
      modifiers: [sunz_corrected]
    - name: B04
      modifiers: [sunz_corrected]
    - name: B13
    standard_name: overview

  overview_raw:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
      - B03
      - B04
      - B13
    standard_name: overview

  natural_color:
    compositor: !!python/name:satpy.composites.SelfSharpenedRGB
    prerequisites:
    - wavelength: 1.63
      modifiers: [sunz_corrected] #, rayleigh_corrected]
    - wavelength: 0.85
      modifiers: [sunz_corrected] #, rayleigh_corrected]
    - wavelength: 0.635
      modifiers: [sunz_corrected] #, rayleigh_corrected]
    high_resolution_band: blue
    standard_name: natural_color

  true_color:
    compositor: !!python/name:satpy.composites.SelfSharpenedRGB
    prerequisites:
    - name: B03
      modifiers: [sunz_corrected, rayleigh_corrected]
    - name: green
    - name: B01
      modifiers: [sunz_corrected, rayleigh_corrected]
    high_resolution_band: red
    standard_name: true_color

  natural_color_nocorr:
    compositor: !!python/name:satpy.composites.SelfSharpenedRGB
    prerequisites:
    - name: B05
    - name: B04
    - name: B03
    high_resolution_band: blue
    standard_name: natural_color

  true_color_nocorr:
    compositor: !!python/name:satpy.composites.SelfSharpenedRGB
    prerequisites:
    - name: B03
    - name: green_nocorr
    - name: B01
    high_resolution_band: red
    standard_name: true_color

  true_color_reproduction:
    # JMA True Color Reproduction
    # http://www.jma.go.jp/jma/jma-eng/satellite/introduction/TCR.html
    compositor: !!python/name:satpy.composites.SelfSharpenedRGB
    prerequisites:
      - name: B03
        modifiers: [sunz_corrected, no_aerosol_rayleigh_corrected]
      - name: green_true_color_reproduction
      - name: B01
        modifiers: [sunz_corrected, no_aerosol_rayleigh_corrected]
    standard_name: true_color_reproduction

#  true_color_reducedsize_land:
#    compositor: !!python/name:satpy.composites.GenericCompositor
#    prerequisites:
#    - wavelength: 0.65
#      modifiers: [reducer4, effective_solar_pathlength_corrected,
#                  rayleigh_corrected_reducedsize_land]
#    - wavelength: 0.51
#      modifiers: [reducer2, vegetation_corrected_reduced, effective_solar_pathlength_corrected,
#                  rayleigh_corrected_reducedsize_land]
#    - wavelength: 0.46
#      modifiers: [reducer2, effective_solar_pathlength_corrected,
#                  rayleigh_corrected_reducedsize_land]
#    standard_name: true_color
#
#  true_color_reducedsize_marine_tropical:
#    compositor: !!python/name:satpy.composites.GenericCompositor
#    prerequisites:
#    - wavelength: 0.65
#      modifiers: [reducer4, effective_solar_pathlength_corrected,
#                  rayleigh_corrected_reducedsize_marine_tropical]
#    - wavelength: 0.51
#      modifiers: [reducer2, vegetation_corrected_reduced, effective_solar_pathlength_corrected,
#                  rayleigh_corrected_reducedsize_marine_tropical]
#    - wavelength: 0.46
#      modifiers: [reducer2, effective_solar_pathlength_corrected,
#                  rayleigh_corrected_reducedsize_marine_tropical]
#    standard_name: true_color

  day_microphysics_eum:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 0.86
    - wavelength: 3.9
      modifiers: [nir_reflectance]
    - wavelength: 10.4
    standard_name: day_microphysics

  day_microphysics_ahi:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 0.86
    - wavelength: 2.3
    - wavelength: 10.4
    standard_name: day_microphysics

  cloud_phase_distinction:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 10.4
    - wavelength: 0.64
    - wavelength: 1.6
    standard_name: cloud_phase_distinction

  colorized_ir_clouds:
    compositor: !!python/name:satpy.composites.SingleBandCompositor
    prerequisites:
      - name: B13
    standard_name: colorized_ir_clouds

  water_vapors1:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - wavelength: 10.4
    - wavelength: 6.2
    - wavelength: 7.3
    standard_name: water_vapors1

  mid_vapor:
    compositor: !!python/name:satpy.composites.DifferenceCompositor
    prerequisites:
    - wavelength: 7.3
    - wavelength: 6.2
    standard_name: mid_vapor

  water_vapors2:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - name: mid_vapor
    - wavelength: 7.3
    - wavelength: 6.2
    standard_name: water_vapors2

  convection:
    compositor: !!python/name:satpy.composites.GenericCompositor
    prerequisites:
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - 6.7
        - 7.3
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - 3.75
        - 10.4
    - compositor: !!python/name:satpy.composites.DifferenceCompositor
      prerequisites:
        - 1.63
        - 0.635
    standard_name: convection

  ir_cloud_day:
    standard_name: ir_cloud_day
    compositor: !!python/name:satpy.composites.CloudCompositor
    prerequisites:
      - name: B14

  true_color_with_night_ir:
    compositor: !!python/name:satpy.composites.DayNightCompositor
    standard_name: true_color_with_night_ir
    prerequisites:
      - true_color
      - night_ir_with_background

  true_color_with_night_ir_hires:
    compositor: !!python/name:satpy.composites.DayNightCompositor
    standard_name: true_color_with_night_ir_hires
    prerequisites:
      - true_color
      - night_ir_with_background_hires

  night_ir_alpha:
    compositor: !!python/name:satpy.composites.GenericCompositor
    standard_name: night_ir_alpha
    prerequisites:
      - name: B07
      - name: B13
      - name: B15
      - name: B13

  night_ir_with_background:
    compositor: !!python/name:satpy.composites.BackgroundCompositor
    standard_name: night_ir_with_background
    prerequisites:
      - night_ir_alpha
      - _night_background

  night_ir_with_background_hires:
    compositor: !!python/name:satpy.composites.BackgroundCompositor
    standard_name: night_ir_with_background_hires
    prerequisites:
      - night_ir_alpha
      - _night_background_hires
