Skip to content

Commit

Permalink
Add option to run like VIIRS with only AVHRR channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Nina.Hakansson committed Apr 15, 2024
1 parent 2d22418 commit da890fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/vgac2pps.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@
help="Save all 36 channels to level1c4pps file.")
parser.add_argument('-pps_ch', '--pps_channels', action='store_true',
help="Save only the necessary (for PPS) channels to level1c4pps file.")
parser.add_argument('-avhrr_ch', '--avhrr_channels', action='store_true',
help="Save only the AVHRR (1,2, 3B, 4, 5) channels to level1c4pps file.")
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,
all_channels=options.all_channels, pps_channels=options.pps_channels,
orbit_n=options.orbit_number, as_noaa19=options.as_noaa19)
orbit_n=options.orbit_number, as_noaa19=options.as_noaa19, avhrr_channels=options.avhrr_channels)
4 changes: 3 additions & 1 deletion level1c4pps/vgac2pps_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def set_header_and_band_attrs(scene, orbit_n=0):


def process_one_scene(scene_files, out_path, engine='h5netcdf',
all_channels=False, pps_channels=False, orbit_n=0, as_noaa19=False):
all_channels=False, pps_channels=False, orbit_n=0, as_noaa19=False, avhrr_channels=False):
"""Make level 1c files in PPS-format."""
tic = time.time()
scn_ = Scene(
Expand All @@ -189,6 +189,8 @@ def process_one_scene(scene_files, out_path, engine='h5netcdf',
MY_MBAND = MBAND_PPS
if as_noaa19:
MY_MBAND = MBAND_AVHRR
if avhrr_channels:
MY_MBAND = MBAND_AVHRR

scn_.load(MY_MBAND
+ ANGLE_NAMES
Expand Down

0 comments on commit da890fd

Please sign in to comment.