reader:
  name: nwcsaf-pps_nc
  short_name: NWCSAF PPS
  long_name: NWCSAF PPS 2014, 2018 products in netCDF4 format
  description: NetCDF4 reader for the NWCSAF/PPS 2014 format
  status: Alpha, only standard swath based ouput supported (remapped netCDF and CPP products not supported yet)
  supports_fsspec: false
  sensors: ['avhrr-3', 'viirs', 'modis']
  default_channels: []
  reader: !!python/name:satpy.readers.yaml_reader.FileYAMLReader

file_types:
    nc_nwcsaf_cma:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_CMA_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc',
        'W_XX-EUMETSAT-Darmstadt,SING+LEV+SAT,{platform_id}+CMA_C_EUMS_{start_time:%Y%m%d%H%M%S}_{orbit_number}.nc',
        'W_XX-EUMETSAT-Darmstadt,SING+LEV+SAT,{platform_id}+CMA_C_EUMS_{start_time:%Y%m%d%H%M%S}_{orbit_number}.nc.bz2']

    nc_nwcsaf_cmaprob:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_CMAPROB_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc']

    nc_nwcsaf_ct:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_CT_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc',
        'W_XX-EUMETSAT-Darmstadt,SING+LEV+SAT,{platform_id}+CT_C_EUMS_{start_time:%Y%m%d%H%M%S}_{orbit_number}.nc',
        'W_XX-EUMETSAT-Darmstadt,SING+LEV+SAT,{platform_id}+CT_C_EUMS_{start_time:%Y%m%d%H%M%S}_{orbit_number}.nc.bz2']

    nc_nwcsaf_ctth:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_CTTH_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc',
        'W_XX-EUMETSAT-Darmstadt,SING+LEV+SAT,{platform_id}+CTTH_C_EUMS_{start_time:%Y%m%d%H%M%S}_{orbit_number}.nc',
        'W_XX-EUMETSAT-Darmstadt,SING+LEV+SAT,{platform_id}+CTTH_C_EUMS_{start_time:%Y%m%d%H%M%S}_{orbit_number}.nc.bz2']

    nc_nwcsaf_pc:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_PC_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc']

    nc_nwcsaf_cpp:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_CPP_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc']
        file_key_prefix: cpp_

    nc_nwcsaf_cmic:
        file_reader: !!python/name:satpy.readers.nwcsaf_nc.NcNWCSAF
        file_patterns: ['S_NWC_CMIC_{platform_id}_{orbit_number}_{start_time:%Y%m%dT%H%M%S%f}Z_{end_time:%Y%m%dT%H%M%S%f}Z.nc']
        file_key_prefix: cmic_

datasets:

  lon:
    name: lon
    file_type:
    - nc_nwcsaf_cma
    - nc_nwcsaf_ct
    - nc_nwcsaf_ctth
    units: "degrees"
    standard_name: longitude
  lat:
    name: lat
    file_type:
    - nc_nwcsaf_cma
    - nc_nwcsaf_ct
    - nc_nwcsaf_ctth
    units: "degrees"
    standard_name: latitude

# ---- CMA products ------------

  cma:
    name: cma
    file_type: nc_nwcsaf_cma
    coordinates: [lon, lat]

  cma_pal:
    name: cma_pal
    file_type: nc_nwcsaf_cma

  cma_extended:
    name: cma_extended
    file_type: nc_nwcsaf_cma
    coordinates: [lon, lat]

  cma_extended_pal:
    name: cma_extended_pal
    file_type: nc_nwcsaf_cma

  cmaprob:
    name: cmaprob
    file_type: nc_nwcsaf_cmaprob
    coordinates: [lon, lat]

  cmaprob_pal:
    name: cmaprob_pal
    scale_offset_dataset: cmaprob
    file_type: nc_nwcsaf_cmaprob

  cmaprob_conditions:
    name: cmaprob_conditions
    file_type: nc_nwcsaf_cmaprob
    coordinates: [lon, lat]
    standard_name: cmaprob_conditions

  cmaprob_quality:
    name: cmaprob_quality
    file_type: nc_nwcsaf_cmaprob
    coordinates: [lon, lat]
    standard_name: cmaprob_quality

  cmaprob_status_flag:
    name: cmaprob_status_flag
    file_type: nc_nwcsaf_cmaprob
    coordinates: [lon, lat]
    standard_name: cmaprob_status_flag


