Skip to content
Snippets Groups Projects
Commit 53cc1e7d authored by Levi Pfantz's avatar Levi Pfantz
Browse files

add G19 support

parent cc04d47a
No related branches found
No related tags found
2 merge requests!37Merge work from 1.1 into master,!35Merge Feature g19 into develop
......@@ -65,6 +65,9 @@ warnings.filterwarnings("ignore")
import dask
dask.config.set(num_workers=1)
GOES_SAT_POSITIONS={'G16': 'east', 'G17': 'west', 'G18': 'west', 'G19': 'east',}
def create_parser():
def bounded_float(afloat, inclusive_min, inclusive_max):
value = float(afloat)
......@@ -118,12 +121,11 @@ def get_resolution(args):
# if provided "auto" position, we determine the sensor from the filename
def get_goes_position(filenames):
if all("_G16_" in f for f in filenames):
return "east"
if all("_G17_" in f for f in filenames):
return "west"
if all("_G18_" in f for f in filenames):
return "west"
#Check that all files are the same sat
for key, value in GOES_SAT_POSITIONS.items():
if all(f"_{key}_" in f for f in filenames):
return value
# we require that all files are from the same sensor and raise an exception if not
raise ValueError("could not determine GOES position - did you provide a mix of satellites?")
......@@ -484,4 +486,4 @@ def main():
return 0
if __name__ == '__main__':
sys.exit(main())
\ No newline at end of file
sys.exit(main())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment