Skip to content

Commit

Permalink
Merge branch 'main' into feat-comp-llm-cloud-mask
Browse files Browse the repository at this point in the history
  • Loading branch information
gerritholl committed Feb 11, 2025
2 parents b002b03 + d1352a4 commit 138344c
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 55 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/gh-action-pypi-publish@v1.12.3
uses: pypa/gh-action-pypi-publish@v1.12.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
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
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
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
4 changes: 2 additions & 2 deletions satpy/readers/satpy_cf_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
''AVHRR-GAC_FDR_1C_{platform}_{start_time:%Y%m%dT%H%M%SZ}_{end_time:%Y%m%dT%H%M%SZ}_{processing_mode}_{disposition_mode}_{creation_time}_{version_int:04d}.nc'
Example:
--------
**Example**:
Here is an example how to read the data in satpy:
.. code-block:: python
Expand Down
2 changes: 2 additions & 0 deletions satpy/readers/viirs_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ def __init__(self, filename, filename_info, filetype_info, **kwargs):
# use entire scans as chunks
row_chunks_m = max(get_chunk_size_limit() // 4 // M_COLS, 1) # 32-bit floats
row_chunks_i = row_chunks_m * 2
drop_variables = filetype_info.get("drop_variables", None)
self.nc = xr.open_dataset(self.filename,
decode_cf=True,
mask_and_scale=True,
drop_variables=drop_variables,
chunks={
"Columns": -1,
"Rows": row_chunks_m,
Expand Down
Loading

0 comments on commit 138344c

Please sign in to comment.