Skip to content

Commit da890fd

Browse files
author
Nina.Hakansson
committed
Add option to run like VIIRS with only AVHRR channels
1 parent 2d22418 commit da890fd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

bin/vgac2pps.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@
4848
help="Save all 36 channels to level1c4pps file.")
4949
parser.add_argument('-pps_ch', '--pps_channels', action='store_true',
5050
help="Save only the necessary (for PPS) channels to level1c4pps file.")
51+
parser.add_argument('-avhrr_ch', '--avhrr_channels', action='store_true',
52+
help="Save only the AVHRR (1,2, 3B, 4, 5) channels to level1c4pps file.")
5153
parser.add_argument('-on', '--orbit_number', type=int, nargs='?',
5254
required=False, default=0,
5355
help="Orbit number (default is 00000).")
5456

5557
options = parser.parse_args()
5658
process_one_scene(options.files, options.out_dir, engine=options.nc_engine,
5759
all_channels=options.all_channels, pps_channels=options.pps_channels,
58-
orbit_n=options.orbit_number, as_noaa19=options.as_noaa19)
60+
orbit_n=options.orbit_number, as_noaa19=options.as_noaa19, avhrr_channels=options.avhrr_channels)

level1c4pps/vgac2pps_lib.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def set_header_and_band_attrs(scene, orbit_n=0):
174174

175175

176176
def process_one_scene(scene_files, out_path, engine='h5netcdf',
177-
all_channels=False, pps_channels=False, orbit_n=0, as_noaa19=False):
177+
all_channels=False, pps_channels=False, orbit_n=0, as_noaa19=False, avhrr_channels=False):
178178
"""Make level 1c files in PPS-format."""
179179
tic = time.time()
180180
scn_ = Scene(
@@ -189,6 +189,8 @@ def process_one_scene(scene_files, out_path, engine='h5netcdf',
189189
MY_MBAND = MBAND_PPS
190190
if as_noaa19:
191191
MY_MBAND = MBAND_AVHRR
192+
if avhrr_channels:
193+
MY_MBAND = MBAND_AVHRR
192194

193195
scn_.load(MY_MBAND
194196
+ ANGLE_NAMES

0 commit comments

Comments
 (0)