{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Parametric Analysis with `MorphingIterator`\n",
"\n",
"This notebook demonstrates the most powerful feature of the `pyfwg` library: the `MorphingIterator` class. \n",
"\n",
"This class is designed for running **parametric studies**, where you need to execute the morphing process multiple times with different parameters (e.g., different GCMs, interpolation methods, or even different EPW files). It uses a Pandas DataFrame to define all the runs in a structured and easy-to-manage way."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## The Iterator Workflow\n",
"\n",
"The iterator is designed to be used in a clear, multi-step process that provides control and visibility at each stage:\n",
"\n",
"1. **Instantiate the Iterator**: Choose which tool you want to work with (`MorphingWorkflowGlobal` or `MorphingWorkflowEurope`).\n",
"2. **Set Default Values**: Define parameters that are common to all runs in your batch.\n",
"3. **Define the Runs DataFrame**: Specify the parameters that will change for each run, using either an Excel file or a Pandas DataFrame directly.\n",
"4. **Generate the Plan & Prepare Workflows**: A single command that applies all defaults, validates the plan, and prepares all the workflow instances for execution.\n",
"5. **Execute the Workflows**: A final command to run the entire batch of simulations."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Step 1: Instantiate the Iterator\n",
"\n",
"First, we import the necessary classes and create an instance of the `MorphingIterator`. We must tell it which workflow class it will be managing. In this example, we'll use `MorphingWorkflowGlobal`."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:20 - INFO - MorphingIterator initialized for MorphingWorkflowGlobal.\u001b[0m\n"
]
}
],
"source": [
"import pandas as pd\n",
"import os\n",
"from pyfwg import MorphingIterator, MorphingWorkflowGlobal, export_template_to_excel, load_runs_from_excel, get_available_lczs, DEFAULT_GLOBAL_GCMS\n",
"\n",
"# We specify that we want to use the Global tool for all runs.\n",
"iterator = MorphingIterator(workflow_class=MorphingWorkflowGlobal)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Step 2: Pre-flight Checks & Common Parameters\n",
"\n",
"Before defining a large batch of runs, it's good practice to check which parameters are valid. Here, we'll get the available LCZs for our weather files. Then, we'll use `set_default_values` to define parameters that will be the same for all runs, such as the JAR path and the LCZs we just validated."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:20 - INFO - --- Fetching available LCZs for 2 EPW file(s) ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:20 - INFO - Checking LCZ pair (Original: 0, Target: 0) availability for GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:20 - INFO - --- Applying UHI effect to GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:20 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.UHI_Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw C:\\Users\\sanga\\AppData\\Local\\Temp\\tmp40og259j/ true 0:0\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:23 - INFO - Available LCZs for 'GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw': [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 17]\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:23 - INFO - Checking LCZ pair (Original: 0, Target: 0) availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:23 - INFO - --- Applying UHI effect to sevilla_in_this_one_the_uhi_is_type-1.epw ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:23 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.UHI_Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw C:\\Users\\sanga\\AppData\\Local\\Temp\\tmp_doxvuln/ true 0:0\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:26 - INFO - Available LCZs for 'sevilla_in_this_one_the_uhi_is_type-1.epw': [2, 3, 6, 8, 9, 11, 12, 13, 14, 16]\u001b[0m\n"
]
}
],
"source": [
"# Define the path to the JAR file and the EPW files to be processed.\n",
"jar_path = r\"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\"\n",
"epw_files_dir = 'epws/wo_pattern'\n",
"epw_files = [os.path.join(epw_files_dir, f) for f in os.listdir(epw_files_dir) if f.endswith('.epw')]\n",
"\n",
"# Get available LCZs for each EPW file to ensure our choices are valid.\n",
"available_lczs = get_available_lczs(\n",
" epw_paths=epw_files,\n",
" fwg_jar_path=jar_path,\n",
")\n",
"\n",
"# Define the keyword mapping rules that will be used for all runs in this batch.\n",
"mapping_rules = {\n",
" 'city': {\n",
" 'seville': ['sevilla', 'SVQ'],\n",
" 'london': ['london', 'gatwick']\n",
" },\n",
" 'uhi': {\n",
" 'type-1': 'type-1',\n",
" 'type-2': 'type-2'\n",
" }\n",
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### `set_default_values` Parameters\n",
"\n",
"This method allows you to define parameters that are common to all runs in your batch, so you don't have to repeat them in every row of your DataFrame. All arguments are optional.\n",
"\n",
"##### Workflow Control Parameters\n",
"* `final_output_dir` (`str`): A default output directory for runs that don't specify one.\n",
"* `output_filename_pattern` (`str`): A default renaming pattern. **Must contain** `{ssp}`/`{rcp}` and `{year}`.\n",
"* `scenario_mapping` (`Dict`): A default dictionary for mapping scenario names (e.g., `{'ssp126': 'SSP1-2.6'}`).\n",
"* `fwg_jar_path` (`str`): The path to the `.jar` file. **It's highly recommended to set this here.**\n",
"* `run_incomplete_files` (`bool`, default: `False`): If `True`, also processes partially categorized files.\n",
"* `delete_temp_files` (`bool`, default: `True`): If `True`, deletes temporary folders after processing.\n",
"* `temp_base_dir` (`str`): A default base directory for temporary files.\n",
"* `fwg_show_tool_output` (`bool`, default: `False`): If `True`, prints the FWG tool's console output in real-time.\n",
"* `fwg_params` (`Dict`, default: `None`): A dictionary for base FWG parameters. Any explicit `fwg_` argument will override this.\n",
"\n",
"##### Future Weather Generator Tool Parameters\n",
"* `fwg_gcms` (`List[str]`, default: `None`): **For Global tool only.** A default list of GCMs to use.\n",
"* `fwg_rcm_pairs` (`List[str]`, default: `None`): **For Europe tool only.** A default list of GCM-RCM pairs to use.\n",
"* `fwg_create_ensemble` (`bool`, default: `True`): If `True`, creates an ensemble from the selected models.\n",
"* `fwg_winter_sd_shift` (`float`, default: `0.0`): Winter standard deviation shift.\n",
"* `fwg_summer_sd_shift` (`float`, default: `0.0`): Summer standard deviation shift.\n",
"* `fwg_month_transition_hours` (`int`, default: `72`): Hours for month transition.\n",
"* `fwg_use_multithreading` (`bool`, default: `True`): Use multithreading.\n",
"* `fwg_interpolation_method_id` (`int`, default: `0`): Interpolation method ID.\n",
"* `fwg_limit_variables` (`bool`, default: `True`): Limit variables to physical bounds.\n",
"* `fwg_solar_hour_adjustment` (`int`, default: `1`): Solar hour adjustment option.\n",
"* `fwg_diffuse_irradiation_model` (`int`, default: `1`): Diffuse irradiation model option.\n",
"* `fwg_add_uhi` (`bool`, default: `True`): Add UHI effect.\n",
"* `fwg_epw_original_lcz` (`int`, default: `14`): Original EPW LCZ.\n",
"* `fwg_target_uhi_lcz` (`int`, default: `1`): Target UHI LCZ."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:26 - INFO - Custom default values have been set for the iterator: {'output_filename_pattern': '{city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year}', 'fwg_jar_path': 'D:\\\\OneDrive - Universidad de Cádiz (uca.es)\\\\Programas\\\\FutureWeatherGenerator_v3.0.1.jar', 'fwg_epw_original_lcz': 2, 'fwg_target_uhi_lcz': 3}\u001b[0m\n"
]
}
],
"source": [
"# Set the default values that will be common to all runs.\n",
"iterator.set_default_values(\n",
" fwg_jar_path=jar_path,\n",
" # To avoid overwriting files, you should include in the filename pattern the parameters that change between runs.\n",
" # In this case, it'll be only fwg_gcms, therefore we should include {fwg_gcms} in output_filename_pattern\n",
" output_filename_pattern='{city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year}',\n",
" # We just checked that LCZs 2 and 3 are available, so we can use them as defaults.\n",
" # If they were different for each file, we would define them in the DataFrame instead.\n",
" fwg_epw_original_lcz=2,\n",
" fwg_target_uhi_lcz=3\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Step 3: Define the Runs DataFrame\n",
"\n",
"This is where you specify what will change between each run. You have three flexible options for this."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Step 3.1: Option A - Using an Excel Template\n",
"\n",
"This is the recommended approach for non-programmers or for managing a large number of runs. You can export a blank template, fill it in with your scenarios, and load it back into `pyfwg`."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:26 - INFO - Generating Excel template for MorphingWorkflowGlobal...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:26 - INFO - Template successfully exported to 'D:\\Python\\pyfwg\\pyfwg\\tutorials\\my_parametric_study.xlsx'\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"--- Original Template Structure (saved to 'my_parametric_study.xlsx') ---\n",
"Empty DataFrame\n",
"Columns: [epw_paths, input_filename_pattern, keyword_mapping, final_output_dir, output_filename_pattern, scenario_mapping, fwg_jar_path, run_incomplete_files, delete_temp_files, temp_base_dir, fwg_show_tool_output, fwg_params, fwg_gcms, fwg_create_ensemble, fwg_winter_sd_shift, fwg_summer_sd_shift, fwg_month_transition_hours, fwg_use_multithreading, fwg_interpolation_method_id, fwg_limit_variables, fwg_solar_hour_adjustment, fwg_diffuse_irradiation_model, fwg_add_uhi, fwg_epw_original_lcz, fwg_target_uhi_lcz]\n",
"Index: []\n",
"\n",
"[0 rows x 25 columns]\n"
]
}
],
"source": [
"# 1. Export the blank template to an Excel file.\n",
"template_path = 'my_parametric_study.xlsx'\n",
"export_template_to_excel(iterator, file_path=template_path)\n",
"print(f\"--- Original Template Structure (saved to '{template_path}') ---\")\n",
"# Read and display the empty template to show the available columns.\n",
"print(pd.read_excel(template_path))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" input_filename_pattern | \n",
" keyword_mapping | \n",
" final_output_dir | \n",
" output_filename_pattern | \n",
" scenario_mapping | \n",
" fwg_jar_path | \n",
" run_incomplete_files | \n",
" delete_temp_files | \n",
" temp_base_dir | \n",
" ... | \n",
" fwg_summer_sd_shift | \n",
" fwg_month_transition_hours | \n",
" fwg_use_multithreading | \n",
" fwg_interpolation_method_id | \n",
" fwg_limit_variables | \n",
" fwg_solar_hour_adjustment | \n",
" fwg_diffuse_irradiation_model | \n",
" fwg_add_uhi | \n",
" fwg_epw_original_lcz | \n",
" fwg_target_uhi_lcz | \n",
"
\n",
" \n",
" \n",
" \n",
"
\n",
"
0 rows × 25 columns
\n",
"
"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [epw_paths, input_filename_pattern, keyword_mapping, final_output_dir, output_filename_pattern, scenario_mapping, fwg_jar_path, run_incomplete_files, delete_temp_files, temp_base_dir, fwg_show_tool_output, fwg_params, fwg_gcms, fwg_create_ensemble, fwg_winter_sd_shift, fwg_summer_sd_shift, fwg_month_transition_hours, fwg_use_multithreading, fwg_interpolation_method_id, fwg_limit_variables, fwg_solar_hour_adjustment, fwg_diffuse_irradiation_model, fwg_add_uhi, fwg_epw_original_lcz, fwg_target_uhi_lcz]\n",
"Index: []\n",
"\n",
"[0 rows x 25 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_raw = pd.read_excel(template_path)\n",
"df_raw"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"--- Highlighting the Key Modified Columns ---\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" final_output_dir | \n",
" fwg_gcms | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... | \n",
" results_using_excel/london | \n",
" ['CanESM5'] | \n",
"
\n",
" \n",
" | 1 | \n",
" epws/wo_pattern/sevilla_in_this_one_the_uhi_is... | \n",
" results_using_excel/seville | \n",
" ['MIROC6'] | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" epw_paths \\\n",
"0 epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... \n",
"1 epws/wo_pattern/sevilla_in_this_one_the_uhi_is... \n",
"\n",
" final_output_dir fwg_gcms \n",
"0 results_using_excel/london ['CanESM5'] \n",
"1 results_using_excel/seville ['MIROC6'] "
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# --- At this point, you would open 'my_parametric_study.xlsx', ---\n",
"# --- fill in the rows with your scenarios, and save it. ---\n",
"# --- For this example, we assume you saved it as 'my_parametric_study_modified.xlsx' ---\n",
"\n",
"# 2. Load the completed scenarios from your edited Excel file.\n",
"template_path_mod = 'my_parametric_study_modified.xlsx'\n",
"\n",
"# Read the raw data from the Excel file once to be efficient.\n",
"modified_df_raw = pd.read_excel(template_path_mod)\n",
"\n",
"print(\"\\n--- Highlighting the Key Modified Columns ---\")\n",
"# Display only the columns that were manually edited to make the changes clear.\n",
"# These are the parameters that vary between the different runs in this example.\n",
"key_columns = ['epw_paths', 'final_output_dir', 'fwg_gcms']\n",
"modified_df_raw[key_columns]"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:26 - INFO - Loading runs from 'my_parametric_study_modified.xlsx'...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Runs loaded and data types converted successfully.\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"--- DataFrame after Loading with `load_runs_from_excel` (Data types are now correct) ---\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" input_filename_pattern | \n",
" keyword_mapping | \n",
" final_output_dir | \n",
" output_filename_pattern | \n",
" scenario_mapping | \n",
" fwg_jar_path | \n",
" run_incomplete_files | \n",
" delete_temp_files | \n",
" temp_base_dir | \n",
" ... | \n",
" fwg_summer_sd_shift | \n",
" fwg_month_transition_hours | \n",
" fwg_use_multithreading | \n",
" fwg_interpolation_method_id | \n",
" fwg_limit_variables | \n",
" fwg_solar_hour_adjustment | \n",
" fwg_diffuse_irradiation_model | \n",
" fwg_add_uhi | \n",
" fwg_epw_original_lcz | \n",
" fwg_target_uhi_lcz | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... | \n",
" NaN | \n",
" NaN | \n",
" results_using_excel/london | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" ... | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" | 1 | \n",
" epws/wo_pattern/sevilla_in_this_one_the_uhi_is... | \n",
" NaN | \n",
" NaN | \n",
" results_using_excel/seville | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" ... | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
2 rows × 25 columns
\n",
"
"
],
"text/plain": [
" epw_paths input_filename_pattern \\\n",
"0 epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... NaN \n",
"1 epws/wo_pattern/sevilla_in_this_one_the_uhi_is... NaN \n",
"\n",
" keyword_mapping final_output_dir output_filename_pattern \\\n",
"0 NaN results_using_excel/london NaN \n",
"1 NaN results_using_excel/seville NaN \n",
"\n",
" scenario_mapping fwg_jar_path run_incomplete_files delete_temp_files \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"\n",
" temp_base_dir ... fwg_summer_sd_shift fwg_month_transition_hours \\\n",
"0 NaN ... NaN NaN \n",
"1 NaN ... NaN NaN \n",
"\n",
" fwg_use_multithreading fwg_interpolation_method_id fwg_limit_variables \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"\n",
" fwg_solar_hour_adjustment fwg_diffuse_irradiation_model fwg_add_uhi \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"\n",
" fwg_epw_original_lcz fwg_target_uhi_lcz \n",
"0 NaN NaN \n",
"1 NaN NaN \n",
"\n",
"[2 rows x 25 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 3. Load the runs using the pyfwg helper function to correct data types.\n",
"runs_from_excel = load_runs_from_excel(template_path_mod)\n",
"\n",
"print(\"\\n--- DataFrame after Loading with `load_runs_from_excel` (Data types are now correct) ---\")\n",
"# Display the final DataFrame. The 'fwg_gcms' column now contains actual Python lists.\n",
"runs_from_excel"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Step 3.2: Option B - Using a Pandas DataFrame Directly\n",
"\n",
"For quick tests or when working within a script, you can define your runs programmatically."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--- Runs Defined Directly in Pandas ---\n",
" epw_paths input_filename_pattern \\\n",
"0 epws/wo_pattern\\GBR_London.Gatwick.037760_IWEC... NaN \n",
"1 epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... NaN \n",
"\n",
" keyword_mapping final_output_dir output_filename_pattern \\\n",
"0 NaN ./results/0 NaN \n",
"1 NaN ./results/1 NaN \n",
"\n",
" scenario_mapping fwg_jar_path run_incomplete_files delete_temp_files \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"\n",
" temp_base_dir ... fwg_summer_sd_shift fwg_month_transition_hours \\\n",
"0 NaN ... NaN NaN \n",
"1 NaN ... NaN NaN \n",
"\n",
" fwg_use_multithreading fwg_interpolation_method_id fwg_limit_variables \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"\n",
" fwg_solar_hour_adjustment fwg_diffuse_irradiation_model fwg_add_uhi \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"\n",
" fwg_epw_original_lcz fwg_target_uhi_lcz \n",
"0 NaN NaN \n",
"1 NaN NaN \n",
"\n",
"[2 rows x 25 columns]\n"
]
}
],
"source": [
"# Get the blank template DataFrame.\n",
"runs_df_direct = iterator.get_template_dataframe()\n",
"\n",
"# --- Run 1: Run the first EPW file with one set of GCMs ---\n",
"runs_df_direct.loc[0] = {\n",
" 'epw_paths': epw_files[0],\n",
" 'final_output_dir': './results/0',\n",
" 'fwg_gcms': ['CanESM5']\n",
"}\n",
"\n",
"# --- Run 2: Run the second EPW file with a different GCM ---\n",
"runs_df_direct.loc[1] = {\n",
" 'epw_paths': epw_files[1],\n",
" 'final_output_dir': './results/1',\n",
" 'fwg_gcms': ['MIROC6']\n",
"}\n",
"\n",
"print(\"--- Runs Defined Directly in Pandas ---\")\n",
"print(runs_df_direct)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Step 3.3: Option C - Hybrid Approach (Load from Excel, then Modify)\n",
"\n",
"You can also combine the two methods. Here, we load the runs from our Excel file and then programmatically add a new run to the DataFrame."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--- Final DataFrame for Execution ---\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" input_filename_pattern | \n",
" keyword_mapping | \n",
" final_output_dir | \n",
" output_filename_pattern | \n",
" scenario_mapping | \n",
" fwg_jar_path | \n",
" run_incomplete_files | \n",
" delete_temp_files | \n",
" temp_base_dir | \n",
" ... | \n",
" fwg_summer_sd_shift | \n",
" fwg_month_transition_hours | \n",
" fwg_use_multithreading | \n",
" fwg_interpolation_method_id | \n",
" fwg_limit_variables | \n",
" fwg_solar_hour_adjustment | \n",
" fwg_diffuse_irradiation_model | \n",
" fwg_add_uhi | \n",
" fwg_epw_original_lcz | \n",
" fwg_target_uhi_lcz | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... | \n",
" NaN | \n",
" NaN | \n",
" results_using_excel/london | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" ... | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" | 1 | \n",
" epws/wo_pattern/sevilla_in_this_one_the_uhi_is... | \n",
" NaN | \n",
" NaN | \n",
" results_using_excel/seville | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" ... | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" | 2 | \n",
" epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... | \n",
" NaN | \n",
" NaN | \n",
" results_using_excel/seville | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" ... | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
3 rows × 25 columns
\n",
"
"
],
"text/plain": [
" epw_paths input_filename_pattern \\\n",
"0 epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... NaN \n",
"1 epws/wo_pattern/sevilla_in_this_one_the_uhi_is... NaN \n",
"2 epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... NaN \n",
"\n",
" keyword_mapping final_output_dir output_filename_pattern \\\n",
"0 NaN results_using_excel/london NaN \n",
"1 NaN results_using_excel/seville NaN \n",
"2 NaN results_using_excel/seville NaN \n",
"\n",
" scenario_mapping fwg_jar_path run_incomplete_files delete_temp_files \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"\n",
" temp_base_dir ... fwg_summer_sd_shift fwg_month_transition_hours \\\n",
"0 NaN ... NaN NaN \n",
"1 NaN ... NaN NaN \n",
"2 NaN ... NaN NaN \n",
"\n",
" fwg_use_multithreading fwg_interpolation_method_id fwg_limit_variables \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"2 NaN NaN NaN \n",
"\n",
" fwg_solar_hour_adjustment fwg_diffuse_irradiation_model fwg_add_uhi \\\n",
"0 NaN NaN NaN \n",
"1 NaN NaN NaN \n",
"2 NaN NaN NaN \n",
"\n",
" fwg_epw_original_lcz fwg_target_uhi_lcz \n",
"0 NaN NaN \n",
"1 NaN NaN \n",
"2 NaN NaN \n",
"\n",
"[3 rows x 25 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"first_gcm = list(DEFAULT_GLOBAL_GCMS)[0]\n",
"runs_from_excel_modified = runs_from_excel.copy()\n",
"\n",
"# Add a new row (run) to the DataFrame we loaded from Excel.\n",
"runs_from_excel_modified.loc[2] = {\n",
" 'epw_paths': epw_files[1],\n",
" 'final_output_dir': 'results_using_excel/seville',\n",
" 'fwg_gcms': [first_gcm]\n",
"}\n",
"\n",
"print(\"--- Final DataFrame for Execution ---\")\n",
"runs_from_excel_modified"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" final_output_dir | \n",
" fwg_gcms | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... | \n",
" results_using_excel/london | \n",
" [CanESM5] | \n",
"
\n",
" \n",
" | 1 | \n",
" epws/wo_pattern/sevilla_in_this_one_the_uhi_is... | \n",
" results_using_excel/seville | \n",
" [MIROC6] | \n",
"
\n",
" \n",
" | 2 | \n",
" epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... | \n",
" results_using_excel/seville | \n",
" [CAS_ESM2_0] | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" epw_paths \\\n",
"0 epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... \n",
"1 epws/wo_pattern/sevilla_in_this_one_the_uhi_is... \n",
"2 epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... \n",
"\n",
" final_output_dir fwg_gcms \n",
"0 results_using_excel/london [CanESM5] \n",
"1 results_using_excel/seville [MIROC6] \n",
"2 results_using_excel/seville [CAS_ESM2_0] "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Let's show only the columns we have modified\n",
"runs_from_excel_modified[key_columns]"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Step 4: Generate the Morphing Workflows and Execution Plan\n",
"\n",
"This single method is the core of the planning phase. It takes your DataFrame of runs, applies all defaults, maps the file categories, and prepares all the underlying workflow instances.\n",
"\n",
"Crucially, it also performs a **robust validation check** to prevent accidental file overwrites. It simulates all final output filenames and, if any collisions are found, it provides a comprehensive report of all conflicting files, making it much easier to debug your `output_filename_pattern`.\n",
"\n",
"The final, detailed execution plan is stored in the `iterator.morphing_workflows_plan_df` attribute for you to review.\n",
"\n",
"#### `generate_morphing_workflows` Parameters\n",
"\n",
"This is the core planning method. It takes your DataFrame of runs and prepares everything for execution.\n",
"\n",
"* `runs_df` (`pd.DataFrame`): **Required.** The user's DataFrame of runs, where each row represents a unique configuration.\n",
"* `input_filename_pattern` (`Optional[str]`, default: `None`): A regex pattern for filename mapping, applied as a default to *every* run unless overridden in the DataFrame.\n",
"* `keyword_mapping` (`Optional[Dict]`, default: `None`): A dictionary of keyword rules for filename mapping, applied as a default to *every* run unless overridden in the DataFrame.\n",
"* `raise_on_overwrite` (`bool`, default: `True`): Controls the behavior when a filename collision is detected. If `True` (the default and recommended setting), the method will raise a `ValueError` to stop execution and prevent data loss. If `False`, it will only print a warning and allow the process to continue."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:27 - INFO - Generating detailed execution plan and preparing workflows...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 1: Mapping categories from filenames ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Mapped 'epws/wo_pattern/GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw': {'city': 'london', 'uhi': 'type-2'}\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Category mapping complete.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 1: Mapping categories from filenames ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Mapped 'epws/wo_pattern/sevilla_in_this_one_the_uhi_is_type-1.epw': {'city': 'seville', 'uhi': 'type-1'}\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Category mapping complete.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 1: Mapping categories from filenames ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Mapped 'epws/wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw': {'city': 'seville', 'uhi': 'type-1'}\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Category mapping complete.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Validating for potential filename overwrites...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Filename validation passed. No overwrites detected.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Preparing 3 workflow instances...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 1: Mapping categories from filenames ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Mapped 'epws/wo_pattern/GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw': {'city': 'london', 'uhi': 'type-2'}\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Category mapping complete.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 2: Configuring and Previewing Morphing Plan ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 1: Mapping categories from filenames ---\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"============================================================\n",
" MORPHING CONFIGURATION & PREVIEW\n",
"============================================================\n",
" - FWG JAR Path: D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\n",
" - Final Output Directory: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\n",
" - EPWs to be Morphed (1 files):\n",
" - GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw\n",
"\n",
" For input file: GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw\n",
" -> Generated 'ssp126_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp126_2050.epw\n",
" -> Generated 'ssp245_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp245_2050.epw\n",
" -> Generated 'ssp370_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp370_2050.epw\n",
" -> Generated 'ssp585_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp585_2050.epw\n",
" -> Generated 'ssp126_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp126_2080.epw\n",
" -> Generated 'ssp245_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp245_2080.epw\n",
" -> Generated 'ssp370_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp370_2080.epw\n",
" -> Generated 'ssp585_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\london\\london_type-2_gcm-['CanESM5']_ssp585_2080.epw\n",
"============================================================\n",
"Configuration set. Call execute_morphing() to start the process.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:27 - INFO - Mapped 'epws/wo_pattern/sevilla_in_this_one_the_uhi_is_type-1.epw': {'city': 'seville', 'uhi': 'type-1'}\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Category mapping complete.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 2: Configuring and Previewing Morphing Plan ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 1: Mapping categories from filenames ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Mapped 'epws/wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw': {'city': 'seville', 'uhi': 'type-1'}\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Category mapping complete.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 2: Configuring and Previewing Morphing Plan ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Execution plan generated and 3 workflows prepared.\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"============================================================\n",
" MORPHING CONFIGURATION & PREVIEW\n",
"============================================================\n",
" - FWG JAR Path: D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\n",
" - Final Output Directory: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\n",
" - EPWs to be Morphed (1 files):\n",
" - sevilla_in_this_one_the_uhi_is_type-1.epw\n",
"\n",
" For input file: sevilla_in_this_one_the_uhi_is_type-1.epw\n",
" -> Generated 'ssp126_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp126_2050.epw\n",
" -> Generated 'ssp245_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp245_2050.epw\n",
" -> Generated 'ssp370_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp370_2050.epw\n",
" -> Generated 'ssp585_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp585_2050.epw\n",
" -> Generated 'ssp126_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp126_2080.epw\n",
" -> Generated 'ssp245_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp245_2080.epw\n",
" -> Generated 'ssp370_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp370_2080.epw\n",
" -> Generated 'ssp585_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['MIROC6']_ssp585_2080.epw\n",
"============================================================\n",
"Configuration set. Call execute_morphing() to start the process.\n",
"\n",
"============================================================\n",
" MORPHING CONFIGURATION & PREVIEW\n",
"============================================================\n",
" - FWG JAR Path: D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\n",
" - Final Output Directory: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\n",
" - EPWs to be Morphed (1 files):\n",
" - sevilla_in_this_one_the_uhi_is_type-1.epw\n",
"\n",
" For input file: sevilla_in_this_one_the_uhi_is_type-1.epw\n",
" -> Generated 'ssp126_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2050.epw\n",
" -> Generated 'ssp245_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2050.epw\n",
" -> Generated 'ssp370_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2050.epw\n",
" -> Generated 'ssp585_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2050.epw\n",
" -> Generated 'ssp126_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2080.epw\n",
" -> Generated 'ssp245_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2080.epw\n",
" -> Generated 'ssp370_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2080.epw\n",
" -> Generated 'ssp585_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\results_using_excel\\seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2080.epw\n",
"============================================================\n",
"Configuration set. Call execute_morphing() to start the process.\n"
]
}
],
"source": [
"# The mapping strategy is a static argument for the whole batch.\n",
"iterator.generate_morphing_workflows(\n",
" runs_df=runs_from_excel_modified,\n",
" keyword_mapping=mapping_rules\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--- Detailed Execution Plan ---\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" final_output_dir | \n",
" fwg_gcms | \n",
" cat_city | \n",
" cat_uhi | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... | \n",
" results_using_excel/london | \n",
" [CanESM5] | \n",
" [london] | \n",
" [type-2] | \n",
"
\n",
" \n",
" | 1 | \n",
" epws/wo_pattern/sevilla_in_this_one_the_uhi_is... | \n",
" results_using_excel/seville | \n",
" [MIROC6] | \n",
" [seville] | \n",
" [type-1] | \n",
"
\n",
" \n",
" | 2 | \n",
" epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... | \n",
" results_using_excel/seville | \n",
" [CAS_ESM2_0] | \n",
" [seville] | \n",
" [type-1] | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" epw_paths \\\n",
"0 epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... \n",
"1 epws/wo_pattern/sevilla_in_this_one_the_uhi_is... \n",
"2 epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... \n",
"\n",
" final_output_dir fwg_gcms cat_city cat_uhi \n",
"0 results_using_excel/london [CanESM5] [london] [type-2] \n",
"1 results_using_excel/seville [MIROC6] [seville] [type-1] \n",
"2 results_using_excel/seville [CAS_ESM2_0] [seville] [type-1] "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print(\"--- Detailed Execution Plan ---\")\n",
"# Display key columns to verify the plan, including the new category columns.\n",
"display_cols = [\n",
" 'epw_paths',\n",
" 'final_output_dir',\n",
" 'fwg_gcms',\n",
" 'cat_city',\n",
" 'cat_uhi'\n",
"]\n",
"iterator.morphing_workflows_plan_df[display_cols]"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" epw_paths | \n",
" input_filename_pattern | \n",
" keyword_mapping | \n",
" cat_city | \n",
" cat_uhi | \n",
" final_output_dir | \n",
" output_filename_pattern | \n",
" scenario_mapping | \n",
" fwg_jar_path | \n",
" run_incomplete_files | \n",
" ... | \n",
" fwg_summer_sd_shift | \n",
" fwg_month_transition_hours | \n",
" fwg_use_multithreading | \n",
" fwg_interpolation_method_id | \n",
" fwg_limit_variables | \n",
" fwg_solar_hour_adjustment | \n",
" fwg_diffuse_irradiation_model | \n",
" fwg_add_uhi | \n",
" fwg_epw_original_lcz | \n",
" fwg_target_uhi_lcz | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... | \n",
" None | \n",
" {'city': {'seville': ['sevilla', 'SVQ'], 'lond... | \n",
" [london] | \n",
" [type-2] | \n",
" results_using_excel/london | \n",
" {city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year} | \n",
" NaN | \n",
" D:\\OneDrive - Universidad de Cádiz (uca.es)\\Pr... | \n",
" False | \n",
" ... | \n",
" 0.0 | \n",
" 72 | \n",
" True | \n",
" 0 | \n",
" True | \n",
" 1 | \n",
" 1 | \n",
" True | \n",
" 2 | \n",
" 3 | \n",
"
\n",
" \n",
" | 1 | \n",
" epws/wo_pattern/sevilla_in_this_one_the_uhi_is... | \n",
" None | \n",
" {'city': {'seville': ['sevilla', 'SVQ'], 'lond... | \n",
" [seville] | \n",
" [type-1] | \n",
" results_using_excel/seville | \n",
" {city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year} | \n",
" NaN | \n",
" D:\\OneDrive - Universidad de Cádiz (uca.es)\\Pr... | \n",
" False | \n",
" ... | \n",
" 0.0 | \n",
" 72 | \n",
" True | \n",
" 0 | \n",
" True | \n",
" 1 | \n",
" 1 | \n",
" True | \n",
" 2 | \n",
" 3 | \n",
"
\n",
" \n",
" | 2 | \n",
" epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... | \n",
" None | \n",
" {'city': {'seville': ['sevilla', 'SVQ'], 'lond... | \n",
" [seville] | \n",
" [type-1] | \n",
" results_using_excel/seville | \n",
" {city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year} | \n",
" NaN | \n",
" D:\\OneDrive - Universidad de Cádiz (uca.es)\\Pr... | \n",
" False | \n",
" ... | \n",
" 0.0 | \n",
" 72 | \n",
" True | \n",
" 0 | \n",
" True | \n",
" 1 | \n",
" 1 | \n",
" True | \n",
" 2 | \n",
" 3 | \n",
"
\n",
" \n",
"
\n",
"
3 rows × 27 columns
\n",
"
"
],
"text/plain": [
" epw_paths input_filename_pattern \\\n",
"0 epws/wo_pattern/GBR_London.Gatwick.037760_IWEC... None \n",
"1 epws/wo_pattern/sevilla_in_this_one_the_uhi_is... None \n",
"2 epws/wo_pattern\\sevilla_in_this_one_the_uhi_is... None \n",
"\n",
" keyword_mapping cat_city cat_uhi \\\n",
"0 {'city': {'seville': ['sevilla', 'SVQ'], 'lond... [london] [type-2] \n",
"1 {'city': {'seville': ['sevilla', 'SVQ'], 'lond... [seville] [type-1] \n",
"2 {'city': {'seville': ['sevilla', 'SVQ'], 'lond... [seville] [type-1] \n",
"\n",
" final_output_dir output_filename_pattern \\\n",
"0 results_using_excel/london {city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year} \n",
"1 results_using_excel/seville {city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year} \n",
"2 results_using_excel/seville {city}_{uhi}_gcm-{fwg_gcms}_{ssp}_{year} \n",
"\n",
" scenario_mapping fwg_jar_path \\\n",
"0 NaN D:\\OneDrive - Universidad de Cádiz (uca.es)\\Pr... \n",
"1 NaN D:\\OneDrive - Universidad de Cádiz (uca.es)\\Pr... \n",
"2 NaN D:\\OneDrive - Universidad de Cádiz (uca.es)\\Pr... \n",
"\n",
" run_incomplete_files ... fwg_summer_sd_shift fwg_month_transition_hours \\\n",
"0 False ... 0.0 72 \n",
"1 False ... 0.0 72 \n",
"2 False ... 0.0 72 \n",
"\n",
" fwg_use_multithreading fwg_interpolation_method_id fwg_limit_variables \\\n",
"0 True 0 True \n",
"1 True 0 True \n",
"2 True 0 True \n",
"\n",
" fwg_solar_hour_adjustment fwg_diffuse_irradiation_model fwg_add_uhi \\\n",
"0 1 1 True \n",
"1 1 1 True \n",
"2 1 1 True \n",
"\n",
" fwg_epw_original_lcz fwg_target_uhi_lcz \n",
"0 2 3 \n",
"1 2 3 \n",
"2 2 3 \n",
"\n",
"[3 rows x 27 columns]"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# At this point the default values have been applied, and therefore the plan can be fully checked before running the morphing\n",
"iterator.morphing_workflows_plan_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also inspect the prepared workflow instances themselves."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"--- Inspecting first prepared workflow ---\n",
"Is config valid? True\n",
"Files to be morphed: ['GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw']\n"
]
}
],
"source": [
"print(\"\\n--- Inspecting first prepared workflow ---\")\n",
"if iterator.prepared_workflows:\n",
" first_workflow = iterator.prepared_workflows[0]\n",
" print(f\"Is config valid? {first_workflow.is_config_valid}\")\n",
" print(f\"Files to be morphed: {[os.path.basename(p) for p in first_workflow.epws_to_be_morphed]}\")\n",
"else:\n",
" print(\"No workflows were prepared, likely due to errors in the plan.\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Step 5: Execute the Morphing Workflows\n",
"\n",
"This is the final step. The `run_morphing_workflows` method takes no arguments to define the runs, as it simply executes the workflows that were prepared in the previous step."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### `run_morphing_workflows` Parameters\n",
"\n",
"* `show_tool_output` (`Optional[bool]`, default: `None`): A flag to globally override the console output setting for all workflows in this specific batch execution.\n",
" * If set to `True` or `False`, it will **force** this behavior for all runs, ignoring the `fwg_show_tool_output` value in the plan.\n",
" * If left as `None` (the default), each run will use the `fwg_show_tool_output` value that was defined for it in the execution plan."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:58:27 - INFO - Starting execution of 3 prepared runs...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Running Run 1/3 ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Step 4: Executing morphing workflow ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Validating LCZ availability for GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Checking LCZ pair (Original: 2, Target: 3) availability for GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - --- Applying UHI effect to GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:27 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.UHI_Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw C:\\Users\\sanga\\AppData\\Local\\Temp\\tmpab07k7qy/ true 2:3\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:31 - INFO - UHI effect applied successfully.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:31 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001b[0m\n",
"\u001b[32m2025-09-29 09:58:31 - INFO - Copied input file to temporary directory: ./morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"-------------------- Executing FWG for GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw --------------------\n",
" Full Command (for reference): java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw CanESM5 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2/ true 0 true 1 1 1:2:3\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:59:04 - INFO - Processing generated files in: ./morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp126_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp126_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp245_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp245_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp370_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp370_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp585_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_CanESM5_ssp585_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp126_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp126_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp126_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp126_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp245_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp245_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp245_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp245_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp370_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp370_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp370_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp370_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp585_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp585_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080.epw' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp585_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080.stat' to 'results_using_excel/london\\london_type-2_gcm-['CanESM5']_ssp585_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Deleting temporary directory: ./morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Morphing workflow finished.\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - --- Running Run 2/3 ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - --- Step 4: Executing morphing workflow ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Validating LCZ availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Checking LCZ pair (Original: 2, Target: 3) availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - --- Applying UHI effect to sevilla_in_this_one_the_uhi_is_type-1.epw ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:04 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.UHI_Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw C:\\Users\\sanga\\AppData\\Local\\Temp\\tmpcvlq_573/ true 2:3\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:09 - INFO - UHI effect applied successfully.\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:09 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:09 - INFO - Copied input file to temporary directory: ./morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\sevilla_in_this_one_the_uhi_is_type-1.epw\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"-------------------- Executing FWG for sevilla_in_this_one_the_uhi_is_type-1.epw --------------------\n",
" Full Command (for reference): java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw MIROC6 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1/ true 0 true 1 1 1:2:3\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 09:59:46 - INFO - Processing generated files in: ./morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp126_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp126_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp126_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp126_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp245_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp245_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp245_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp245_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp370_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp370_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp370_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp370_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp585_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp585_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp585_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['MIROC6']_ssp585_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp126_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp126_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp245_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp245_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp370_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp370_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp585_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_MIROC6_ssp585_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Deleting temporary directory: ./morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Morphing workflow finished.\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - --- Running Run 3/3 ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - --- Step 4: Executing morphing workflow ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Validating LCZ availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Checking LCZ pair (Original: 2, Target: 3) availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - --- Applying UHI effect to sevilla_in_this_one_the_uhi_is_type-1.epw ---\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:46 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.UHI_Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw C:\\Users\\sanga\\AppData\\Local\\Temp\\tmpjo7t4sry/ true 2:3\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:50 - INFO - UHI effect applied successfully.\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:50 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001b[0m\n",
"\u001b[32m2025-09-29 09:59:50 - INFO - Copied input file to temporary directory: ./morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\sevilla_in_this_one_the_uhi_is_type-1.epw\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"-------------------- Executing FWG for sevilla_in_this_one_the_uhi_is_type-1.epw --------------------\n",
" Full Command (for reference): java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\" futureweathergenerator.Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw CAS_ESM2_0 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1/ true 0 true 1 1 1:2:3\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-09-29 10:00:26 - INFO - Processing generated files in: ./morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp126_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp126_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp245_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp245_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp370_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp370_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp585_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_CAS_ESM2_0_ssp585_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2050.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2050.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2050.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2050.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2080.epw' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2080.epw'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2080.stat' to 'results_using_excel/seville\\seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2080.stat'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_ErrorsAndWarnings.log'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_GridPointVariables.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_MorphedEPWsComparison.csv'\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Deleting temporary directory: ./morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Morphing workflow finished.\u001b[0m\n",
"\u001b[32m2025-09-29 10:00:26 - INFO - Batch run complete.\u001b[0m\n"
]
}
],
"source": [
"iterator.run_morphing_workflows(show_tool_output=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's have a look at the output folders."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['results_using_excel/london', 'results_using_excel/seville']"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"output_dirs = list(set([i for i in iterator.morphing_workflows_plan_df['final_output_dir']]))\n",
"output_dirs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, the one for the london epw"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[\"london_type-2_gcm-['CanESM5']_ssp126_2050.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp126_2050.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp126_2080.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp126_2080.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp245_2050.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp245_2050.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp245_2080.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp245_2080.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp370_2050.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp370_2050.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp370_2080.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp370_2080.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp585_2050.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp585_2050.stat\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp585_2080.epw\",\n",
" \"london_type-2_gcm-['CanESM5']_ssp585_2080.stat\"]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[i for i in os.listdir(output_dirs[0])]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And second, the one for the seville epw"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[\"seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2050.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2050.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2080.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp126_2080.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2050.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2050.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2080.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp245_2080.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2050.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2050.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2080.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp370_2080.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2050.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2050.stat\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2080.epw\",\n",
" \"seville_type-1_gcm-['CAS_ESM2_0']_ssp585_2080.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp126_2050.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp126_2050.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp126_2080.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp126_2080.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp245_2050.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp245_2050.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp245_2080.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp245_2080.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp370_2050.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp370_2050.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp370_2080.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp370_2080.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp585_2050.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp585_2050.stat\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp585_2080.epw\",\n",
" \"seville_type-1_gcm-['MIROC6']_ssp585_2080.stat\"]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[i for i in os.listdir(output_dirs[1])]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's delete the files we have generated:"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"import shutil\n",
"for output_dir in output_dirs:\n",
" shutil.rmtree(output_dir)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 4
}