diff --git a/.nojekyll b/.nojekyll index 51f1de47..445f13fd 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -9bc63c72 \ No newline at end of file +48e9e6cb \ No newline at end of file diff --git a/R/README.html b/R/README.html index 826c9236..1d672f47 100644 --- a/R/README.html +++ b/R/README.html @@ -206,7 +206,7 @@ diff --git a/R/comparing-r-and-python/HADs-reprojection/WIP-Comparing-HADs-grids.html b/R/comparing-r-and-python/HADs-reprojection/WIP-Comparing-HADs-grids.html index d92e3266..0c4efa2e 100644 --- a/R/comparing-r-and-python/HADs-reprojection/WIP-Comparing-HADs-grids.html +++ b/R/comparing-r-and-python/HADs-reprojection/WIP-Comparing-HADs-grids.html @@ -240,7 +240,7 @@ diff --git a/R/misc/Identifying_Runs.html b/R/misc/Identifying_Runs.html index 7c436740..f87eac27 100644 --- a/R/misc/Identifying_Runs.html +++ b/R/misc/Identifying_Runs.html @@ -240,7 +240,7 @@ diff --git a/README.html b/README.html index 9f8ff2ff..14c2e35e 100644 --- a/README.html +++ b/README.html @@ -240,7 +240,7 @@ diff --git a/docs/contributing.html b/docs/contributing.html index 6db26ef3..71a2de12 100644 --- a/docs/contributing.html +++ b/docs/contributing.html @@ -240,7 +240,7 @@ diff --git a/docs/datasets.html b/docs/datasets.html index 1bd2e730..b0ee4fa1 100644 --- a/docs/datasets.html +++ b/docs/datasets.html @@ -206,7 +206,7 @@ diff --git a/docs/docker-configurations.html b/docs/docker-configurations.html index 0350ead9..2bbb8c5a 100644 --- a/docs/docker-configurations.html +++ b/docs/docker-configurations.html @@ -240,7 +240,7 @@ diff --git a/docs/pipeline_guidance.html b/docs/pipeline_guidance.html index 9eb0e271..5c740dcd 100644 --- a/docs/pipeline_guidance.html +++ b/docs/pipeline_guidance.html @@ -240,7 +240,7 @@ @@ -397,7 +397,7 @@

diff --git a/docs/reference/clim_recal.config.html b/docs/reference/clim_recal.config.html index d4d0c330..a78f48fa 100644 --- a/docs/reference/clim_recal.config.html +++ b/docs/reference/clim_recal.config.html @@ -240,7 +240,7 @@ @@ -364,7 +364,7 @@

1.1.1 ClimRecalConfig

-

clim_recal.config.ClimRecalConfig(self, command_dir=COMMAND_DIR_DEFAULT, run_prefix=RUN_PREFIX_DEFAULT, preprocess_data_file=PREPROCESS_FILE_NAME, run_cmethods_file=CMETHODS_FILE_NAME, data_path=DATA_PATH_DEFAULT, mod_folder=MOD_FOLDER_DEFAULT, obs_folder=OBS_FOLDER_DEFAULT, preprocess_out_folder=PREPROCESS_OUT_FOLDER_DEFAULT, cmethods_out_folder=CMETHODS_OUT_FOLDER_DEFAULT, calib_date_start=CALIB_DATE_START_DEFAULT, calib_date_end=CALIB_DATE_END_DEFAULT, valid_date_start=VALID_DATE_START_DEFAULT, valid_date_end=VALID_DATE_END_DEFAULT, processors=PROCESSORS_DEFAULT, date_format_str=CLI_DATE_FORMAT_STR, date_split_str=DATE_FORMAT_SPLIT_STR, 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, convert_folder=DEFAULT_CONVERT_FOLDER, crops_folder=DEFAULT_CROPS_FOLDER, hads_output_folder=HADS_OUTPUT_PATH, cpm_output_folder=CPM_OUTPUT_PATH, cpm_kwargs=dict(), hads_kwargs=dict(), cpm_crop_kwargs=dict(), hads_crop_kwargs=dict(), convert_start_index=0, convert_stop_index=None, crop_start_index=0, crop_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)

+

