Skip to content

Commit

Permalink
Merge branch 'pytroll:main' into slstr_ang_int
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrp84 authored Feb 26, 2025
2 parents bee6032 + ef3618f commit 1218ff4
Show file tree
Hide file tree
Showing 18 changed files with 142 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-sdist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/[email protected].3
uses: pypa/[email protected].4
with:
user: __token__
password: ${{ secrets.pypi_password }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fail_fast: false
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.8.6'
rev: 'v0.9.4'
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -14,7 +14,7 @@ repos:
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/PyCQA/bandit
rev: '1.8.0' # Update me!
rev: '1.8.2' # Update me!
hooks:
- id: bandit
args: [--ini, .bandit]
Expand All @@ -29,7 +29,7 @@ repos:
- types-requests
args: ["--python-version", "3.10", "--ignore-missing-imports"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
language_version: python3
Expand Down
1 change: 1 addition & 0 deletions doc/rtd_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- platformdirs
- dask
- dask-image
- dask-expr
- defusedxml
- donfig
# 2.19.1 seems to cause library linking issues
Expand Down
2 changes: 1 addition & 1 deletion doc/source/dev_guide/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ How do I get help?
The Satpy developers (and all other PyTroll package developers) monitor the:

- `Mailing List <https://groups.google.com/group/pytroll>`_
- `Slack chat <https://pytroll.slack.com/>`_ (get an `invitation <https://pytrollslackin.herokuapp.com/>`_)
- `Slack chat <https://pytroll.slack.com/>`_ (see the `PyTroll website <https://pytroll.github.io/#getting-in-touch>`_ for more info)
- `GitHub issues <https://github.com/pytroll/satpy/issues>`_

How do I submit my changes?
Expand Down
3 changes: 3 additions & 0 deletions doc/source/reading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ time etc. The following attributes are standardized across all readers:
:class:`~pyresample.geometry.SwathDefinition` if data is geolocated. Areas are used for gridded
projected data and Swaths when data must be described by individual longitude/latitude
coordinates. See the Coordinates section below.
* ``sensor``: The name of the sensor that recorded the data. For full support through Satpy this
should be all lowercase. If the dataset is the result of observations from multiple sensors a
``set`` object can be used to specify more than one sensor name.
* ``reader``: The name of the Satpy reader that produced the dataset.
* ``orbital_parameters``: Dictionary of orbital parameters describing the satellite's position.
See the :ref:`orbital_parameters` section below for more information.
Expand Down
3 changes: 3 additions & 0 deletions satpy/enhancements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,9 @@ def _jma_true_color_reproduction(img_data, platform=None):
"goes-18": np.array([[1.1629, 0.1539, -0.2175],
[-0.0252, 0.8725, 0.1300],
[-0.0204, -0.1100, 1.0633]]),
"goes-19": np.array([[0.9481, 0.3706, -0.2194],
[-0.0150, 0.8605, 0.1317],
[-0.0174, -0.1009, 1.0512]]),

"mtg-i1": np.array([[0.9007, 0.2086, -0.0100],
[-0.0475, 1.0662, -0.0414],
Expand Down
4 changes: 2 additions & 2 deletions satpy/etc/readers/abi_l2_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,12 @@ file_types:

abi_l2_cmip_c16:
file_reader: !!python/name:satpy.readers.abi_l2_nc.NC_ABI_L2
file_patterns: ['{system_environment:2s}_{mission_id:3s}-L2-CMIP{scene_abbr:1s}-{scan_mode:2s}C16_{platform_shortname:3s}_s{start_time:%Y%j%H%M%S%f}_e{end_time:%Y%j%H%M%S%f}_c{creation_time:%Y%j%H%M%S%f}.nc']
file_patterns: ['{system_environment:2s}_{mission_id:3s}-L2-CMIP{scene_abbr:s}-{scan_mode:2s}C16_{platform_shortname:3s}_s{start_time:%Y%j%H%M%S%f}_e{end_time:%Y%j%H%M%S%f}_c{creation_time:%Y%j%H%M%S%f}.nc']
observation_type: "CMIP"

abi_l2_mcmip:
file_reader: !!python/name:satpy.readers.abi_l2_nc.NC_ABI_L2
file_patterns: ['{system_environment:2s}_{mission_id:3s}-L2-MCMIP{scene_abbr:1s}-{scan_mode:2s}_{platform_shortname:3s}_s{start_time:%Y%j%H%M%S%f}_e{end_time:%Y%j%H%M%S%f}_c{creation_time:%Y%j%H%M%S%f}.nc']
file_patterns: ['{system_environment:2s}_{mission_id:3s}-L2-MCMIP{scene_abbr:s}-{scan_mode:2s}_{platform_shortname:3s}_s{start_time:%Y%j%H%M%S%f}_e{end_time:%Y%j%H%M%S%f}_c{creation_time:%Y%j%H%M%S%f}.nc']
observation_type: "MCMIP"

abi_l2_acha:
Expand Down
20 changes: 10 additions & 10 deletions satpy/etc/readers/aws1_mwr_l1b_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ datasets:
central: 50.3
bandwidth: 0.180
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -72,7 +72,7 @@ datasets:
central: 52.8
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -87,7 +87,7 @@ datasets:
central: 53.246
bandwidth: 0.300
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -102,7 +102,7 @@ datasets:
central: 53.596
bandwidth: 0.370
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -117,7 +117,7 @@ datasets:
central: 54.4
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -132,7 +132,7 @@ datasets:
central: 54.94
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -147,7 +147,7 @@ datasets:
central: 55.5
bandwidth: 0.330
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -162,7 +162,7 @@ datasets:
central: 57.290344
bandwidth: 0.330
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand Down Expand Up @@ -190,9 +190,9 @@ datasets:
name: '10'
frequency_range:
central: 165.5
bandwidth: 2.700
bandwidth: 2.800
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 20000
calibration:
brightness_temperature:
Expand Down
20 changes: 10 additions & 10 deletions satpy/etc/readers/aws1_mwr_l1c_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ datasets:
central: 50.3
bandwidth: 0.180
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -59,7 +59,7 @@ datasets:
central: 52.8
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -73,7 +73,7 @@ datasets:
central: 53.246
bandwidth: 0.300
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -87,7 +87,7 @@ datasets:
central: 53.596
bandwidth: 0.370
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -101,7 +101,7 @@ datasets:
central: 54.4
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -115,7 +115,7 @@ datasets:
central: 54.94
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -129,7 +129,7 @@ datasets:
central: 55.5
bandwidth: 0.330
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -143,7 +143,7 @@ datasets:
central: 57.290344
bandwidth: 0.330
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -169,9 +169,9 @@ datasets:
name: '10'
frequency_range:
central: 165.5
bandwidth: 2.700
bandwidth: 2.800
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 20000
calibration:
brightness_temperature:
Expand Down
20 changes: 10 additions & 10 deletions satpy/etc/readers/eps_sterna_mwr_l1b_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ datasets:
central: 50.3
bandwidth: 0.180
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -72,7 +72,7 @@ datasets:
central: 52.8
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -87,7 +87,7 @@ datasets:
central: 53.246
bandwidth: 0.300
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -102,7 +102,7 @@ datasets:
central: 53.596
bandwidth: 0.370
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -117,7 +117,7 @@ datasets:
central: 54.4
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -132,7 +132,7 @@ datasets:
central: 54.94
bandwidth: 0.400
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -147,7 +147,7 @@ datasets:
central: 55.5
bandwidth: 0.330
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand All @@ -162,7 +162,7 @@ datasets:
central: 57.290344
bandwidth: 0.330
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 40000
calibration:
brightness_temperature:
Expand Down Expand Up @@ -190,9 +190,9 @@ datasets:
name: '10'
frequency_range:
central: 165.5
bandwidth: 2.700
bandwidth: 2.800
unit: GHz
polarization: 'QH'
polarization: 'QV'
resolution: 20000
calibration:
brightness_temperature:
Expand Down
2 changes: 1 addition & 1 deletion satpy/etc/readers/oci_l2_bgc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ file_types:
bgc_nc:
file_patterns:
# Example: PACE_OCI.20240907T191809.L2.OC_BGC.V2_0.NRT.nc4
- '{platform:s}_{sensor:s}.{start_time:%Y%m%dT%H%M%S}.L2.OC_BGC.V{sw_version:s}.{processing_type:s}nc4'
- '{platform:s}_{sensor:s}.{start_time:%Y%m%dT%H%M%S}.L2.OC_BGC.V{sw_version:s}.{processing_type:s}nc{nc_version}'
file_reader: !!python/name:satpy.readers.seadas_l2.SEADASL2NetCDFFileHandler
geo_resolution: 1000

Expand Down
34 changes: 34 additions & 0 deletions satpy/etc/readers/viirs_edr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,40 @@ file_types:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSLSTHandler
file_patterns:
- 'LST_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_cloudbase:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-CloudBase_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_clouddcomp:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-CloudDCOMP_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_cloudncomp:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-CloudNCOMP_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_cloudlayers:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-CloudCoverLayers_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_cloudphase:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-CloudPhase_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_iceconcentration:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-IceConcentration_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_iceage:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
file_patterns:
- 'JRR-IceAge_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'
jrr_volcanicash:
file_reader: !!python/name:satpy.readers.viirs_edr.VIIRSJRRFileHandler
drop_variables:
- Det_QF_Size
file_patterns:
- 'JRR-VolcanicAsh_{version}_{platform_shortname}_s{start_time:%Y%m%d%H%M%S%f}_e{end_time:%Y%m%d%H%M%S%f}_c{creation_time}.nc'


datasets:
Expand Down
2 changes: 1 addition & 1 deletion satpy/readers/fci_l2_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def spacecraft_name(self):
@property
def sensor_name(self):
"""Return instrument name."""
return self.nc.attrs["data_source"]
return self.nc.attrs["data_source"].lower()

@property
def ssp_lon(self):
Expand Down
Loading

0 comments on commit 1218ff4

Please sign in to comment.