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

add a test for issue51

parent 3daa9198
No related branches found
No related tags found
1 merge request!32Resolve "vestigial(?) dim_0 dimensions in the gridded glm output"
...@@ -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
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