Skip to content
Snippets Groups Projects
Commit 5cce2781 authored by Nick Bearson's avatar Nick Bearson
Browse files

eliminate --goes-position (fixes #9)

parent 40e88264
No related branches found
No related tags found
1 merge request!52020 02 10 beta1 high priority
...@@ -39,13 +39,12 @@ if __name__ == '__main__': ...@@ -39,13 +39,12 @@ if __name__ == '__main__':
# and run gridded glm a'la: # and run gridded glm a'la:
# minute_gridder.sh \ # minute_gridder.sh \
# --goes-position auto --goes-sector full \ # --goes-sector full \
# --create-tiles \ # --create-tiles \
# ./2020-11-05/CLASS/OR_GLM-L2-LCFA_G16_s20203101529000_e20203101529205_c20203101529215.nc \ # ./2020-11-05/CLASS/OR_GLM-L2-LCFA_G16_s20203101529000_e20203101529205_c20203101529215.nc \
# ./2020-11-05/CLASS/OR_GLM-L2-LCFA_G16_s20203101529200_e20203101529405_c20203101529430.nc \ # ./2020-11-05/CLASS/OR_GLM-L2-LCFA_G16_s20203101529200_e20203101529405_c20203101529430.nc \
# ./2020-11-05/CLASS/OR_GLM-L2-LCFA_G16_s20203101529400_e20203101530004_c20203101530021.nc # ./2020-11-05/CLASS/OR_GLM-L2-LCFA_G16_s20203101529400_e20203101530004_c20203101530021.nc
subprocess.run(["cspp-geo-gglm-minute-gridder.sh", subprocess.run(["cspp-geo-gglm-minute-gridder.sh",
"--goes-position", "auto",
"--goes-sector", "full", "--goes-sector", "full",
"--create-tiles", "--create-tiles",
fileglob[0], fileglob[1], fileglob[2]] fileglob[0], fileglob[1], fileglob[2]]
......
...@@ -36,12 +36,8 @@ def create_parser(): ...@@ -36,12 +36,8 @@ def create_parser():
default=os.getcwd()) default=os.getcwd())
parser.add_argument('--goes-sector', default="full", parser.add_argument('--goes-sector', default="full",
help="One of [full|conus|meso]. " help="One of [full|conus|meso]. "
"Requires goes_position. If sector is " "If sector is meso, ctr_lon and ctr_lat "
"meso, ctr_lon and ctr_lat are interpreted as " "are interpreted as the ctr_x and ctr_y of the fixed grid.")
"the ctr_x and ctr_y of the fixed grid")
parser.add_argument('--goes-position', default="auto",
help="One of [east|west|test|auto]. "
"Requires '--goes-sector'.")
parser.add_argument("-t", "--create-tiles", default=False, action='store_true', parser.add_argument("-t", "--create-tiles", default=False, action='store_true',
help="create AWIPS-compatible tiles") # FIXME: improve this help text help="create AWIPS-compatible tiles") # FIXME: improve this help text
parser.add_argument('--ctr-lat', metavar='latitude', parser.add_argument('--ctr-lat', metavar='latitude',
...@@ -99,7 +95,7 @@ def get_goes_position(filenames): ...@@ -99,7 +95,7 @@ def get_goes_position(filenames):
return "west" 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("position 'auto' but could not determine position - did you provide a mix of satellites?") raise ValueError("could not determine GOES position - did you provide a mix of satellites?")
def get_start_end(filenames, start_time=None, end_time=None): def get_start_end(filenames, start_time=None, end_time=None):
...@@ -145,10 +141,7 @@ def grid_setup(args, work_dir=os.getcwd()): ...@@ -145,10 +141,7 @@ def grid_setup(args, work_dir=os.getcwd()):
outputpath = os.path.join(work_dir, "{dataset_name}") # GLMTools expects a template in addition to the path outputpath = os.path.join(work_dir, "{dataset_name}") # GLMTools expects a template in addition to the path
if args.goes_position == "auto": goes_position = get_goes_position(args.filenames)
goes_position = get_goes_position(args.filenames)
else:
goes_position = args.goes_position
resln = get_resolution(args) resln = get_resolution(args)
view = get_GOESR_grid(position=goes_position, view = get_GOESR_grid(position=goes_position,
......
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