clim_recal.config.ClimRecalConfig(self, command_dir=COMMAND_DIR_DEFAULT, run_prefix=RUN_PREFIX_DEFAULT, preprocess_data_file=PREPROCESS_FILE_NAME, run_cmethods_file=CMETHODS_FILE_NAME, data_path=DATA_PATH_DEFAULT, mod_folder=MOD_FOLDER_DEFAULT, obs_folder=OBS_FOLDER_DEFAULT, preprocess_out_folder=PREPROCESS_OUT_FOLDER_DEFAULT, cmethods_out_folder=CMETHODS_OUT_FOLDER_DEFAULT, calib_date_start=CALIB_DATE_START_DEFAULT, calib_date_end=CALIB_DATE_END_DEFAULT, valid_date_start=VALID_DATE_START_DEFAULT, valid_date_end=VALID_DATE_END_DEFAULT, processors=PROCESSORS_DEFAULT, date_format_str=CLI_DATE_FORMAT_STR, date_split_str=DATE_FORMAT_SPLIT_STR, 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.1.1 Attributes

@@ -418,34 +418,34 @@

Path to save all intermediate and final results to. -convert_folder +resample_folder PathLike Path to append to output_path for resampling result files. crops_folder PathLike -Path to append to output_path for cropped convert files. +Path to append to output_path for cropped resample files. hads_output_folder PathLike -Path to append to output_path / convert_folder for resampling HADs files and to output_path / crop_folder for crops. +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 / convert_folder for resampling CPM files and to output_path / crop_folder for crops. +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 CPMConvertManager. +A dict of parameters to pass to a CPMResamplerManager. hads_kwargs dict -A dict of parameters to pass to HADsConvertManager. +A dict of parameters to pass to HADsResamplerManager. cpm_for_coord_alignment @@ -468,14 +468,11 @@

... regions=('Manchester', 'Glasgow'), ... output_path=test_runs_output_path, ... cpus=1) -'set_cpm_for_coord_alignment' for 'HADs' not speficied. -Defaulting to 'self.cpm_input_path': '.../ClimateData/Raw/UKCP2.2' ->>> run_config -<ClimRecalConfig(variables_count=1, runs_count=1, regions_count=2, - methods_count=1, cpm_folders_count=1, - hads_folders_count=1, convert_start_index=0, - convert_stop_index=None, crop_start_index=0, - crop_stop_index=None, 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.1.3 Methods

@@ -504,19 +501,17 @@
1.1.1.3.1.1 Examples
>>> clim_runner: ClimRecalConfig = getfixture('clim_runner')
-'set_cpm_for_coord_alignment' for 'HADs' not speficied.
-Defaulting to 'self.cpm_input_path': '...'
->>> runs: dict[tuple, dict] = clim_runner.run_models()
->>> pprint(tuple(runs.keys()))
-(('Glasgow', 'tasmax', '05', 'quantile_delta_mapping'),
- ('Manchester', 'tasmax', '05', 'quantile_delta_mapping'))
+>>> runs: dict[tuple, dict] = clim_runner.run_models() +>>> pprint(tuple(runs.keys())) +(('Glasgow', 'tasmax', '05', 'quantile_delta_mapping'), + ('Manchester', 'tasmax', '05', 'quantile_delta_mapping'))
1.1.1.3.2 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.convert_cpm_path as long as that option is used, but support cases of only

+

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

diff --git a/docs/reference/clim_recal.data_loader.html b/docs/reference/clim_recal.data_loader.html index 44f7a900..2ef505aa 100644 --- a/docs/reference/clim_recal.data_loader.html +++ b/docs/reference/clim_recal.data_loader.html @@ -206,7 +206,7 @@ diff --git a/docs/reference/clim_recal.debiasing.debias_wrapper.html b/docs/reference/clim_recal.debiasing.debias_wrapper.html index 64a22f7b..cc34c943 100644 --- a/docs/reference/clim_recal.debiasing.debias_wrapper.html +++ b/docs/reference/clim_recal.debiasing.debias_wrapper.html @@ -240,7 +240,7 @@ diff --git a/docs/reference/clim_recal.pipeline.html b/docs/reference/clim_recal.pipeline.html index bf514114..5754ecdc 100644 --- a/docs/reference/clim_recal.pipeline.html +++ b/docs/reference/clim_recal.pipeline.html @@ -240,7 +240,7 @@ @@ -387,7 +387,7 @@

3 Reproject UKCP<

4 Resample CPM

New approach:

@@ -407,10 +407,10 @@

$ clim-recal --all-variables --default-runs --output-path /where/results/should/be/written clim-recal pipeline configurations: <ClimRecalConfig(variables_count=3, runs_count=4, regions_count=1, methods_count=1, - cpm_folders_count=12, hads_folders_count=3, convert_start_index=0, - convert_stop_index=None, cpus=2)> -<CPMConvertManager(variables_count=3, runs_count=4, input_paths_count=12)> -<HADsConvertManager(variables_count=3, input_paths_count=3)> + cpm_folders_count=12, hads_folders_count=3, start_index=0, + stop_index=None, cpus=2)> +<CPMResamplerManager(variables_count=3, runs_count=4, input_paths_count=12)> +<HADsResamplerManager(variables_count=3, input_paths_count=3)>

Otherwise, you can install locally and either run via pdm from the python folder

$ cd clim-recal/python
 $ pdm run clim-recal --all-variables --default-runs --output-path /where/results/should/be/written
@@ -424,14 +424,14 @@ 

