-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2717 from dnaviap/main
Add combined GRIB reader for both SEVIRI and FCI L2 products
- Loading branch information
Showing
9 changed files
with
494 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2017-2018 Satpy developers | ||
# | ||
# This file is part of satpy. | ||
# | ||
# satpy is free software: you can redistribute it and/or modify it under the | ||
# terms of the GNU General Public License as published by the Free Software | ||
# Foundation, either version 3 of the License, or (at your option) any later | ||
# version. | ||
# | ||
# satpy is distributed in the hope that it will be useful, but WITHOUT ANY | ||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along with | ||
# satpy. If not, see <http://www.gnu.org/licenses/>. | ||
"""Common functionality for FCI data readers.""" | ||
from __future__ import annotations | ||
|
||
|
||
def calculate_area_extent(area_dict): | ||
"""Calculate the area extent seen by MTG FCI instrument. | ||
Since the center of the FCI grids is located at the interface between the pixels, there are equally many | ||
pixels (e.g. 5568/2 = 2784 for 2km grid) in each direction from the center points. Hence, the area extent | ||
can be easily computed by simply adding and subtracting half the width and height from teh centre point (=0). | ||
Args: | ||
area_dict: A dictionary containing the required parameters | ||
ncols: number of pixels in east-west direction | ||
nlines: number of pixels in south-north direction | ||
column_step: Pixel resulution in meters in east-west direction | ||
line_step: Pixel resulution in meters in south-north direction | ||
Returns: | ||
tuple: An area extent for the scene defined by the lower left and | ||
upper right corners | ||
""" | ||
ncols = area_dict["ncols"] | ||
nlines = area_dict["nlines"] | ||
column_step = area_dict["column_step"] | ||
line_step = area_dict["line_step"] | ||
|
||
ll_c = (0 - ncols / 2.) * column_step | ||
ll_l = (0 + nlines / 2.) * line_step | ||
ur_c = (0 + ncols / 2.) * column_step | ||
ur_l = (0 - nlines / 2.) * line_step | ||
|
||
return (ll_c, ll_l, ur_c, ur_l) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -225,6 +225,8 @@ | |
|
||
REPEAT_CYCLE_DURATION = 15 | ||
|
||
REPEAT_CYCLE_DURATION_RSS = 5 | ||
|
||
C1 = 1.19104273e-5 | ||
C2 = 1.43877523 | ||
|
||
|
Oops, something went wrong.