Skip to content

Commit a274565

Browse files
Merge pull request #91 from foua-pps/merci3_support
adding support for handling mersi3 data
2 parents 5146ff7 + fad5ca0 commit a274565

9 files changed

+236
-223
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ agency specific level-1 formats. So far, supports
1010

1111
- EUMETSAT Meteosat Second Generation SEVIRI HRIT level-1.5
1212
- NOAA AVHRR GAC
13-
- MERSI-2 level-1
13+
- MERSI-2/3 level-1
1414
- MODIS level-1
1515
- AVHRR eps level-1b
1616
- AVHRR AAPP level-1b
1717
- VIIRS level-1b
1818
- SLSTR level-1b
1919
- EPS-SG MetImage level-1 test data
20-
- EUMETSAT AVHRR GAC FDR
20+
- EUMETSAT AVHRR GAC FDR

bin/mersi22pps.py

-50
This file was deleted.

bin/mersi22pps.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mersi2pps.py

bin/mersi2pps.py

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# Copyright (c) 2019 level1c4pps developers
4+
#
5+
# This file is part of level1c4pps
6+
#
7+
# level1c4pps is free software: you can redistribute it and/or modify it
8+
# under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# level1c4pps is distributed in the hope that it will be useful, but
13+
# WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
# General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with level1c4pps. If not, see <http://www.gnu.org/licenses/>.
19+
# Author(s):
20+
21+
# Martin Raspaud <martin.raspaud@smhi.se>
22+
# Nina Hakansson <nina.hakansson@smhi.se>
23+
# Adam.Dybbroe <adam.dybbroe@smhi.se>
24+
25+
"""Script to convert MERSI-2 level-1 to PPS level-1c format using Pytroll/Satpy."""
26+
27+
import argparse
28+
from level1c4pps.mersi2pps_lib import process_one_scene
29+
30+
31+
if __name__ == "__main__":
32+
""" Create PPS-format level1c data
33+
From a list of MERSI-2/3 level-1 files create a NWCSAF/PPS formatet level1c file for pps.
34+
"""
35+
parser = argparse.ArgumentParser(
36+
description=('Script to produce a PPS-level1c file for a MERSI-2/3 level-1 scene'))
37+
parser.add_argument('files', metavar='fileN', type=str, nargs='+',
38+
help='List of MERSI-2/3 files to process')
39+
parser.add_argument('-o', '--out_dir', type=str, nargs='?',
40+
required=False, default='.',
41+
help="Output directory where to store the level1c file")
42+
parser.add_argument('-ne', '--nc_engine', type=str, nargs='?',
43+
required=False, default='h5netcdf',
44+
help="Engine for saving netcdf files netcdf4 or h5netcdf (default).")
45+
parser.add_argument('-on', '--orbit_number', type=int, nargs='?',
46+
required=False, default=0,
47+
help="Orbit number (default is 00000).")
48+
options = parser.parse_args()
49+
process_one_scene(options.files, options.out_dir, engine=options.nc_engine,
50+
orbit_n=options.orbit_number)

level1c4pps/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def convert_angles(scene, delete_azimuth=False):
184184
'sunazimuth': np.array([-18000, 18000], dtype='int16'),
185185
'satazimuth': np.array([-18000, 18000], dtype='int16'),
186186
},
187-
'mersi2_file_key': {
187+
'mersi_file_key': {
188188
'sunzenith': 'Geolocation/SolarZenithAngle',
189189
'satzenith': 'Geolocation/SensorZenithAngle',
190190
'azimuthdiff': 'Geolocation/SensorSolarAzimuthDifference',

level1c4pps/mersi22pps_lib.py

-134
This file was deleted.

0 commit comments

Comments
 (0)