Skip to content

Commit

Permalink
Implemented Bengts suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
salomoneliassonSMHI committed Oct 11, 2024
1 parent f9a07e5 commit f9d08dc
Show file tree
Hide file tree
Showing 2 changed files with 308 additions and 310 deletions.
14 changes: 6 additions & 8 deletions bin/vgac2pps.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"""Script to convert VIIRS level-1 to PPS level-1c format using Pytroll/Satpy."""

import argparse
from level1c4pps.vgac2pps_lib import process_one_scene
from level1c4pps.vgac2pps_lib import SBAF, process_one_scene


if __name__ == "__main__":
Expand All @@ -45,12 +45,11 @@
help="Engine for saving netcdf files netcdf4 or h5netcdf (default).")
parser.add_argument('-all_ch', '--all_channels', action='store_true',
help="Save all 21 channels to level1c4pps file.")
parser.add_argument('-n19', '--as_noaa19', action='store_true',
parser.add_argument('-n19', '--as_noaa19',
options=[version for version in SBAF],
default=None,
help=("Save only the AVHRR (1,2, 3B, 4, 5) channels to level1c4pps file. "
"And apply SBAFs to the channels."))
parser.add_argument('--SBAF',
help='SBAF version "v2" or "v3".',
default='v3')
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',
Expand All @@ -63,7 +62,6 @@
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, noaa19_sbaf_version=options.as_noaa19,
avhrr_channels=options.avhrr_channels,
split_files_at_midnight=not options.don_split_files_at_midnight,
SBAF_version=options.SBAF)
split_files_at_midnight=not options.don_split_files_at_midnight)
Loading

0 comments on commit f9d08dc

Please sign in to comment.