Skip to content

Commit

Permalink
Merge pull request #91 from foua-pps/merci3_support
Browse files Browse the repository at this point in the history
adding support for handling mersi3 data
  • Loading branch information
ninahakansson authored Oct 16, 2024
2 parents 5146ff7 + fad5ca0 commit a274565
Show file tree
Hide file tree
Showing 9 changed files with 236 additions and 223 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ agency specific level-1 formats. So far, supports

- EUMETSAT Meteosat Second Generation SEVIRI HRIT level-1.5
- NOAA AVHRR GAC
- MERSI-2 level-1
- MERSI-2/3 level-1
- MODIS level-1
- AVHRR eps level-1b
- AVHRR AAPP level-1b
- VIIRS level-1b
- SLSTR level-1b
- EPS-SG MetImage level-1 test data
- EUMETSAT AVHRR GAC FDR
- EUMETSAT AVHRR GAC FDR
50 changes: 0 additions & 50 deletions bin/mersi22pps.py

This file was deleted.

1 change: 1 addition & 0 deletions bin/mersi22pps.py
50 changes: 50 additions & 0 deletions bin/mersi2pps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2019 level1c4pps developers
#
# This file is part of level1c4pps
#
# level1c4pps 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.
#
# level1c4pps 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 level1c4pps. If not, see <http://www.gnu.org/licenses/>.
# Author(s):

# Martin Raspaud <[email protected]>
# Nina Hakansson <[email protected]>
# Adam.Dybbroe <[email protected]>

"""Script to convert MERSI-2 level-1 to PPS level-1c format using Pytroll/Satpy."""

import argparse
from level1c4pps.mersi2pps_lib import process_one_scene


if __name__ == "__main__":
""" Create PPS-format level1c data
From a list of MERSI-2/3 level-1 files create a NWCSAF/PPS formatet level1c file for pps.
"""
parser = argparse.ArgumentParser(
description=('Script to produce a PPS-level1c file for a MERSI-2/3 level-1 scene'))
parser.add_argument('files', metavar='fileN', type=str, nargs='+',
help='List of MERSI-2/3 files to process')
parser.add_argument('-o', '--out_dir', type=str, nargs='?',
required=False, default='.',
help="Output directory where to store the level1c file")
parser.add_argument('-ne', '--nc_engine', type=str, nargs='?',
required=False, default='h5netcdf',
help="Engine for saving netcdf files netcdf4 or h5netcdf (default).")
parser.add_argument('-on', '--orbit_number', type=int, nargs='?',
required=False, default=0,
help="Orbit number (default is 00000).")
options = parser.parse_args()
process_one_scene(options.files, options.out_dir, engine=options.nc_engine,
orbit_n=options.orbit_number)
2 changes: 1 addition & 1 deletion level1c4pps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def convert_angles(scene, delete_azimuth=False):
'sunazimuth': np.array([-18000, 18000], dtype='int16'),
'satazimuth': np.array([-18000, 18000], dtype='int16'),
},
'mersi2_file_key': {
'mersi_file_key': {
'sunzenith': 'Geolocation/SolarZenithAngle',
'satzenith': 'Geolocation/SensorZenithAngle',
'azimuthdiff': 'Geolocation/SensorSolarAzimuthDifference',
Expand Down
134 changes: 0 additions & 134 deletions level1c4pps/mersi22pps_lib.py

This file was deleted.

Loading

0 comments on commit a274565

Please sign in to comment.