-
Notifications
You must be signed in to change notification settings - Fork 321
Thr3mi L1C reader #2908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Thr3mi L1C reader #2908
Conversation
pepephillips
commented
Sep 24, 2024
- Closes #xxxx
- Tests added
- Fully documented
…to thr3mi_dev Merge branch 'main' of https://github.com/pytroll/satpy into map_dev To take on board latest changes from satpy main before 3MI reader PR
|
i just looked at the commits and there is an old MAP L1C reader commit in there. The MAP L1C readers were since removed and obviously not part of the final commit, only the new 3MI readers are there. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2908 +/- ##
==========================================
- Coverage 96.32% 96.32% -0.01%
==========================================
Files 463 465 +2
Lines 58172 58367 +195
==========================================
+ Hits 56035 56222 +187
- Misses 2137 2145 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merge branch 'main' of https://github.com/pytroll/satpy into thr3mi_dev
Merge branch 'thr3mi_dev' of https://github.com/pepephillips/satpy into thr3mi_dev
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Pull Request Test Coverage Report for Build 17614285017Details
💛 - Coveralls |
…erage for exception handling
|
@mraspaud, this is a very basic 3mi L1C reader for the native 3mi normalised reflectances in the 1D data format. As a result, scene.show() will not work as the data is still 1D (but I can hopefully update that later). However, once resampled, you can plot the projected data ok using show(). I suspect my coding is too basic and I hope someone can improve on it downstream.... I hope to include conversion to reflectance/radiance and colour composites (including polarised composites) too. |
ameraner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Pepe, thanks again for the reader. Two suggestions inline to fix an import warning and a broken docstring link.
satpy/readers/thr3mi_l1c_nc.py
Outdated
|
|
||
| import xarray as xr | ||
|
|
||
| from satpy.readers.netcdf_utils import NetCDF4FileHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs a new import after the recent refactoring:
| from satpy.readers.netcdf_utils import NetCDF4FileHandler | |
| from satpy.readers.core.netcdf import NetCDF4FileHandler |
|
|
||
| This is an initial draft version. Note that as the 3MI uses 1D arrays, the data has to be | ||
| resampled first before using the "show()" function. Working on a conversion to a 2D array at input to fix this. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reference to the doc is missing
| .. _EPS-SG 3MI Level 1C Product Format Specification: https://user.eumetsat.int/s3/eup-strapi-media/EPS_SG_3_MI_Level_1_C_Product_Format_Specification_web_1e7e9e67b2.pdf # noqa: E501 | |
satpy/readers/thr3mi_l1c_nc.py
Outdated
| if i_overlap == 0: | ||
| variable_old = variable.copy(deep=True) | ||
| if i_overlap > 0: | ||
| #variable_old = variable.copy(deep=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug line to be removed probably
| #variable_old = variable.copy(deep=True) |
| Reader for EUMETSAT EPS-SG 3MI Multi-Angle Polarimeter Level 1C Radiance files in NetCDF4 format per PFS | ||
| sensors: [3mi] | ||
| reader: !!python/name:satpy.readers.yaml_reader.FileYAMLReader | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple more fields are required nowadays
| supports_fsspec: true | |
| status: Beta | |
|
Hi Andrea,
Thanks loads for the suggestions, I'll get these changes done.
Cheers,
Pepe
________________________________
From: Andrea Meraner ***@***.***>
Sent: Wednesday, September 10, 2025 16:48
To: pytroll/satpy ***@***.***>
Cc: Pepe Phillips ***@***.***>; Author ***@***.***>
Subject: Re: [pytroll/satpy] Thr3mi L1C reader (PR #2908)
WARNING: This email originated outside the organisation. Treat links and attachments with caution.
@ameraner requested changes on this pull request.
Hi Pepe, thanks again for the reader. Two suggestions inline to fix an import warning and a broken docstring link.
________________________________
In satpy/readers/thr3mi_l1c_nc.py<#2908 (comment)>:
+The ``3mi_l1c_nc`` reader reads EPS-SG 3MI L1C image data in netCDF format. The format is explained
+in the `EPS-SG 3MI Level 1C Product Format Specification`_. Details of format and test data can be
+found at:
+https://user.eumetsat.int/resources/user-guides/metop-sg-3-mi-l1b-and-l1c-data-guide
+
+This is an initial draft version. Note that as the 3MI uses 1D arrays, the data has to be
+resampled first before using the "show()" function. Working on a conversion to a 2D array at input to fix this.
+
+"""
+
+import logging
+from datetime import datetime
+
+import xarray as xr
+
+from satpy.readers.netcdf_utils import NetCDF4FileHandler
this needs a new import after the recent refactoring:
⬇️ Suggested change
-from satpy.readers.netcdf_utils import NetCDF4FileHandler
+from satpy.readers.core.netcdf import NetCDF4FileHandler
________________________________
In satpy/readers/thr3mi_l1c_nc.py<#2908 (comment)>:
+# 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/>.
+"""EUMETSAT EPS-SG Multi-view, Multi-channel, Multi-polarisation Imager (3MI) Level 1C products reader.
+
+The ``3mi_l1c_nc`` reader reads EPS-SG 3MI L1C image data in netCDF format. The format is explained
+in the `EPS-SG 3MI Level 1C Product Format Specification`_. Details of format and test data can be
+found at:
+https://user.eumetsat.int/resources/user-guides/metop-sg-3-mi-l1b-and-l1c-data-guide
+
+This is an initial draft version. Note that as the 3MI uses 1D arrays, the data has to be
+resampled first before using the "show()" function. Working on a conversion to a 2D array at input to fix this.
+
the reference to the doc is missing
⬇️ Suggested change
-
+
+.. _EPS-SG 3MI Level 1C Product Format Specification: https://user.eumetsat.int/s3/eup-strapi-media/EPS_SG_3_MI_Level_1_C_Product_Format_Specification_web_1e7e9e67b2.pdf # noqa: E501
—
Reply to this email directly, view it on GitHub<#2908 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AP77JHZE2Q6OEMVVY22FULD3SA23RAVCNFSM6AAAAABOYMV5KGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTEMBWGUYTANBWGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
Any email message from EUMETSAT is sent in good faith but shall neither be binding nor construed as constituting a commitment by EUMETSAT, except where provided for in a written agreement or contract or if explicitly stated in the email. Please note that any views or opinions presented in this email are solely those of the sender and do not necessarily represent those of EUMETSAT. This message and any attachments are intended for the sole use of the addressee(s) and may contain confidential and privileged information. Any unauthorised use, disclosure, dissemination or distribution (in whole or in part) of its contents is not permitted. If you received this message in error, please notify the sender and delete it from your system.
|
…correct PFS reference, correct netcdfFileHandler import and removed redundant debug line
| @property | ||
| def ssp_lon(self): | ||
| """Return subsatellite point longitude.""" | ||
| # This parameter is not applicable to 3MI | ||
| return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not strictly needed so it can be removed for simplicity