Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CLIMATE-956 - Revert the changes in run_statistical_downscaling.py
- Some of the changes made by PR #444 have been reverted to make the codes work.
  • Loading branch information
huikyole committed Jun 18, 2018
1 parent 926f65a commit f4aeb8bf4586ef98b40da9802e98e4519f9ad7c0
Showing 1 changed file with 10 additions and 4 deletions.
@@ -155,10 +155,16 @@ def extract_data_at_nearest_grid_point(target_dataset, longitude, latitude):

print(downscale_option_names[DOWNSCALE_OPTION]+": Downscaling model output")

xdownscale = [downscale.Delta_addition, downscale.Delta_correction, downscale.Quantile_mapping, downscale.Asynchronous_regression]
if 0 < DOWNSCALE_OPTION <= len(xdownscale): xdownscale[DOWNSCALE_OPTION - 1]()
else: sys.exit("DOWNSCALE_OPTION must be an integer between 1 and " + len(xdownscale))

if DOWNSCALE_OPTION == 1:
downscaled_model_present, downscaled_model_future = downscale.Delta_addition()
elif DOWNSCALE_OPTION == 2:
downscaled_model_present, downscaled_model_future = downscale.Delta_correction()
elif DOWNSCALE_OPTION == 3:
downscaled_model_present, downscaled_model_future = downscale.Quantile_mapping()
elif DOWNSCALE_OPTION == 4:
downscaled_model_present, downscaled_model_future = downscale.Asynchronous_regression()
else:
sys.exit("DOWNSCALE_OPTION must be an integer between 1 and 4")

""" Step 5: Create plots and spreadsheet """
print("Plotting results")

0 comments on commit f4aeb8b

Please sign in to comment.