diff --git a/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000000_e20240040000200_c20240040000219.nc b/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000000_e20240040000200_c20240040000219.nc new file mode 100644 index 0000000000000000000000000000000000000000..b1ae425272000e8a3c86b309b540cc5ce15f68d6 --- /dev/null +++ b/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000000_e20240040000200_c20240040000219.nc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c19d812a13cf7112fe47dfaa95c528c6398ca735b2fcbadd771ebd10193464eb +size 345916 diff --git a/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000200_e20240040000400_c20240040000416.nc b/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000200_e20240040000400_c20240040000416.nc new file mode 100644 index 0000000000000000000000000000000000000000..432795b43163198800d74dc497681d3c97c44eab --- /dev/null +++ b/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000200_e20240040000400_c20240040000416.nc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ac544e1dc2325c11b8a11098a0604a3903887b585b6ce9a22989e8f91aebe71 +size 315196 diff --git a/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000400_e20240040001000_c20240040001016.nc b/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000400_e20240040001000_c20240040001016.nc new file mode 100644 index 0000000000000000000000000000000000000000..e528bf470d5851cd8b08e6048f68f931293da47e --- /dev/null +++ b/tests/test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000400_e20240040001000_c20240040001016.nc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e917d350318a0f8e9e780c1ec906a4ec025505ada5c7d6d0f6bfe5f435b17128 +size 384828 diff --git a/tests/test_functionality.py b/tests/test_functionality.py index ece6033a63ff0ef473a4e72a9a919963bf270d44..6e206631f77a0ad61dab39822fdf29955efdde30 100644 --- a/tests/test_functionality.py +++ b/tests/test_functionality.py @@ -131,9 +131,9 @@ def test_g17(): assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G17_T23_20220920192200.nc', 1)) def test_g18(): - inputs = [os.path.join(TESTDIR, "test-inputs/OR_GLM-L2-LCFA_G18_s20222210000000_e20222210000200_c20222210000225.nc"), - os.path.join(TESTDIR, "test-inputs/OR_GLM-L2-LCFA_G18_s20222210000200_e20222210000400_c20222210000424.nc"), - os.path.join(TESTDIR, "test-inputs/OR_GLM-L2-LCFA_G18_s20222210000400_e20222210001000_c20222210001027.nc")] + inputs = [os.path.join(TESTDIR, "test-inputs/OR_GLM-L2-LCFA_G18_s20223141900000_e20223141900200_c20223141900209.nc"), + os.path.join(TESTDIR, "test-inputs/OR_GLM-L2-LCFA_G18_s20223141900200_e20223141900400_c20223141900415.nc"), + os.path.join(TESTDIR, "test-inputs/OR_GLM-L2-LCFA_G18_s20223141900400_e20223141901000_c20223141901015.nc")] for i in inputs: if not os.path.exists(i): warnings.warn(UserWarning("GOES-18 test files are not available in this environment. GOES-18 functionality has not been tested.")) @@ -148,22 +148,58 @@ def test_g18(): ]) assert completed_process.returncode == 0 assert(check_fileglob("CG_GLM-L2-GLMF-M3_G18_*.nc", 1)) - assert(check_fileglob("CSPP_OR_GLM-L2-GLMF-M3_G18_T*.nc", 15)) - - assert(check_fileglob("CG_GLM-L2-GLMF-M3_G18_s20222210000000_e20222210001000_c*.nc", 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T04_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T30_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T18_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T29_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T49_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T16_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T27_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T23_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T17_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T20_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T08_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T11_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T21_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T24_20220809000100.nc', 1)) - assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T10_20220809000100.nc', 1)) + assert(check_fileglob("CSPP_OR_GLM-L2-GLMF-M3_G18_T*.nc", 10)) + + assert(check_fileglob("CG_GLM-L2-GLMF-M3_G18_s20223141900000_e20223141901000_c*.nc", 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T11_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T18_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T19_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T24_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T26_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T30_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T37_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T45_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T49_20221110190100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G18_T52_20221110190100.nc', 1)) + +def test_g19_sim(): + inputs = [os.path.join(TESTDIR, "test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000000_e20240040000200_c20240040000219.nc"), + os.path.join(TESTDIR, "test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000400_e20240040001000_c20240040001016.nc"), + os.path.join(TESTDIR, "test-inputs/goes19_sim/OR_GLM-L2-LCFA_G19_s20240040000200_e20240040000400_c20240040000416.nc")] + for i in inputs: + if not os.path.exists(i): + warnings.warn(UserWarning("GOES-19 sim test files are not available in this environment. GOES-19 functionality has not been tested.")) + return + + completed_process = subprocess.run(['python', + MINUTE_GRIDDER, + "--create-tiles", + inputs[0], + inputs[1], + inputs[2], + ]) + assert completed_process.returncode == 0 + assert(check_fileglob("CG_GLM-L2-GLMF-M3_G19_*.nc", 1)) + assert(check_fileglob("CSPP_OR_GLM-L2-GLMF-M3_G19_T*.nc", 18)) + + assert(check_fileglob("CG_GLM-L2-GLMF-M3_G19_s20240040000000_e20240040001000_c*.nc", 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T10_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T11_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T14_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T17_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T27_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T30_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T33_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T34_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T35_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T38_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T39_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T40_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T41_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T46_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T47_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T52_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T53_20240104000100.nc', 1)) + assert(check_fileglob('CSPP_OR_GLM-L2-GLMF-M3_G19_T58_20240104000100.nc', 1)) +