def gen_cube_wrapper(input_paths, output_path, no_sort_mode=False, input_processor_name=None) \ -> Tuple[bool, Optional[str]]: output = None def output_monitor(msg): nonlocal output if output is None: output = msg + '\n' else: output += msg + '\n' config = get_config_dict( input_paths=input_paths, input_processor_name=input_processor_name, output_path=output_path, output_size='320,180', output_region='-4,47,12,56', output_resampling='Nearest', output_variables='analysed_sst', no_sort_mode=no_sort_mode, ) output_metadata = dict( title='Test Cube', project='xcube', ) return gen_cube(dry_run=False, monitor=output_monitor, output_metadata=output_metadata, **config), output
def gen(input: Sequence[str], proc: str, config: Sequence[str], output: str, format: str, size: str, region: str, variables: str, resampling: str, append: bool, prof: bool, dry_run: bool, info: bool, no_sort: bool): """ Generate xcube dataset. Data cubes may be created in one go or successively for all given inputs. Each input is expected to provide a single time slice which may be appended, inserted or which may replace an existing time slice in the output dataset. The input paths may be one or more input files or a pattern that may contain wildcards '?', '*', and '**'. The input paths can also be passed as lines of a text file. To do so, provide exactly one input file with ".txt" extension which contains the actual input paths to be used. """ dry_run = dry_run info_mode = info if info_mode: print(_format_info()) return 0 from xcube.core.gen.config import get_config_dict from xcube.core.gen.gen import gen_cube config = get_config_dict( input_paths=input, input_processor_name=proc, config_files=config, output_path=output, output_writer_name=format, output_size=size, output_region=region, output_variables=variables, output_resampling=resampling, profile_mode=prof, append_mode=append, no_sort_mode=no_sort, ) def flushing_monitor(*args, **kwargs): print(*args, flush=True, **kwargs) gen_cube(dry_run=dry_run, monitor=flushing_monitor, **config) return 0
def process_inputs_wrapper(input_paths=None, output_path=None, output_writer=None, output_writer_params=None): return gen_cube(input_paths=input_paths, input_processor_name='vito-s2plus-l2', output_size=(6, 4), output_region=(0.2727627754211426, 51.3291015625, 0.273336261510849, 51.329463958740234), output_resampling='Nearest', output_variables=[('rrs_443', None), ('rrs_665', None)], output_path=output_path, output_writer_name=output_writer, output_writer_params=output_writer_params, dry_run=False, monitor=None)
def process_inputs_wrapper(input_paths=None, output_path=None, output_writer='netcdf4', append_mode=False): return gen_cube(input_paths=input_paths, input_processor_name='rbins-seviri-highroc-scene-l2', output_region=(-4., 47., 12., 56.), output_size=(320, 180), output_resampling='Nearest', output_path=output_path, output_writer_name=output_writer, output_variables=[('KPAR', None), ('SPM', None), ('TUR', None)], append_mode=append_mode, dry_run=False, monitor=None)
def process_inputs_wrapper(input_path=None, input_processor_name=None, output_path=None, output_writer='netcdf4', append_mode=False, no_sort_mode=False, monitor=None): return gen_cube(input_paths=input_path, input_processor_name=input_processor_name, output_region=(0., 50., 5., 52.5), output_size=(2000, 1000), output_resampling='Nearest', output_path=output_path, output_writer_name=output_writer, output_variables=[('conc_chl', None), ('conc_tsm', None), ('kd489', None)], append_mode=append_mode, no_sort_mode=no_sort_mode, dry_run=False, monitor=monitor)