Skip to content

Commit

Permalink
Merge branch 'main' into fix-sar-type
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud authored Oct 17, 2024
2 parents eceedf9 + a5f0e4d commit a9c48ec
Show file tree
Hide file tree
Showing 28 changed files with 1,137 additions and 681 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
miniforge-version: latest
python-version: ${{ matrix.python-version }}
activate-environment: test-environment
mamba-version: "*"
channels: conda-forge

- name: Set cache environment variables
Expand Down
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].0
uses: pypa/[email protected].2
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,18 +3,18 @@ fail_fast: false
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.6.3'
rev: 'v0.6.9'
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.9' # Update me!
rev: '1.7.10' # Update me!
hooks:
- id: bandit
args: [--ini, .bandit]
Expand Down
6 changes: 6 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The following people have made contributions to this project:
<!--- The list should be alphabetical by last name if possible, with github usernames at the bottom --->
<!--- See https://gist.github.com/djhoese/52220272ec73b12eb8f4a29709be110d for auto-generating parts of this list --->

- [Youva Aoun (YouvaEUMex)](https://github.com/YouvaEUMex)
- [Trygve Aspenes (TAlonglong)](https://github.com/TAlonglong)
- [Talfan Barnie (TalfanBarnie)](https://github.com/TalfanBarnie)
- [Jonathan Beavers (jon4than)](https://github.com/jon4than)
Expand Down Expand Up @@ -38,6 +39,7 @@ The following people have made contributions to this project:
- [David Hoese (djhoese)](https://github.com/djhoese)
- [Marc Honnorat (honnorat)](https://github.com/honnorat)
- [Lloyd Hughes (system123)](https://github.com/system123)
- [Sara Hörnquist (shornqui)](https://github.com/shornqui)
- [Mikhail Itkin (mitkin)](https://github.com/mitkin)
- [Tommy Jasmin (tommyjasmin)](https://github.com/tommyjasmin)
- [Jactry Zeng](https://github.com/jactry)
Expand All @@ -47,6 +49,7 @@ The following people have made contributions to this project:
- [Janne Kotro (jkotro)](https://github.com/jkotro)
- [Ralph Kuehn (ralphk11)](https://github.com/ralphk11)
- [Panu Lahtinen (pnuu)](https://github.com/pnuu)
- [Clement Laplace (ClementLaplace)](https://github.com/ClementLaplace)
- [Jussi Leinonen (jleinonen)](https://github.com/jleinonen) - meteoswiss
- [Thomas Leppelt (m4sth0)](https://github.com/m4sth0) - Deutscher Wetterdienst
- [Lu Liu (yukaribbba)](https://github.com/yukaribbba)
Expand All @@ -55,6 +58,7 @@ The following people have made contributions to this project:
- [Luca Merucci (lmeru)](https://github.com/lmeru)
- [Lucas Meyer (LTMeyer)](https://github.com/LTMeyer)
- [Zifeng Mo (Isotr0py)](https://github.com/Isotr0py)
- [David Navia (dnaviap)](https://github.com/dnaviap)
- [Ondrej Nedelcev (nedelceo)](https://github.com/nedelceo)
- [Oana Nicola](https://github.com/)
- [Esben S. Nielsen (storpipfugl)](https://github.com/storpipfugl)
Expand All @@ -79,12 +83,14 @@ The following people have made contributions to this project:
- [Michael Schmutz (Graenni)](https://github.com/Graenni) - Meteotest AG
- [Hauke Schulz (observingClouds)](https://github.com/observingClouds)
- [Jakub Seidl (seidlj)](https://github.com/seidlj)
- [Will Sharpe (wjsharpe)](https://github.com/wjsharpe)
- [Eysteinn Sigurðsson (eysteinn)](https://github.com/eysteinn)
- [Jean-Luc Shaw (jeanlucshaw)](https://github.com/jeanlucshaw)
- [Dario Stelitano (bornagain1981)](https://github.com/bornagain1981)
- [Johan Strandgren (strandgren)](https://github.com/strandgren)
- [Matias Takala (elfsprite)](https://github.com/elfsprite)
- [Taiga Tsukada (tsukada-cs)](https://github.com/tsukada-cs)
- [Antonio Valentino](https://github.com/avalentino)
- [Christian Versloot (christianversloot)](https://github.com/christianversloot)
- [Helga Weber (helgaweb)](https://github.com/helgaweb)
- [hazbottles (hazbottles)](https://github.com/hazbottles)
Expand Down
3 changes: 2 additions & 1 deletion satpy/composites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def __init__(self, name, lim_low=85., lim_high=88., day_night="day_night", inclu
self.day_night = day_night
self.include_alpha = include_alpha
self._has_sza = False
super(DayNightCompositor, self).__init__(name, **kwargs)
super().__init__(name, **kwargs)

def __call__(
self,
Expand Down Expand Up @@ -985,6 +985,7 @@ def add_bands(data, bands):
alpha = new_data[0].copy()
alpha.data = da.ones((data.sizes["y"],
data.sizes["x"]),
dtype=new_data[0].dtype,
chunks=new_data[0].chunks)
# Rename band to indicate it's alpha
alpha["bands"] = "A"
Expand Down
5 changes: 5 additions & 0 deletions satpy/enhancements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,3 +653,8 @@ def _jma_true_color_reproduction(img_data, platform=None):

output = da.dot(img_data.T, ccm.T)
return output.T


def no_op(img):
"""Do not do anything to the image."""
return img.data
10 changes: 5 additions & 5 deletions satpy/etc/composites/sgli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sensor_name: visir/sgli
modifiers:

rayleigh_corrected:
compositor: !!python/name:satpy.modifiers.PSPRayleighReflectance
modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
atmosphere: us-standard
aerosol_type: rayleigh_only
prerequisites:
Expand All @@ -17,7 +17,7 @@ modifiers:
- solar_zenith_angle

rayleigh_corrected_marine_clean:
compositor: !!python/name:satpy.modifiers.PSPRayleighReflectance
modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
atmosphere: us-standard
aerosol_type: marine_clean_aerosol
prerequisites:
Expand All @@ -30,7 +30,7 @@ modifiers:
- solar_zenith_angle

rayleigh_corrected_marine_tropical:
compositor: !!python/name:satpy.modifiers.PSPRayleighReflectance
modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
atmosphere: tropical
aerosol_type: marine_tropical_aerosol
prerequisites:
Expand All @@ -43,7 +43,7 @@ modifiers:
- solar_zenith_angle

rayleigh_corrected_desert:
compositor: !!python/name:satpy.modifiers.PSPRayleighReflectance
modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
atmosphere: tropical
aerosol_type: desert_aerosol
prerequisites:
Expand All @@ -56,7 +56,7 @@ modifiers:
- solar_zenith_angle

rayleigh_corrected_land:
compositor: !!python/name:satpy.modifiers.PSPRayleighReflectance
modifier: !!python/name:satpy.modifiers.PSPRayleighReflectance
atmosphere: us-standard
aerosol_type: continental_average_aerosol
prerequisites:
Expand Down
6 changes: 6 additions & 0 deletions satpy/etc/enhancements/generic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,3 +1285,9 @@ enhancements:
imager_with_lightning:
standard_name: imager_with_lightning
operations: []

image_ready:
standard_name: image_ready
operations:
- name: no_op
method: !!python/name:satpy.enhancements.no_op
28 changes: 28 additions & 0 deletions satpy/etc/readers/fci_l2_grib.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
reader:
name: fci_l2_grib
short_name: FCI L2 GRIB2
long_name: MTG FCI L2 data in GRIB2 format
description: Reader for EUMETSAT MTG FCI L2 files in GRIB2 format.
status: Nominal
supports_fsspec: false
sensors: [fci]
reader: !!python/name:satpy.readers.yaml_reader.GEOFlippableFileYAMLReader

file_types:
grib_fci_clm:
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- '{pflag}_{location_indicator},{data_designator},MTI{spacecraft_id:1d}+FCI-2-CLM-{subtype}-{coverage}-{subsetting}-{component1}-{component2}-{component3}-{purpose}-GRIB2_{oflag}_{originator}_{processing_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_{processing_mode}_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.bin'


datasets:
cloud_mask:
name: cloud_mask
long_name: Cloud Classification
standard_name: cloud_classification
resolution: 2000
file_type: grib_fci_clm
parameter_number: 7
units: "1"
flag_values: [0, 1, 2, 3]
flag_meanings: ['clear sky over water','clear sky over land', 'cloudy', 'undefined' ]
14 changes: 7 additions & 7 deletions satpy/etc/readers/seviri_l2_grib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Aerosol Properties over Sea product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:AES
grib_seviri_aes:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'AESGRIBProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGAESE-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand All @@ -24,7 +24,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Cloud Mask product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:CLM
grib_seviri_clm:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'CLMEncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGCLMK-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand All @@ -34,7 +34,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Cloud Top Height product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:CTH
grib_seviri_cth:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'CTHEncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGCLTH-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand All @@ -44,7 +44,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Clear-Sky Reflectance Map product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:CRM
grib_seviri_crm:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'CRMEncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGCRMN-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand All @@ -54,7 +54,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Active Fire Monitoring product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:FIR
grib_seviri_fir:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'FIREncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGFIRG-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand All @@ -65,7 +65,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Multi-Sensor Precipitation Estimate product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:MPE-GRIB
grib_seviri_mpe:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'MPEGRIBProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGMPEG-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand All @@ -75,7 +75,7 @@ file_types:
# EUMETSAT MSG SEVIRI L2 Optimal Cloud Analysis product
# https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:OCA
grib_seviri_oca:
file_reader: !!python/name:satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler
file_reader: !!python/name:satpy.readers.eum_l2_grib.EUML2GribFileHandler
file_patterns:
- 'OCAEncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
- '{spacecraft:4s}-SEVI-MSGOCAE-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
Expand Down
Loading

0 comments on commit a9c48ec

Please sign in to comment.