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") ...@@ -65,6 +65,9 @@ warnings.filterwarnings("ignore")
import dask import dask
dask.config.set(num_workers=1) dask.config.set(num_workers=1)
GOES_SAT_POSITIONS={'G16': 'east', 'G17': 'west', 'G18': 'west', 'G19': 'east',}
def create_parser(): def create_parser():
def bounded_float(afloat, inclusive_min, inclusive_max): def bounded_float(afloat, inclusive_min, inclusive_max):
value = float(afloat) value = float(afloat)
...@@ -118,12 +121,11 @@ def get_resolution(args): ...@@ -118,12 +121,11 @@ def get_resolution(args):
# if provided "auto" position, we determine the sensor from the filename # if provided "auto" position, we determine the sensor from the filename
def get_goes_position(filenames): def get_goes_position(filenames):
if all("_G16_" in f for f in filenames):
return "east" #Check that all files are the same sat
if all("_G17_" in f for f in filenames): for key, value in GOES_SAT_POSITIONS.items():
return "west" if all(f"_{key}_" in f for f in filenames):
if all("_G18_" in f for f in filenames): return value
return "west"
# we require that all files are from the same sensor and raise an exception if not # 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?") raise ValueError("could not determine GOES position - did you provide a mix of satellites?")
...@@ -484,4 +486,4 @@ def main(): ...@@ -484,4 +486,4 @@ def main():
return 0 return 0
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) sys.exit(main())
\ No newline at end of file
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