def test_dwm_sots_aggregated_timeseries(self): expected_prefix = 'IMOS/DWM/SOTS/aggregated_timeseries' filename = 'IMOS_DWM-SOTS_OZ_20170319_SOTS_FV01_DOX2-aggregated-timeseries_END-20171101_C-20190819.nc' testfile = os.path.join(self.temp_dir, filename) make_test_file( testfile, { 'site_code': 'EAC4700', 'source': 'mooring', 'featureType': 'timeSeries' }) dest_dir, dest_filename = os.path.split( MooringsProductsHandler.dest_path(testfile)) self.assertEqual(dest_dir, expected_prefix) self.assertEqual(dest_filename, filename)
def test_dwm_gridded_timeseries(self): expected_prefix = 'IMOS/DWM/DA/gridded_timeseries' filename = 'IMOS_DWM-DA_TZ_20150519_EAC4700_FV02_TEMP-gridded-timeseries_END-20180422_C-20191216.nc' testfile = os.path.join(self.temp_dir, filename) make_test_file( testfile, { 'site_code': 'EAC4700', 'source': 'mooring', 'featureType': 'timeSeries' }) dest_dir, dest_filename = os.path.split( MooringsProductsHandler.dest_path(testfile)) self.assertEqual(dest_dir, expected_prefix) self.assertEqual(dest_filename, filename)
def test_anmn_gridded_timeseries(self): expected_prefix = 'IMOS/ANMN/NRS/NRSROT/gridded_timeseries' filename = 'IMOS_ANMN-NRS_SZ_20081120_NRSROT_FV02_PSAL-gridded-timeseries_END-20190523_C-20191121.nc' testfile = os.path.join(self.temp_dir, filename) make_test_file( testfile, { 'site_code': 'NRSROT', 'source': 'mooring', 'featureType': 'timeSeriesProfile' }) dest_dir, dest_filename = os.path.split( MooringsProductsHandler.dest_path(testfile)) self.assertEqual(dest_dir, expected_prefix) self.assertEqual(dest_filename, filename)
def test_dwm_hourly_timeseries_nonqc(self): expected_prefix = 'IMOS/DWM/DA/hourly_timeseries' filename = 'IMOS_DWM-DA_STZ_20110613_ITFTSL_FV02_hourly-timeseries-including-non-QC_END-20151024_C-20191010.nc' testfile = os.path.join(self.temp_dir, filename) make_test_file( testfile, { 'site_code': 'ITFTSL', 'source': 'mooring', 'featureType': 'timeSeries' }) dest_dir, dest_filename = os.path.split( MooringsProductsHandler.dest_path(testfile)) self.assertEqual(dest_dir, expected_prefix) self.assertEqual(dest_filename, filename)
def test_anmn_hourly_timeseries_nonqc(self): expected_prefix = 'IMOS/ANMN/QLD/GBRLSL/hourly_timeseries' filename = 'IMOS_ANMN-QLD_BSTUZ_20071103_GBRLSL_FV02_hourly-timeseries-including-non-QC_END-20140523_C-20191010.nc' testfile = os.path.join(self.temp_dir, filename) make_test_file( testfile, { 'site_code': 'GBRLSL', 'source': 'mooring', 'featureType': 'timeSeries' }) dest_dir, dest_filename = os.path.split( MooringsProductsHandler.dest_path(testfile)) self.assertEqual(dest_dir, expected_prefix) self.assertEqual(dest_filename, filename)