# ---- CT products ------------

  ct:
    name: ct
    file_type: nc_nwcsaf_ct
    coordinates: [lon, lat]
    standard_name: cloudtype

  ct_conditions:
    name: ct_conditions
    file_type: nc_nwcsaf_ct
    coordinates: [lon, lat]
    standard_name: cloudtype_conditions

  ct_quality:
    name: ct_quality
    file_type: nc_nwcsaf_ct
    coordinates: [lon, lat]
    standard_name: cloudtype_quality

  ct_status_flag:
    name: ct_status_flag
    file_type: nc_nwcsaf_ct
    coordinates: [lon, lat]
    standard_name: cloudtype_status_flag

  ct_pal:
    name: ct_pal
    file_type: nc_nwcsaf_ct
    standard_name: palette

# ---- PC products ------------

  pc_conditions:
    name: pc_conditions
    file_type: nc_nwcsaf_pc
    coordinates: [lon, lat]

  pc_precip_intense:
    name: pc_precip_intense
    file_type: nc_nwcsaf_pc
    coordinates: [lon, lat]

  pc_precip_moderate:
    name: pc_precip_moderate
    file_type: nc_nwcsaf_pc
    coordinates: [lon, lat]

  pc_precip_light:
    name: pc_precip_light
    file_type: nc_nwcsaf_pc
    coordinates: [lon, lat]

  pc_status_flag:
    name: pc_status_flag
    file_type: nc_nwcsaf_pc
    coordinates: [lon, lat]

  pc_quality:
    name: pc_quality
    file_type: nc_nwcsaf_pc
    coordinates: [lon, lat]

# ---- CTTH products ------------

  ctth_alti:
    name: ctth_alti
    file_type: nc_nwcsaf_ctth
    coordinates: [lon, lat]

  ctth_alti_pal:
    name: ctth_alti_pal
    file_type: nc_nwcsaf_ctth

  ctth_quality:
    name: ctth_quality
    file_type: nc_nwcsaf_ctth
    coordinates: [lon, lat]

  ctth_conditions:
    name: ctth_conditions
    file_type: nc_nwcsaf_ctth
    coordinates: [lon, lat]

  ctth_status_flag:
    name: ctth_status_flag
    file_type: nc_nwcsaf_ctth
    coordinates: [lon, lat]

  ctth_pres:
    name: ctth_pres
    file_type: nc_nwcsaf_ctth
    coordinates: [lon, lat]

  ctth_pres_pal:
    name: ctth_pres_pal
    file_type: nc_nwcsaf_ctth

  ctth_tempe:
    name: ctth_tempe
    file_type: nc_nwcsaf_ctth
    coordinates: [lon, lat]

  ctth_tempe_pal:
    name: ctth_tempe_pal
    file_type: nc_nwcsaf_ctth


# ---- CMIC products (Was CPP in PPS<=2018)------------

  cmic_phase:
    name: cmic_phase
    file_key: phase
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_phase_pal:
    name: [cmic_phase_pal, cpp_phase_pal]
    file_key: phase_pal
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]

  cmic_reff:
    name: cmic_reff
    file_key: [cre, reff]
    file_type: [nc_nwcsaf_cmic, nc_nwcsaf_cpp]
    coordinates: [lon, lat]

  cmic_reff_pal:
    name: [cmic_reff_pal, cmic_cre_pal, cpp_reff_pal]
    file_key: [cre_pal, reff_pal]
    scale_offset_dataset: [reff, cre]
    file_type: [nc_nwcsaf_cmic, nc_nwcsaf_cpp]

  cmic_cot:
    name: cmic_cot
    file_key: cot
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_cot_pal:
    name: [cmic_cot_pal, cpp_cot_pal]
    file_key: cot_pal
    scale_offset_dataset: cot
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]

  cmic_cwp:
    name: cmic_cwp
    file_key: cwp
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_cwp_pal:
    name: [cmic_cwp_pal, cpp_cwp_pal]
    file_key: cwp_pal
    scale_offset_dataset: cwp
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]

  cmic_iwp:
    name: cmic_iwp
    file_key: iwp
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_iwp_pal:
    name: [cmic_iwp_pal, cpp_iwp_pal]
    file_key: iwp_pal
    scale_offset_dataset: iwp
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]

  cmic_lwp:
    name: cmic_lwp
    file_key: lwp
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_lwp_pal:
    name: [cmic_lwp_pal, cpp_lwp_pal]
    file_key: lwp_pal
    scale_offset_dataset: lwp
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]

  cmic_status_flag:
    name: [cmic_status_flag, cpp_status_flag]
    file_key: status_flag
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_conditions:
    name: [cmic_conditions, cpp_conditions]
    file_key: conditions
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]

  cmic_quality:
    name: [cmic_quality, cpp_quality]
    file_key: quality
    file_type: [nc_nwcsaf_cpp, nc_nwcsaf_cmic]
    coordinates: [lon, lat]