$ clim-recal --all-variables --default-runs --output-path /where/results/should/be/written --execute clim-recal pipeline configurations: <ClimRecalConfig(variables_count=3, runs_count=4, regions_count=1, methods_count=1, - cpm_folders_count=12, hads_folders_count=3, convert_start_index=0, - convert_stop_index=None, cpus=2)> -<CPMConvertManager(variables_count=3, runs_count=4, input_paths_count=12)> -<HADsConvertManager(variables_count=3, input_paths_count=3)> + cpm_folders_count=12, hads_folders_count=3, start_index=0, + stop_index=None, cpus=2)> +<CPMResamplerManager(variables_count=3, runs_count=4, input_paths_count=12)> +<HADsResamplerManager(variables_count=3, input_paths_count=3)> Running CPM Standard Calendar projection... -<CPMConvert(count=100, max_count=100, +<CPMResampler(count=100, max_count=100, input_path='/mnt/vmfileshare/ClimateData/Raw/UKCP2.2/tasmax/05/latest', - output_path='/mnt/vmfileshare/ClimateData/CPM-365/test-run-3-may/convert/ + output_path='/mnt/vmfileshare/ClimateData/CPM-365/test-run-3-may/resample/ cpm/tasmax/05/latest')> 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100/100 [ 0:38:27 < 0:00:00 , 0 it/s ] 87% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87/100 [ 0:17:42 < 0:03:07 , 0 it/s ]

@@ -485,16 +485,16 @@

8.1.1 main

-

clim_recal.pipeline.main(execute=False, hads_input_path=RAW_HADS_PATH, cpm_input_path=RAW_CPM_PATH, output_path=DEFAULT_OUTPUT_PATH, variables=(VariableOptions.default()), regions=(RegionOptions.default()), runs=(RunOptions.default()), methods=(MethodOptions.default()), all_variables=False, all_regions=False, default_runs=False, all_runs=False, all_methods=False, convert_hads=False, convert_cpm=False, crop_hads=True, crop_cpm=True, cpus=None, multiprocess=False, convert_start_index=0, convert_stop_index=None, crop_start_index=0, crop_stop_index=None, total=None, print_range_length=5, **kwargs)

+

clim_recal.pipeline.main(execute=False, hads_input_path=RAW_HADS_PATH, cpm_input_path=RAW_CPM_PATH, output_path=DEFAULT_OUTPUT_PATH, variables=(VariableOptions.default()), regions=(RegionOptions.default()), runs=(RunOptions.default()), methods=(MethodOptions.default()), all_variables=False, all_regions=False, default_runs=False, all_runs=False, all_methods=False, hads_projection=False, cpm_projection=False, crop_hads=True, crop_cpm=True, cpus=None, multiprocess=False, start_index=0, stop_index=None, total=None, print_range_length=5, **kwargs)

Run all elements of the pipeline.

8.1.1.1 Parameters

--++-+ @@ -548,36 +548,18 @@

False

- + - - - - - - - - - - - - - - - - - - - + - + @@ -593,10 +575,10 @@

8.1.1.3 Examples

Note the _allow_check_fail parameters support running the examples without data mounted from a server.

-
>>> if not is_data_mounted:
-...     pytest.skip(mount_doctest_skip_message)
->>> main(variables=("rainfall", "tasmin"),
-...      output_path=test_runs_output_path,
+
>>> main(variables=("rainfall", "tasmin"),
+...      output_path=test_runs_output_path,
+...      cpm_kwargs=dict(_allow_check_fail=True),
+...      hads_kwargs=dict(_allow_check_fail=True),
 ... )
 'set_cpm_for_coord_alignment' for 'HADs' not speficied.
 Defaulting to 'self.cpm_input_path': '...'
@@ -604,14 +586,12 @@ 

<ClimRecalConfig(variables_count=2, runs_count=1, regions_count=1, methods_count=1, cpm_folders_count=2, hads_folders_count=2, - convert_start_index=0, convert_stop_index=None, - crop_start_index=0, crop_stop_index=None, cpus=...)> -<CPMConvertManager(variables_count=2, runs_count=1, + start_index=0, stop_index=None, + cpus=...)> +<CPMResamplerManager(variables_count=2, runs_count=1, input_paths_count=2)> -<HADsConvertManager(variables_count=2, input_paths_count=2)> -<CPMRegionCropManager(variables_count=2, input_paths_count=2)> -<HADsRegionCropManager(variables_count=2, input_paths_count=2)> -No steps run. Add '--execute' to run steps.

+<HADsResamplerManager(variables_count=2, input_paths_count=2)> +No steps run. Add '--execute' to run steps.
diff --git a/docs/reference/clim_recal.convert.html b/docs/reference/clim_recal.resample.html similarity index 69% rename from docs/reference/clim_recal.convert.html rename to docs/reference/clim_recal.resample.html index bf138962..a3621ace 100644 --- a/docs/reference/clim_recal.convert.html +++ b/docs/reference/clim_recal.resample.html @@ -7,7 +7,7 @@ -clim_recal.convert – clim-recal +clim_recal.resample – clim-recal

convert_start_indexstart_index int Index to start all iterations from. 0
convert_stop_indexint | NoneNumber of files from convert_start_index to convert.None
crop_start_indexintIndex to start all crop iterations from.0
crop_stop_indexint | NoneNumber of files iterating from crop_start_index to crop.None
total int | NoneTotal number of records to iterate over. 0 and None indicate all values from convert_start_index.Total number of records to iterate over. 0 and None indicate all values from start_index. None
**kwargs Additional parameters to pass to a ClimRecalConfig.