1 clim_recal.config

clim_recal.config

1.1 Classes

Name Description
BaseRunConfig Manage creating command line scripts to run debiasing cli.
ClimRecalConfig Manage creating command line scripts to run debiasing cli.
ClimRecalRunsConfigType Lists of parameters to generate RunConfigType instances.
RunConfig Manage creating command line scripts to run debiasing cli.
RunConfigType Parameters needed for a model run.

1.1.1 BaseRunConfig

clim_recal.config.BaseRunConfig(self)

Manage creating command line scripts to run debiasing cli.

1.1.2 ClimRecalConfig

clim_recal.config.ClimRecalConfig(self, variables=(VariableOptions.default()), runs=(RunOptions.default()), regions=(RegionOptions.default()), methods=(MethodOptions.default()), multiprocess=False, cpus=DEFAULT_CPUS, hads_input_path=RAW_HADS_PATH, cpm_input_path=RAW_CPM_PATH, output_path=DEFAULT_OUTPUT_PATH, resample_folder=DEFAULT_RESAMPLE_FOLDER, crops_folder=DEFAULT_CROPS_FOLDER, hads_output_folder=HADS_OUTPUT_LOCAL_PATH, cpm_output_folder=CPM_OUTPUT_LOCAL_PATH, cpm_kwargs=dict(), hads_kwargs=dict(), start_index=0, stop_index=None, add_local_dated_results_path=True, add_local_dated_crops_path=True, local_dated_results_path_prefix='run', local_dated_crops_path_prefix='crop', cpm_for_coord_alignment=None, process_cmp_for_coord_alignment=False, cpm_for_coord_alignment_path_converted=False, debug_mode=False)

Manage creating command line scripts to run debiasing cli.

1.1.2.1 Attributes

Name Type Description
variables Sequence[VariableOptions] Variables to include in the model, eg. tasmax, tasmin.
runs Sequence[RunOptions] Which model runs to include, eg. “01”, “08”, “11”.
regions Sequence[RegionOptions] | None Which regions to crop both HADs and CPM data to.
methods Sequence[MethodOptions] Which debiasing methods to apply.
multiprocess bool Whether to use multiprocess where available
cpus int | None Number of cpus to use if multiprocessing
output_path PathLike Path to save all intermediate and final results to.
resample_folder PathLike Path to append to output_path for resampling result files.
crops_folder PathLike Path to append to output_path for cropped resample files.
hads_output_folder PathLike Path to append to output_path / resample_folder for resampling HADs files and to output_path / crop_folder for crops.
cpm_output_folder PathLike Path to append to output_path / resample_folder for resampling CPM files and to output_path / crop_folder for crops.
cpm_kwargs dict A dict of parameters to pass to a CPMResamplerManager.
hads_kwargs dict A dict of parameters to pass to HADsResamplerManager.
cpm_for_coord_alignment PathLike | None A Path to a CPM file to align HADs coordinates to.
debug_mode bool Set to True to add more detailed debug logs, including GDAL.

1.1.2.2 Examples

>>> if not is_data_mounted:
...     pytest.skip(mount_doctest_skip_message)
>>> run_config: ClimRecalConfig = ClimRecalConfig(
...     regions=('Manchester', 'Glasgow'),
...     output_path=test_runs_output_path,
...     cpus=1)
>>> run_config
<ClimRecalConfig(variables_count=1, runs_count=1, regions_count=2,
                 methods_count=1, cpm_folders_count=1,
                 hads_folders_count=1, start_index=0,
                 stop_index=None, cpus=1)>

1.1.2.3 Methods

Name Description
set_cpm_for_coord_alignment If cpm_for_coord_alignment is None use self.cpm_input_path.
1.1.2.3.1 set_cpm_for_coord_alignment

clim_recal.config.ClimRecalConfig.set_cpm_for_coord_alignment()

If cpm_for_coord_alignment is None use self.cpm_input_path.

It would be more efficient to use self.resample_cpm_path as long as that option is used, but support cases of only

1.1.3 ClimRecalRunsConfigType

clim_recal.config.ClimRecalRunsConfigType()

Lists of parameters to generate RunConfigType instances.

1.1.4 RunConfig

clim_recal.config.RunConfig(self)

Manage creating command line scripts to run debiasing cli.

1.1.5 RunConfigType

clim_recal.config.RunConfigType()

Parameters needed for a model run.

Back to top