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
6feb3841
Commit
6feb3841
authored
4 years ago
by
Nick Bearson
Browse files
Options
Downloads
Patches
Plain Diff
adds the trio picker functionality to the minute gridder
parent
bef47676
No related branches found
No related tags found
1 merge request
!7
Resolve "integrate trio picker with the main script, as an option"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gridded_glm/libexec/_minute_gridder.py
+17
-0
17 additions, 0 deletions
gridded_glm/libexec/_minute_gridder.py
with
17 additions
and
0 deletions
gridded_glm/libexec/_minute_gridder.py
+
17
−
0
View file @
6feb3841
...
...
@@ -56,6 +56,10 @@ def create_parser():
type
=
float
,
help
=
'
center latitude (required for meso)
'
)
parser
.
add_argument
(
'
--ctr-lon
'
,
metavar
=
'
longitude
'
,
type
=
float
,
help
=
'
center longitude (required for meso)
'
)
parser
.
add_argument
(
'
-1
'
,
"
--realtime
"
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
enable
'
realtime
'
mode, where we expect only one input file,
\n
"
"
find the surrounding trio, and automatically determine if a full minute
\n
"
"
of data is available (default: off)
"
)
# 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
...
...
@@ -110,6 +114,19 @@ def grid_setup(args, work_dir=os.getcwd()):
min_events
=
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
:
print
(
"
There are not (yet) three GLM files from this minute. This may be expected. Exiting.
"
)
exit
(
0
)
args
.
filenames
=
fileglob
try
:
start_time
,
end_time
=
get_start_end
(
args
.
filenames
)
except
ValueError
:
...
...
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