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

Merge branch '1.0b1rc2-fixups' into 'master'

1.0b1rc2 fixups

Closes #27

See merge request !13
parents c9ebb26e 7ef0a937
No related branches found
No related tags found
1 merge request!131.0b1rc2 fixups
......@@ -4,7 +4,7 @@ channels:
dependencies:
- conda-pack
- curl
- dask
- dask<=2.3.0 # this is to avoid dask hangs we saw using 2021.2.0
- distributed
- netcdf4
- pip
......@@ -27,4 +27,4 @@ dependencies:
- git+https://github.com/deeplycloudy/lmatools.git@minvaluegrids
- git+https://github.com/deeplycloudy/stormdrain.git
- git+https://github.com/deeplycloudy/glmtools.git@master
- git+https://github.com/pytroll/satpy.git@3544d60940dba9129499ac3ee303c0705a9ddf7b
\ No newline at end of file
- git+https://github.com/pytroll/satpy.git@d556c806e2b66e5ac1c5b0613c6290edfeb43b92
\ No newline at end of file
......@@ -19,7 +19,7 @@ Questions and comments can be directed to csppgeo.issues@ssec.wisc.edu.
The developers wish to thank:
Eric Bruning, developer of the open source glmtools package which this software is based on,
Scott Rudlosky, GOES-R GLM Science Team lead and developer of the Gridded GLM products,
Scott Rudlosky, GOES-R GLM Science Team lead and PI of the NOAA GLM Gridded Products effort,
Lee Byerle and Joe Zajic, NWS TOWR-S team, for their assistance with tile development and AWIPS compatibility.
## COPYRIGHT / LICENSE / DISCLAIMER
......@@ -40,7 +40,7 @@ The University of Wisconsin-Madison Space Science and Engineering Center (SSEC)
To install, extract the tarball and optionally add the bin directory to your PATH.
tar xf cspp-geo-gridded-glm-1.0b1.tar.xz
export PATH=$PATH:$PWD/cspp-geo-gridded-glm-1.0/bin
export PATH=$PATH:$PWD/cspp-geo-gridded-glm-1.0b1/bin
A test data tarball can be downloaded from the same location as the software. Reference output is included. Refer to the EXAMPLES section below to run the test case.​
......
......@@ -44,6 +44,7 @@ import shutil
import atexit
from glob import glob
import socket
import signal
from netCDF4 import Dataset
#from multiprocessing import freeze_support # https://docs.python.org/2/library/multiprocessing.html#multiprocessing.freeze_support
from functools import partial
......@@ -54,9 +55,11 @@ from glmtools.io.glm import parse_glm_filename
from lmatools.grid.fixed import get_GOESR_grid, get_GOESR_coordsys
import logging
log = logging.getLogger(__name__)
import dask
dask.config.set(num_workers=1)
def create_parser():
import argparse
prog = os.getenv('PROG_NAME', sys.argv[0])
......@@ -87,8 +90,8 @@ def create_parser():
"of data is available (default: off)")
parser.add_argument('--system-environment-prefix', default="CG",
help="set the system environment prefix for the output grids (default: CG)")
parser.add_argument('--system-environment-prefix-tiles', default="CG",
help="set the system environment prefix for the output tiles (default: CG)")
parser.add_argument('--system-environment-prefix-tiles', default="CSPP_OR",
help="set the system environment prefix for the output tiles (default: CSPP_OR)")
# from Requirements: "Input is one or more GLM LCFA (L2+) files in mission standard format (nominally three 20-second input files)"
parser.add_argument(dest='filenames', metavar='filename', nargs='+')
return parser
......@@ -157,7 +160,9 @@ def get_outpath_base(args):
start_time, end_time: datetimes that can be used with strftime syntax, e.g.
'./{start_time:%y/%b/%d}/GLM_{start_time:%Y%m%d_%H%M%S}.nc'
"""
ops_environment, algorithm, platform, start_time, end_time, created_time = parse_glm_filename(os.path.basename(args.filenames[0]))
ordered_filenames = sorted(args.filenames)
_, _, platform, start_time, _, _ = parse_glm_filename(os.path.basename(ordered_filenames[0]))
_, _, _, _, end_time, _ = parse_glm_filename(os.path.basename(ordered_filenames[-1]))
sector_short = get_sector_shortstring(args)
mode = "M3" # FIXME: is GLM always in M3?
......@@ -300,8 +305,13 @@ def add_gglm_attrs(netcdf_filename, input_filenames):
except:
log.error("could not add CSPP Geo GGLM attributes to {}".format(netcdf_filename))
def alarm_handler(signum, frame):
raise OSError("Timeout exceeded!")
if __name__ == '__main__':
signal.signal(signal.SIGALRM, alarm_handler)
signal.alarm(10*60) # timeout if we're not done after 10 minutes
# freeze_support() # nb. I don't think this is needed as we're not making windows execs at this time
parser = create_parser()
args = parser.parse_args()
......
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