Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions satpy/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"readers": {
"clip_negative_radiances": False,
},
"oscar_compliant_attributes": False,
}

# Satpy main configuration object
Expand Down
8 changes: 6 additions & 2 deletions satpy/composites/config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _load_config(composite_configs):
sensor_modifiers = {}

dep_id_keys = None
sensor_deps = sensor_name.split("/")[:-1]
sensor_deps = conf.get("dependencies", sensor_name.split("/")[:-1])
if sensor_deps:
# get dependent
for sensor_dep in sensor_deps:
Expand Down Expand Up @@ -246,6 +246,10 @@ def _update_cached_wrapper(wrapper, cached_func):
return wrapper


def sensor_to_filename(sensor_name: str) -> str:
"""Get filename tag for the given sensor."""
return sensor_name.lower().replace("-", "").replace(" ", "_").replace("/", "-")

@_lru_cache_with_config_path
def load_compositor_configs_for_sensor(sensor_name: str) -> tuple[dict[str, dict], dict[str, dict], dict]:
"""Load compositor, modifier, and DataID key information from configuration files for the specified sensor.
Expand All @@ -268,7 +272,7 @@ def load_compositor_configs_for_sensor(sensor_name: str) -> tuple[dict[str, dict
DataID key -> key properties

"""
config_filename = sensor_name + ".yaml"
config_filename = sensor_to_filename(sensor_name) + ".yaml"
logger.debug("Looking for composites config file %s", config_filename)
paths = get_entry_points_config_dirs("satpy.composites")
composite_configs = config_search_paths(
Expand Down
5 changes: 3 additions & 2 deletions satpy/etc/composites/abi.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sensor_name: visir/abi

sensor_name: ABI
dependencies:
- visir
modifiers:
rayleigh_corrected_crefl:
modifier: !!python/name:satpy.modifiers.atmosphere.ReflectanceCorrector
Expand Down
24 changes: 12 additions & 12 deletions satpy/etc/enhancements/abi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
enhancements:
cimss_true_color:
standard_name: cimss_true_color
sensor: abi
sensor: ABI
operations:
- name: linear_stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand Down Expand Up @@ -35,7 +35,7 @@ enhancements:

true_color_with_night_fires:
standard_name: true_color_with_night_fires
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand Down Expand Up @@ -77,7 +77,7 @@ enhancements:
ash_abi:
## RGB Ash recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/GOES_Ash_RGB.pdf
standard_name: ash
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -89,7 +89,7 @@ enhancements:
dust_abi:
## RGB Dust recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/Dust_RGB_Quick_Guide.pdf
standard_name: dust
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -105,7 +105,7 @@ enhancements:
convection_abi:
## RGB Convection recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_DayConvectionRGB_final.pdf
standard_name: convection
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand Down Expand Up @@ -142,7 +142,7 @@ enhancements:
night_microphysics_abi:
## RGB Nighttime Microphysics recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_NtMicroRGB_final.pdf
standard_name: night_microphysics
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -154,7 +154,7 @@ enhancements:
night_microphysics_tropical_abi:
## RGB Nighttime Microphysics recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_NtMicroRGB_final.pdf
standard_name: night_microphysics_tropical
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -170,7 +170,7 @@ enhancements:
land_cloud_fire:
## RGB Day Land Cloud Fire recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_DayLandCloudFireRGB_final.pdf
standard_name: land_cloud_fire
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -179,7 +179,7 @@ enhancements:
land_cloud:
## RGB Day Land Cloud Fire recipe source: http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_daylandcloudRGB_final.pdf
standard_name: land_cloud
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -191,7 +191,7 @@ enhancements:
# IR with white clouds
highlighted_brightness_temperature:
standard_name: highlighted_toa_brightness_temperature
sensor: abi
sensor: ABI
operations:
- name: btemp_threshold
method: !!python/name:satpy.enhancements.contrast.btemp_threshold
Expand Down Expand Up @@ -308,7 +308,7 @@ enhancements:
## RGB Recipe: https://rammb2.cira.colostate.edu/wp-content/uploads/2024/11/GOES-BlowingSnowRGB1_QuickGuide_24April2024.pdf
## Modified to match recommendations from RGB Workshop 2025
standard_name: day_blowing_snow
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand All @@ -323,7 +323,7 @@ enhancements:
day_cloud_type:
# Recipe PDF: http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_Day_Cloud_Type_RGB.pdf
standard_name: day_cloud_type
sensor: abi
sensor: ABI
operations:
- name: stretch
method: !!python/name:satpy.enhancements.contrast.stretch
Expand Down
2 changes: 1 addition & 1 deletion satpy/etc/readers/abi_l1b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ reader:
`here <https://www.goes-r.gov/users/docs/PUG-GRB-vol4.pdf>`_.
status: Nominal
supports_fsspec: true
sensors: [abi]
sensors: [ABI]
reader: !!python/name:satpy.readers.core.yaml_reader.FileYAMLReader
# file pattern keys to sort files by with 'satpy.utils.group_files'
group_keys: ['start_time', 'platform_shortname', 'scene_abbr']
Expand Down
32 changes: 16 additions & 16 deletions satpy/etc/readers/abi_l1b_scmi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ file_types:
datasets:
C01:
name: C01
sensor: abi
sensor: ABI
wavelength: [0.450, 0.470, 0.490]
resolution: 1000
calibration:
Expand All @@ -127,7 +127,7 @@ datasets:

C02:
name: C02
sensor: abi
sensor: ABI
wavelength: [0.590, 0.640, 0.690]
resolution: 500
calibration:
Expand All @@ -138,7 +138,7 @@ datasets:

C03:
name: C03
sensor: abi
sensor: ABI
wavelength: [0.8455, 0.865, 0.8845]
resolution: 1000
calibration:
Expand All @@ -149,7 +149,7 @@ datasets:

C04:
name: C04
sensor: abi
sensor: ABI
wavelength: [1.3705, 1.378, 1.3855]
resolution: 2000
calibration:
Expand All @@ -160,7 +160,7 @@ datasets:

C05:
name: C05
sensor: abi
sensor: ABI
wavelength: [1.580, 1.610, 1.640]
resolution: 1000
calibration:
Expand All @@ -171,7 +171,7 @@ datasets:

C06:
name: C06
sensor: abi
sensor: ABI
wavelength: [2.225, 2.250, 2.275]
resolution: 2000
calibration:
Expand All @@ -182,7 +182,7 @@ datasets:

C07:
name: C07
sensor: abi
sensor: ABI
wavelength: [3.80, 3.90, 4.00]
resolution: 2000
calibration:
Expand All @@ -193,7 +193,7 @@ datasets:

C08:
name: C08
sensor: abi
sensor: ABI
wavelength: [5.770, 6.185, 6.600]
resolution: 2000
calibration:
Expand All @@ -204,7 +204,7 @@ datasets:

C09:
name: C09
sensor: abi
sensor: ABI
wavelength: [6.75, 6.95, 7.15]
resolution: 2000
calibration:
Expand All @@ -215,7 +215,7 @@ datasets:

C10:
name: C10
sensor: abi
sensor: ABI
wavelength: [7.24, 7.34, 7.44]
resolution: 2000
calibration:
Expand All @@ -226,7 +226,7 @@ datasets:

C11:
name: C11
sensor: abi
sensor: ABI
wavelength: [8.30, 8.50, 8.70]
resolution: 2000
calibration:
Expand All @@ -237,7 +237,7 @@ datasets:

C12:
name: C12
sensor: abi
sensor: ABI
wavelength: [9.42, 9.61, 9.80]
resolution: 2000
calibration:
Expand All @@ -248,7 +248,7 @@ datasets:

C13:
name: C13
sensor: abi
sensor: ABI
wavelength: [10.10, 10.35, 10.60]
resolution: 2000
calibration:
Expand All @@ -259,7 +259,7 @@ datasets:

C14:
name: C14
sensor: abi
sensor: ABI
wavelength: [10.80, 11.20, 11.60]
resolution: 2000
calibration:
Expand All @@ -270,7 +270,7 @@ datasets:

C15:
name: C15
sensor: abi
sensor: ABI
wavelength: [11.80, 12.30, 12.80]
resolution: 2000
calibration:
Expand All @@ -281,7 +281,7 @@ datasets:

C16:
name: C16
sensor: abi
sensor: ABI
wavelength: [13.00, 13.30, 13.60]
resolution: 2000
calibration:
Expand Down
2 changes: 1 addition & 1 deletion satpy/etc/readers/abi_l2_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ reader:
`here <https://www.goes-r.gov/products/docs/PUG-L2+-vol5.pdf>`_.
status: Beta
supports_fsspec: true
sensors: ['abi']
sensors: [ABI]
reader: !!python/name:satpy.readers.core.yaml_reader.FileYAMLReader
# file pattern keys to sort files by with 'satpy.utils.group_files'
group_keys: ['start_time', 'platform_shortname', 'scene_abbr']
Expand Down
4 changes: 2 additions & 2 deletions satpy/modifiers/atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __call__(self, projectables, optional_datasets=None, **info):
logger.info("Removing Rayleigh scattering with atmosphere '%s' and "
"aerosol type '%s' for '%s'",
atmosphere, aerosol_type, vis.attrs["name"])
corrector = Rayleigh(vis.attrs["platform_name"], vis.attrs["sensor"],
corrector = Rayleigh(vis.attrs["platform_name"], vis.attrs["sensor"].lower(),
atmosphere=atmosphere,
aerosol_type=aerosol_type)

Expand Down Expand Up @@ -159,7 +159,7 @@ def __call__(self, projectables, optional_datasets=None, **info):

logger.info("Correction for limb cooling")
corrector = AtmosphericalCorrection(band.attrs["platform_name"],
band.attrs["sensor"])
band.attrs["sensor"].lower())

atm_corr = da.map_blocks(_call_mapped_correction, satz, band.data,
corrector=corrector,
Expand Down
2 changes: 1 addition & 1 deletion satpy/modifiers/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _init_reflectance_calculator(self, metadata):
logger.info("Couldn't load pyspectral")
raise ImportError("No module named pyspectral.near_infrared_reflectance")

reflectance_3x_calculator = Calculator(metadata["platform_name"], metadata["sensor"], metadata["name"],
reflectance_3x_calculator = Calculator(metadata["platform_name"], metadata["sensor"].lower(), metadata["name"],
sunz_threshold=self.sun_zenith_threshold,
masking_limit=self.masking_limit)
return reflectance_3x_calculator
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/core/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _rename_dims(nc):
@property
def sensor(self):
"""Get sensor name for current file handler."""
return "abi"
return "ABI"

def __getitem__(self, item):
"""Wrap `self.nc[item]` for better floating point precision.
Expand Down
Loading
Loading