Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cspp-geo-gridded-glm
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cspp_geo
cspp-geo-gridded-glm
Commits
83b42a46
Commit
83b42a46
authored
3 years ago
by
Nick Bearson
Browse files
Options
Downloads
Patches
Plain Diff
move our realtime handling outside of grid_setup
parent
255fea52
No related branches found
No related tags found
1 merge request
!26
group inputs by minute and process accordingly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gridded_glm/libexec/_minute_gridder.py
+13
-13
13 additions, 13 deletions
gridded_glm/libexec/_minute_gridder.py
with
13 additions
and
13 deletions
gridded_glm/libexec/_minute_gridder.py
+
13
−
13
View file @
83b42a46
...
@@ -191,19 +191,6 @@ def grid_setup(args, work_dir=os.getcwd()):
...
@@ -191,19 +191,6 @@ def grid_setup(args, work_dir=os.getcwd()):
min_events
=
None
min_events
=
None
min_groups
=
None
min_groups
=
None
if
args
.
realtime
:
if
len
(
args
.
filenames
)
!=
1
:
log
.
error
(
"
realtime mode only accepts one input file
"
)
exit
(
1
)
glminfo
=
parse_glm_filename
(
os
.
path
.
basename
(
args
.
filenames
[
0
]))
globstring
=
"
{}_{}_{}_s{}*
"
.
format
(
glminfo
[
0
],
glminfo
[
1
],
glminfo
[
2
],
glminfo
[
3
].
strftime
(
"
%Y%j%H%M
"
))
fileglob
=
glob
(
os
.
path
.
join
(
os
.
path
.
dirname
(
args
.
filenames
[
0
]),
globstring
))
if
len
(
fileglob
)
!=
3
:
log
.
error
(
"
There are not (yet) three GLM files from this minute. This may be expected. Exiting.
"
)
exit
(
0
)
args
.
filenames
=
fileglob
for
f
in
args
.
filenames
:
for
f
in
args
.
filenames
:
if
not
os
.
path
.
exists
(
f
):
if
not
os
.
path
.
exists
(
f
):
log
.
error
(
"
Tried to grid file that does not exist: {}
"
.
format
(
f
))
log
.
error
(
"
Tried to grid file that does not exist: {}
"
.
format
(
f
))
...
@@ -331,6 +318,19 @@ if __name__ == '__main__':
...
@@ -331,6 +318,19 @@ if __name__ == '__main__':
log
.
info
(
"
Starting GLM Gridding
"
)
log
.
info
(
"
Starting GLM Gridding
"
)
log
.
debug
(
"
Starting script with: %s
"
,
sys
.
argv
)
log
.
debug
(
"
Starting script with: %s
"
,
sys
.
argv
)
if
args
.
realtime
:
if
len
(
args
.
filenames
)
!=
1
:
log
.
error
(
"
realtime mode only accepts one input file
"
)
exit
(
1
)
glminfo
=
parse_glm_filename
(
os
.
path
.
basename
(
args
.
filenames
[
0
]))
globstring
=
"
{}_{}_{}_s{}*
"
.
format
(
glminfo
[
0
],
glminfo
[
1
],
glminfo
[
2
],
glminfo
[
3
].
strftime
(
"
%Y%j%H%M
"
))
fileglob
=
glob
(
os
.
path
.
join
(
os
.
path
.
dirname
(
args
.
filenames
[
0
]),
globstring
))
if
len
(
fileglob
)
!=
3
:
log
.
error
(
"
There are not (yet) three GLM files from this minute. This may be expected. Exiting.
"
)
exit
(
0
)
args
.
filenames
=
fileglob
# set up output dir
# set up output dir
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment