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
49b69fa1
Commit
49b69fa1
authored
2 years ago
by
Nick Bearson
Browse files
Options
Downloads
Patches
Plain Diff
add a test for issue51
parent
3daa9198
No related branches found
No related tags found
1 merge request
!32
Resolve "vestigial(?) dim_0 dimensions in the gridded glm output"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_regressions.py
+15
-0
15 additions, 0 deletions
tests/test_regressions.py
with
15 additions
and
0 deletions
tests/test_regressions.py
+
15
−
0
View file @
49b69fa1
...
@@ -267,3 +267,18 @@ def test_issue38_no_valid_data():
...
@@ -267,3 +267,18 @@ def test_issue38_no_valid_data():
assert
(
ds
.
variables
[
'
total_energy
'
][:].
all
()
is
np
.
ma
.
masked
)
assert
(
ds
.
variables
[
'
total_energy
'
][:].
all
()
is
np
.
ma
.
masked
)
assert
(
ds
.
variables
[
'
total_energy
'
][:].
all
()
is
np
.
ma
.
masked
)
assert
(
ds
.
variables
[
'
total_energy
'
][:].
all
()
is
np
.
ma
.
masked
)
assert
((
ds
.
variables
[
'
DQF
'
][:]
==
0
).
all
())
assert
((
ds
.
variables
[
'
DQF
'
][:]
==
0
).
all
())
# checks for a 'dim_0' dimension, which was getting added to nominal_satellite_subpoint_lon unexpectedly
def
test_issue51_dim0
():
completed_process
=
subprocess
.
run
([
'
python
'
,
MINUTE_GRIDDER
,
"
--goes-sector
"
,
"
conus
"
,
os
.
path
.
join
(
TESTDIR
,
"
test-inputs/OR_GLM-L2-LCFA_G16_s20220740000000_e20220740000200_c20220740000227.nc
"
),
os
.
path
.
join
(
TESTDIR
,
"
test-inputs/OR_GLM-L2-LCFA_G16_s20220740000200_e20220740000400_c20220740000428.nc
"
),
os
.
path
.
join
(
TESTDIR
,
"
test-inputs/OR_GLM-L2-LCFA_G16_s20220740000400_e20220740001000_c20220740001027.nc
"
),
])
assert
completed_process
.
returncode
==
0
assert
(
check_fileglob
(
"
CG_GLM-L2-GLMC-M3_G16_s20220740000000_e20220740001000_c*.nc
"
,
1
))
filename
=
glob
(
"
CG_GLM-L2-GLMC-M3_G16_s20220740000000_e20220740001000_c*.nc
"
)[
0
]
ds
=
netCDF4
.
Dataset
(
filename
,
'
r
'
)
assert
(
'
dim_0
'
not
in
ds
.
dimensions
)
\ No newline at end of file
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