diff --git a/example_local_prepare.py b/example_local_prepare.py index a035a37c3032d536886b44a0efe2938c84f8ce9a..619095a4383c2a01dade3d25e29cc88f673b8e6d 100644 --- a/example_local_prepare.py +++ b/example_local_prepare.py @@ -22,7 +22,7 @@ comp = FUSION_MATLAB() #interval = TimeInterval(granule, granule+timedelta(minutes=0)) satellite = 'snpp' -#satellite = 'jpss1' +#satellite = 'noaa20' #satellite = 'aqua' version = '1.0dev10' # base VIIRS level-1b @@ -32,7 +32,7 @@ def local_execute_example(interval, satellite, version, skip_prepare=False, skip if satellite == 'snpp': LOG.info("We are doing NPP...") - if satellite == 'jpss1': + if satellite == 'noaa20': LOG.info("We are doing JPSS-1 / NOAA-20...") elif satellite == 'aqua': LOG.info("We are doing AQUA...") diff --git a/example_local_prepare_ql.py b/example_local_prepare_ql.py index 450e7d8a5bea265ed1fbd8024c7dfdc8daf23424..ca6a6ea147eb69bbed2c7dde1109743ec95d0739 100644 --- a/example_local_prepare_ql.py +++ b/example_local_prepare_ql.py @@ -22,7 +22,7 @@ comp = FUSION_MATLAB_QL() #interval = TimeInterval(granule, granule+timedelta(minutes=0)) satellite = 'snpp' -#satellite = 'jpss1' +#satellite = 'noaa20' #satellite = 'aqua' version = '1.0dev7' # base VIIRS level-1b @@ -32,7 +32,7 @@ def local_execute_example(interval, satellite, version, skip_prepare=False, skip if satellite == 'snpp': LOG.info("We are doing NPP...") - if satellite == 'jpss1': + if satellite == 'noaa20': LOG.info("We are doing JPSS-1 / NOAA-20...") elif satellite == 'aqua': LOG.info("We are doing AQUA...") diff --git a/source/flo/__init__.py b/source/flo/__init__.py index fdba044b2fee98ddf350a26370b137f3ecc560a4..92c0fd0e2ec4f2a208d007379dd385a21da3fe5d 100644 --- a/source/flo/__init__.py +++ b/source/flo/__init__.py @@ -92,15 +92,15 @@ class FUSION_MATLAB(Computation): def find_contexts(self, time_interval, satellite, version): ''' - Here we assume that the granule boundaries fall along 6-minute (snpp/jpss1) or + Here we assume that the granule boundaries fall along 6-minute (snpp/noaa20) or 5-minute (aqua) increments, starting at the top of the hour: SNPP: [0., 6., 12., 18., 24., 30., 36., 42., 48., 54.] - JPSS1: [0., 6., 12., 18., 24., 30., 36., 42., 48., 54.] + NOAA20:[0., 6., 12., 18., 24., 30., 36., 42., 48., 54.] AQUA: [0., 5., 10., 15., 20., 25., 30., 35., 40., 45., 50., 55.] ''' - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': granule_length = timedelta(minutes=6) elif satellite=='aqua': granule_length = timedelta(minutes=5) @@ -340,7 +340,7 @@ class FUSION_MATLAB(Computation): satellite = context['satellite'] - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': self.build_task_snpp(context, task) elif satellite == 'aqua': self.build_task_aqua(context, task) @@ -526,7 +526,7 @@ class FUSION_MATLAB(Computation): if dummy: if satellite=='snpp': dummy_fusion_file = '/mnt/sdata/geoffc/fusion_matlab/work/snpp_temp_outputs/outputs/tmp5PwThb/VNP02FSN.A2018033.1836.001.2018058173216.nc' - if satellite=='jpss1': + if satellite=='noaa20': dummy_fusion_file = '/mnt/sdata/geoffc/fusion_matlab/work/snpp_temp_outputs/outputs/tmp5PwThb/VNP02FSN.A2018033.1836.001.2018058173216.nc' if satellite=='aqua': dummy_fusion_file = '/mnt/sdata/geoffc/fusion_matlab/work/aqua_temp_outputs/outputs/tmpMUoHF3/MYD02FSN.A2015107.1755.006.2018058170733.hdf' @@ -596,7 +596,7 @@ class FUSION_MATLAB(Computation): #shutil.rmtree(unfused_l1b_dir) # Determine the name of the output fused file - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': esdt = sipsprod.satellite_esdt('V02FSN', satellite) product.options['collection'] = int(basename(l1b_file).split('.')[3]) fused_l1b_file_new = sipsprod.product_filename(esdt, product.options['collection'], @@ -614,7 +614,7 @@ class FUSION_MATLAB(Computation): fused_l1b_file = glob(pjoin(tmp_work_dir, fused_l1b_file_new))[0] # Move the matlab file to its new filename - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': matlab_file_new = basename(fused_l1b_file_new).replace('.nc','.mat') if satellite=='aqua': matlab_file_new = basename(fused_l1b_file_new).replace('.hdf','.mat') @@ -637,11 +637,11 @@ class FUSION_MATLAB(Computation): satellite = kwargs['satellite'] LOG.debug('satellite = {}'.format(satellite)) - band_default = {'aqua':[31, 32], 'snpp':[15, 16], 'jpss1':[15, 16]} + band_default = {'aqua':[31, 32], 'snpp':[15, 16], 'noaa20':[15, 16]} if band is None: band = band_default[satellite] - input_files = [fused_l1b_file] if (satellite=='snpp' or satellite=='jpss1') else [l1b_file, fused_l1b_file] + input_files = [fused_l1b_file] if (satellite=='snpp' or satellite=='noaa20') else [l1b_file, fused_l1b_file] generators = list(SFX[splitext(p)[-1].lower()](p, band) for p in input_files) stuff = list(chain(*generators)) @@ -790,7 +790,7 @@ class FUSION_MATLAB(Computation): LOG.debug("sounder = \n\t{}".format('\n\t'.join(sounder))) # Run viirsmend on the viirs level-1b, and generate the CrIS/VIIRS collocation - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': for idx, l1b_file in enumerate(l1b): if 'bowtie' in basename(l1b_file): @@ -830,7 +830,7 @@ class FUSION_MATLAB(Computation): kwargs['granule'] = granule kwargs['dummy'] = dummy - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': geo_file = geo[1] l1b_file = l1b[1] kwargs['anc_paths'] = [pjoin(anc_dir, 'modis_aqua.srf.nc'), @@ -895,7 +895,7 @@ class FUSION_MATLAB(Computation): out_fn = basename(fused_l1b_file) # Set metadata to be put in the output file. - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': viirs_l1 = product.input('viirs_l1') v02mod_bt_sc = product.input('V02MOD-bt-sc') @@ -935,7 +935,7 @@ class FUSION_MATLAB_QL(Computation): Takes the input time interval, and returns whatever 0Z datetimes fall within the interval. ''' - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': granule_length = timedelta(minutes=6) elif satellite=='aqua': granule_length = timedelta(minutes=5) @@ -1011,7 +1011,7 @@ class FUSION_MATLAB_QL(Computation): satellite = context['satellite'] - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': self.build_task_snpp(context, task) elif satellite == 'aqua': raise ValueError('Satellite option "{}" not yet implemented.'.format(satellite)) diff --git a/source/flo/run_fusion_1gran.py b/source/flo/run_fusion_1gran.py index c2320d348d4ada5e091e363dc47e6ec29ef9887f..ac90e32ae5b21db6a59b6515cfd8bfef6a790c71 100644 --- a/source/flo/run_fusion_1gran.py +++ b/source/flo/run_fusion_1gran.py @@ -132,7 +132,7 @@ def convert_matlab_to_netcdf(matlab_file, l1b_file, **kwargs): LOG.debug("l1b_file = {}".format(l1b_file)) # Copy the un-fused level-1b file to the work directory as a template... - if satellite=='snpp' or satellite=='jpss1': + if satellite=='snpp' or satellite=='noaa20': esdt = satellite_esdt('V02FSN', satellite) collection = int(basename(l1b_file).split('.')[3]) fused_l1b_file_new = product_filename(esdt, collection, dt, created=dt_create) @@ -280,7 +280,7 @@ def main(args): kwargs['anc_paths'] = [pjoin(anc_dir, 'modis_aqua.srf.nc'), pjoin(anc_dir, 'NG_VIIRS_NPP_RSR_filtered_Oct2011_BA/')] - kwargs['satellite'] = {'VNP':'snpp', 'VJ1':'jpss1'}[basename(geo_files[0]).split('.')[0][:3]] + kwargs['satellite'] = {'VNP':'snpp', 'VJ1':'noaa20'}[basename(geo_files[0]).split('.')[0][:3]] kwargs['fusion_binary'] = 'run_imagersounderfusion_V.sh' kwargs['matlab_file_glob'] = 'fusion_output.mat' kwargs['conversion_bin'] = pjoin(py_env_dir, 'bin', 'l1b-fusion-viirs-cris') diff --git a/source/flo/run_fusion_global_ql.py b/source/flo/run_fusion_global_ql.py index 7d7020a0c215ef2fec8af9c40b555687a27a0fd7..5c8fbbacca5cdccd2f2679687883e5cfeba576e1 100644 --- a/source/flo/run_fusion_global_ql.py +++ b/source/flo/run_fusion_global_ql.py @@ -65,7 +65,7 @@ def run_fusion_quicklooks(fusion_dir, geo_dir, **kwargs): satellite = kwargs['satellite'] env = kwargs['env'] - fusion_prefix = {'snpp':'VNP', 'jpss1':'VJ1'}[satellite] + fusion_prefix = {'snpp':'VNP', 'noaa20':'VJ1'}[satellite] fusion_files = sorted(glob(pjoin(fusion_dir,'{}02FSN*.nc'.format(fusion_prefix)))) geo_files = sorted(glob(pjoin(geo_dir,'{}03MOD*.nc'.format(fusion_prefix)))) @@ -174,7 +174,7 @@ if __name__ == '__main__': FUSION_DIR : Directory containing V02FSN files" GEO_DIR : Directory containing V03MOD files matching the files in FUSION_DIR" OUTPUT_DIR : Directory where fusion quicklooks are generated" - SATELLITE : The satellite providing the input data (snpp or jpss1)" + SATELLITE : The satellite providing the input data (snpp or noaa20)" """ if len(args) != 5: