{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Advanced usage: The `MorphingWorkflow` classes: `MorphingWorkflowGlobal` and `MorphingWorkflowEurope`\n", "\n", "This notebook demonstrates the advanced, step-by-step approach to morphing EPW files using the specialized `MorphingWorkflow` classes (`MorphingWorkflowGlobal` and `MorphingWorkflowEurope`).\n", "\n", "While the `morph_epw_*` functions are great for direct, one-shot tasks, the workflow classes are designed for complex projects where you need full control over **filename parsing, custom renaming, and process validation**. They enforce a safe, multi-step process that allows you to review and confirm each stage before executing the time-consuming morphing computation.\n", "\n", "This notebook will focus on **`MorphingWorkflowGlobal`**, and will show a quick example using **`MorphingWorkflowEurope`** highlighting the differences." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The Three-Step Workflow\n", "\n", "The class is designed to be used as a state machine, guiding you through a logical sequence:\n", "\n", "1. **`map_categories()`**: Analyze the input filenames to extract meaningful data (like city, building type, etc.).\n", "2. **`configure_and_preview()`**: Define all execution parameters, validate them, and generate a \"dry run\" plan of how the final files will be named and organized.\n", "3. **`execute_morphing()`**: Run the final computation, confident that your plan and configuration are correct." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using `MorphingWorkflowGlobal`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### General Setup\n", "\n", "First, we'll import the necessary class and set up the paths for our files. \n", "\n", "**Important:** You must change the `jar_path` variable to the correct location of the `FutureWeatherGenerator_v3.0.1.jar` file on your system. You must also ensure that the EPW files exist at the specified paths." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import os\n", "import pandas as pd\n", "from pyfwg import MorphingWorkflowGlobal, DEFAULT_GLOBAL_GCMS\n", "\n", "# --- Configuration ---\n", "# !!! IMPORTANT: You MUST change this path to the correct location on your PC !!!\n", "jar_path = r\"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_v3.0.1.jar\"\n", "\n", "# --- Define file paths for the examples ---\n", "pattern_epw_dir = 'epws/w_pattern'\n", "keyword_epw_dir = 'epws/wo_pattern'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 1: Map Categories from Filenames\n", "\n", "This is the first and most critical step for organizing your workflow. The `map_categories` method analyzes your source filenames and extracts meaningful data that will be used later for renaming the output files.\n", "\n", "#### `map_categories` Parameters\n", "\n", "The parameters you can use are:\n", "\n", "* `epw_files` (`List[str]`): **Required.** A list of paths to the EPW files you want to process.\n", "* `input_filename_pattern` (`Optional[str]`, default: `None`): A Python regex string with **named capture groups** (e.g., `(?P...)`) to extract structured data from filenames.\n", "* `keyword_mapping` (`Optional[Dict]`, default: `None`): A dictionary of rules. It can be used to normalize values from the pattern or to search the entire filename for keywords to assign categories. The innermost value can be a single string or a list of strings (e.g., `'seville': ['sevilla', 'svq']`)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Instantiate a workflow object for this example\n", "workflow = MorphingWorkflowGlobal()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's have a look at the filenames of the EPWs we are going to work with. First, the set that has a pattern we can define with regex:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['epws/w_pattern\\\\london_uhi-type-2.epw', 'epws/w_pattern\\\\sevilla_uhi-type-1.epw']\n" ] } ], "source": [ "# Define the list of files for this specific case\n", "epw_files_with_pattern = [os.path.join(pattern_epw_dir, f) for f in os.listdir(pattern_epw_dir) if f.endswith('.epw')]\n", "print(epw_files_with_pattern)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And second, the set that does not have a pattern:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['epws/wo_pattern\\\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw', 'epws/wo_pattern\\\\sevilla_in_this_one_the_uhi_is_type-1.epw']\n" ] } ], "source": [ "# Define the list of files for this specific case\n", "epw_files_without_pattern = [os.path.join(keyword_epw_dir, f) for f in os.listdir(keyword_epw_dir) if f.endswith('.epw')]\n", "print(epw_files_without_pattern)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can also provide a `keyword_mapping` dictionary to translate the extracted raw values (like `sevilla`) into a clean, final format (like `Seville`)." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# Define the mapping rules to categorize filenames based on their content.\n", "# This dictionary provides the logic for both keyword searching and normalization.\n", "mapping_rules = {\n", " # The top-level keys ('city', 'uhi') define the final category names\n", " # that will be available as placeholders (e.g., {city}) in the output filename.\n", " 'city': {\n", " # The second-level keys ('Seville', 'London') are the final, clean values\n", " # that will be assigned to the 'city' category.\n", " 'Seville': ['sevilla', 'SVQ'], # The keywords to search for (case-insensitive).\n", " 'London': ['london', 'gatwick'] # A list is used for multiple possible keywords.\n", " },\n", " 'uhi': {\n", " # For convenience, if there is only one keyword to search for,\n", " # you can provide it as a single string instead of a list with one item.\n", " 'type-1': 'type-1',\n", " 'type-2': 'type-2'\n", " }\n", "}\n", "\n", "# For example, if a filename contains 'SVQ', pyfwg will assign the value 'Seville'\n", "# to the 'city' category for that file." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Example 1.1: Using a Regex Pattern with Normalization\n", "\n", "If the filenames follow a consistent pattern, you can use the `input_filename_pattern` argument." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:57:55 - INFO - --- Step 1: Mapping categories from filenames ---\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - INFO - Mapped 'epws/w_pattern\\london_uhi-type-2.epw': {'city': 'London', 'uhi': 'uhi-type-2'}\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - INFO - Mapped 'epws/w_pattern\\sevilla_uhi-type-1.epw': {'city': 'Seville', 'uhi': 'uhi-type-1'}\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - INFO - Category mapping complete.\u001B[0m\n" ] } ], "source": [ "workflow.map_categories(\n", " epw_files=epw_files_with_pattern,\n", " # This pattern extracts raw values like 'sevilla' and 'type-1'\n", " input_filename_pattern=r'(?P.*?)_(?P.*)',\n", " # This dictionary then normalizes them to 'Seville' and 'type-1'. In case of type-1, we want to keep it as it is, so we use the same value.\n", " keyword_mapping=mapping_rules\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The mapped categories are saved to the attribute `.epw_categories` as a dictionary. Let's view it as a DataFrame for better visualization:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
epws/w_pattern\\london_uhi-type-2.epwepws/w_pattern\\sevilla_uhi-type-1.epw
cityLondonSeville
uhiuhi-type-2uhi-type-1
\n", "
" ], "text/plain": [ " epws/w_pattern\\london_uhi-type-2.epw \\\n", "city London \n", "uhi uhi-type-2 \n", "\n", " epws/w_pattern\\sevilla_uhi-type-1.epw \n", "city Seville \n", "uhi uhi-type-1 " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pd.DataFrame(workflow.epw_categories)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Example 1.2: Using Keyword-Only Search\n", "\n", "If your files are irregularly named, set `input_filename_pattern` to `None`. `pyfwg` will then search for the keywords from your mapping dictionary anywhere in the filename." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:57:55 - INFO - --- Step 1: Mapping categories from filenames ---\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - 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-25 09:57:55 - 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-25 09:57:55 - INFO - Category mapping complete.\u001B[0m\n" ] } ], "source": [ "workflow.map_categories(\n", " epw_files=epw_files_without_pattern,\n", " input_filename_pattern=None,\n", " keyword_mapping=mapping_rules\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's view the newly mapped categories:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
epws/wo_pattern\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epwepws/wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw
cityLondonSeville
uhitype-2type-1
\n", "
" ], "text/plain": [ " epws/wo_pattern\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw \\\n", "city London \n", "uhi type-2 \n", "\n", " epws/wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw \n", "city Seville \n", "uhi type-1 " ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pd.DataFrame(workflow.epw_categories)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2: Configure and Preview the Plan\n", "\n", "This is the combined configuration and preview step. Here, you define all the parameters for the Future Weather Generator tool and the output filenames. The method validates everything and then shows you a \"dry run\" plan of the final results.\n", "\n", "#### `configure_and_preview` Parameters\n", "\n", "This method has an explicit signature for all possible arguments, providing auto-completion and type hints in your editor.\n", "\n", "##### Workflow Parameters\n", "* `final_output_dir` (`str`): **Required.** The path for the final output files.\n", "* `output_filename_pattern` (`str`): **Required.** The template for final filenames. Must contain `{ssp}` (or `{rcp}`) and `{year}`. It also can use placeholders from your mapped categories (like `{city}`) and also placeholders for any of the `fwg_` parameters (like `{fwg_interpolation_method_id}`).\n", "* `scenario_mapping` (`Optional[Dict]`, default: `None`): A dictionary to translate raw scenario names (e.g., `'ssp126'`) into a descriptive format (e.g., `'SSP1-2.6'`).\n", "* `fwg_jar_path` (`str`): **Required.** Path to the `.jar` file.\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`, default: `'./morphing_temp_results'`): 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` (`Optional[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` (`Optional[List[str]]`, default: `None`): **For Global tool only.** A list of GCMs to use.\n", "* `fwg_rcm_pairs` (`Optional[List[str]]`, default: `None`): **For Europe tool only.** A 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": 10, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:57:55 - INFO - --- Step 2: Configuring and Previewing Morphing Plan ---\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\\final_results_workflow_global\n", " - EPWs to be Morphed (2 files):\n", " - GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw\n", " - sevilla_in_this_one_the_uhi_is_type-1.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\\final_results_workflow_global\\London_type-2_ssp126_2050_interp-2.epw\n", " -> Generated 'ssp245_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_SSP2-4.5_2050_interp-2.epw\n", " -> Generated 'ssp370_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_ssp370_2050_interp-2.epw\n", " -> Generated 'ssp585_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_SSP5-8.5_2050_interp-2.epw\n", " -> Generated 'ssp126_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_ssp126_2080_interp-2.epw\n", " -> Generated 'ssp245_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_SSP2-4.5_2080_interp-2.epw\n", " -> Generated 'ssp370_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_ssp370_2080_interp-2.epw\n", " -> Generated 'ssp585_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\London_type-2_SSP5-8.5_2080_interp-2.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\\final_results_workflow_global\\Seville_type-1_ssp126_2050_interp-2.epw\n", " -> Generated 'ssp245_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_SSP2-4.5_2050_interp-2.epw\n", " -> Generated 'ssp370_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_ssp370_2050_interp-2.epw\n", " -> Generated 'ssp585_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_SSP5-8.5_2050_interp-2.epw\n", " -> Generated 'ssp126_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_ssp126_2080_interp-2.epw\n", " -> Generated 'ssp245_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_SSP2-4.5_2080_interp-2.epw\n", " -> Generated 'ssp370_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_ssp370_2080_interp-2.epw\n", " -> Generated 'ssp585_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_global\\Seville_type-1_SSP5-8.5_2080_interp-2.epw\n", "============================================================\n", "Configuration set. Call execute_morphing() to start the process.\n" ] } ], "source": [ "# We will continue with the 'workflow' object, which now contains the keyword-mapped files.\n", "workflow.configure_and_preview(\n", " final_output_dir='./final_results_workflow_global',\n", " # The placeholders {city} and {uhi} match the mapping rule keys\n", " output_filename_pattern='{city}_{uhi}_{ssp}_{year}_interp-{fwg_interpolation_method_id}',\n", " # The {ssp} placeholder will be populated from this mapping\n", " # For instance, the SSP scenario will be shown as 'SSP2-4.5' in the output filename instead of 'ssp245'.\n", " scenario_mapping={'ssp245': 'SSP2-4.5', 'ssp585': 'SSP5-8.5'},\n", " \n", " # --- FWG Configuration ---\n", " fwg_jar_path=jar_path,\n", " fwg_gcms=['BCC_CSM2_MR'], # Use just one GCM for a quick test\n", " fwg_interpolation_method_id=2, # This value will appear in the filename\n", " fwg_epw_original_lcz=2, # Use a validated LCZ from the check above\n", " fwg_target_uhi_lcz=3, # Use a validated LCZ from the check above\n", " fwg_show_tool_output=True,\n", " delete_temp_files=False # Set to False for debugging\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also inspect the rename plan just shown above in the attribute `.rename_plan`" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'epws/wo_pattern\\\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw': {'ssp126_2050.epw': './final_results_workflow_global\\\\London_type-2_ssp126_2050_interp-2.epw',\n", " 'ssp245_2050.epw': './final_results_workflow_global\\\\London_type-2_SSP2-4.5_2050_interp-2.epw',\n", " 'ssp370_2050.epw': './final_results_workflow_global\\\\London_type-2_ssp370_2050_interp-2.epw',\n", " 'ssp585_2050.epw': './final_results_workflow_global\\\\London_type-2_SSP5-8.5_2050_interp-2.epw',\n", " 'ssp126_2080.epw': './final_results_workflow_global\\\\London_type-2_ssp126_2080_interp-2.epw',\n", " 'ssp245_2080.epw': './final_results_workflow_global\\\\London_type-2_SSP2-4.5_2080_interp-2.epw',\n", " 'ssp370_2080.epw': './final_results_workflow_global\\\\London_type-2_ssp370_2080_interp-2.epw',\n", " 'ssp585_2080.epw': './final_results_workflow_global\\\\London_type-2_SSP5-8.5_2080_interp-2.epw'},\n", " 'epws/wo_pattern\\\\sevilla_in_this_one_the_uhi_is_type-1.epw': {'ssp126_2050.epw': './final_results_workflow_global\\\\Seville_type-1_ssp126_2050_interp-2.epw',\n", " 'ssp245_2050.epw': './final_results_workflow_global\\\\Seville_type-1_SSP2-4.5_2050_interp-2.epw',\n", " 'ssp370_2050.epw': './final_results_workflow_global\\\\Seville_type-1_ssp370_2050_interp-2.epw',\n", " 'ssp585_2050.epw': './final_results_workflow_global\\\\Seville_type-1_SSP5-8.5_2050_interp-2.epw',\n", " 'ssp126_2080.epw': './final_results_workflow_global\\\\Seville_type-1_ssp126_2080_interp-2.epw',\n", " 'ssp245_2080.epw': './final_results_workflow_global\\\\Seville_type-1_SSP2-4.5_2080_interp-2.epw',\n", " 'ssp370_2080.epw': './final_results_workflow_global\\\\Seville_type-1_ssp370_2080_interp-2.epw',\n", " 'ssp585_2080.epw': './final_results_workflow_global\\\\Seville_type-1_SSP5-8.5_2080_interp-2.epw'}}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "workflow.rename_plan" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The inputs you have defined as well as the default values automatically set for the arguments not specified can be inspected in the attribute `.inputs` prior to running the morphing workflow." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'epw_files': ['epws/wo_pattern\\\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw',\n", " 'epws/wo_pattern\\\\sevilla_in_this_one_the_uhi_is_type-1.epw'],\n", " 'final_output_dir': './final_results_workflow_global',\n", " 'output_filename_pattern': '{city}_{uhi}_{ssp}_{year}_interp-{fwg_interpolation_method_id}',\n", " 'scenario_mapping': {'ssp245': 'SSP2-4.5', 'ssp585': 'SSP5-8.5'},\n", " 'fwg_jar_path': 'D:\\\\OneDrive - Universidad de Cádiz (uca.es)\\\\Programas\\\\FutureWeatherGenerator_v3.0.1.jar',\n", " 'run_incomplete_files': False,\n", " 'delete_temp_files': False,\n", " 'temp_base_dir': './morphing_temp_results',\n", " 'show_tool_output': True,\n", " 'fwg_params': {'gcms': ['BCC_CSM2_MR'],\n", " 'create_ensemble': True,\n", " 'winter_sd_shift': 0.0,\n", " 'summer_sd_shift': 0.0,\n", " 'month_transition_hours': 72,\n", " 'use_multithreading': True,\n", " 'interpolation_method_id': 2,\n", " 'limit_variables': True,\n", " 'solar_hour_adjustment': 1,\n", " 'diffuse_irradiation_model': 1,\n", " 'add_uhi': True,\n", " 'epw_original_lcz': 2,\n", " 'target_uhi_lcz': 3},\n", " 'fwg_params_formatted': {'models': 'BCC_CSM2_MR',\n", " 'ensemble': '1',\n", " 'sd_shift': '0.0:0.0',\n", " 'month_transition_hours': '72',\n", " 'do_multithred_computation': 'true',\n", " 'interpolation_method_id': '2',\n", " 'do_limit_variables': 'true',\n", " 'solar_hour_adjustment_option': '1',\n", " 'diffuse_irradiation_model_option': '1',\n", " 'uhi_combined': '1:2:3'}}" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "workflow.inputs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The attribute `.inputs` is a dictionary, which contains among others the arguments used in the FWG tool, that is, the values that are going to be passed to the CMD prompt. You can inspect these in the dictionary nested in key `fwg_params`." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'gcms': ['BCC_CSM2_MR'],\n", " 'create_ensemble': True,\n", " 'winter_sd_shift': 0.0,\n", " 'summer_sd_shift': 0.0,\n", " 'month_transition_hours': 72,\n", " 'use_multithreading': True,\n", " 'interpolation_method_id': 2,\n", " 'limit_variables': True,\n", " 'solar_hour_adjustment': 1,\n", " 'diffuse_irradiation_model': 1,\n", " 'add_uhi': True,\n", " 'epw_original_lcz': 2,\n", " 'target_uhi_lcz': 3}" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "workflow.inputs['fwg_params']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 3: Execute the Morphing Process\n", "\n", "This is the final step. The `execute_morphing` method takes **no arguments**. It acts as the \"Go\" button, running the entire process based on the configuration from the previous step." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:57:55 - INFO - --- Step 4: Executing morphing workflow ---\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - INFO - Validating LCZ availability for GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw...\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - 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-25 09:57:55 - INFO - --- Applying UHI effect to GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw ---\u001B[0m\n", "\u001B[32m2025-09-25 09:57:55 - 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\\tmpglj33sco/ true 2:3\u001B[0m\n", "\u001B[32m2025-09-25 09:58:01 - INFO - UHI effect applied successfully.\u001B[0m\n", "\u001B[32m2025-09-25 09:58:01 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001B[0m\n", "\u001B[32m2025-09-25 09:58:01 - 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 BCC_CSM2_MR 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2/ true 2 true 1 1 1:2:3\n", " --- FWG Real-time Output ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:58:56 - INFO - Processing generated files in: ./morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp126_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp126_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp245_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp245_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp370_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp370_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp585_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_BCC_CSM2_MR_ssp585_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050.epw' to './final_results_workflow_global\\London_type-2_ssp126_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050.stat' to './final_results_workflow_global\\London_type-2_ssp126_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080.epw' to './final_results_workflow_global\\London_type-2_ssp126_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080.stat' to './final_results_workflow_global\\London_type-2_ssp126_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp126_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050.epw' to './final_results_workflow_global\\London_type-2_SSP2-4.5_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050.stat' to './final_results_workflow_global\\London_type-2_SSP2-4.5_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080.epw' to './final_results_workflow_global\\London_type-2_SSP2-4.5_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080.stat' to './final_results_workflow_global\\London_type-2_SSP2-4.5_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp245_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050.epw' to './final_results_workflow_global\\London_type-2_ssp370_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050.stat' to './final_results_workflow_global\\London_type-2_ssp370_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080.epw' to './final_results_workflow_global\\London_type-2_ssp370_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080.stat' to './final_results_workflow_global\\London_type-2_ssp370_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp370_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050.epw' to './final_results_workflow_global\\London_type-2_SSP5-8.5_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050.stat' to './final_results_workflow_global\\London_type-2_SSP5-8.5_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080.epw' to './final_results_workflow_global\\London_type-2_SSP5-8.5_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Moving './morphing_temp_results\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080.stat' to './final_results_workflow_global\\London_type-2_SSP5-8.5_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_ssp585_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - INFO - Validating LCZ availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - 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-25 09:58:56 - INFO - --- Applying UHI effect to sevilla_in_this_one_the_uhi_is_type-1.epw ---\u001B[0m\n", "\u001B[32m2025-09-25 09:58:56 - 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\\tmpjw5s53u6/ true 2:3\u001B[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " --- End of FWG Output ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:59:00 - INFO - UHI effect applied successfully.\u001B[0m\n", "\u001B[32m2025-09-25 09:59:00 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001B[0m\n", "\u001B[32m2025-09-25 09:59:00 - 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 BCC_CSM2_MR 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1/ true 2 true 1 1 1:2:3\n", " --- FWG Real-time Output ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 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-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp126_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp126_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp245_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp245_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp370_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp370_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp585_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_BCC_CSM2_MR_ssp585_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2050.epw' to './final_results_workflow_global\\Seville_type-1_ssp126_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2050.stat' to './final_results_workflow_global\\Seville_type-1_ssp126_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2080.epw' to './final_results_workflow_global\\Seville_type-1_ssp126_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp126_2080.stat' to './final_results_workflow_global\\Seville_type-1_ssp126_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp126_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2050.epw' to './final_results_workflow_global\\Seville_type-1_SSP2-4.5_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2050.stat' to './final_results_workflow_global\\Seville_type-1_SSP2-4.5_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2080.epw' to './final_results_workflow_global\\Seville_type-1_SSP2-4.5_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp245_2080.stat' to './final_results_workflow_global\\Seville_type-1_SSP2-4.5_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp245_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2050.epw' to './final_results_workflow_global\\Seville_type-1_ssp370_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2050.stat' to './final_results_workflow_global\\Seville_type-1_ssp370_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2080.epw' to './final_results_workflow_global\\Seville_type-1_ssp370_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp370_2080.stat' to './final_results_workflow_global\\Seville_type-1_ssp370_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp370_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2050.epw' to './final_results_workflow_global\\Seville_type-1_SSP5-8.5_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2050.stat' to './final_results_workflow_global\\Seville_type-1_SSP5-8.5_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2080.epw' to './final_results_workflow_global\\Seville_type-1_SSP5-8.5_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Moving './morphing_temp_results\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_ssp585_2080.stat' to './final_results_workflow_global\\Seville_type-1_SSP5-8.5_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_ssp585_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 09:59:46 - INFO - Morphing workflow finished.\u001B[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " --- End of FWG Output ---\n" ] } ], "source": [ "workflow.execute_morphing()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's take a look at the files we have created." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['London_type-2_ssp126_2050_interp-2.epw',\n", " 'London_type-2_ssp126_2050_interp-2.stat',\n", " 'London_type-2_ssp126_2080_interp-2.epw',\n", " 'London_type-2_ssp126_2080_interp-2.stat',\n", " 'London_type-2_SSP2-4.5_2050_interp-2.epw',\n", " 'London_type-2_SSP2-4.5_2050_interp-2.stat',\n", " 'London_type-2_SSP2-4.5_2080_interp-2.epw',\n", " 'London_type-2_SSP2-4.5_2080_interp-2.stat',\n", " 'London_type-2_ssp370_2050_interp-2.epw',\n", " 'London_type-2_ssp370_2050_interp-2.stat',\n", " 'London_type-2_ssp370_2080_interp-2.epw',\n", " 'London_type-2_ssp370_2080_interp-2.stat',\n", " 'London_type-2_SSP5-8.5_2050_interp-2.epw',\n", " 'London_type-2_SSP5-8.5_2050_interp-2.stat',\n", " 'London_type-2_SSP5-8.5_2080_interp-2.epw',\n", " 'London_type-2_SSP5-8.5_2080_interp-2.stat',\n", " 'Seville_type-1_ssp126_2050_interp-2.epw',\n", " 'Seville_type-1_ssp126_2050_interp-2.stat',\n", " 'Seville_type-1_ssp126_2080_interp-2.epw',\n", " 'Seville_type-1_ssp126_2080_interp-2.stat',\n", " 'Seville_type-1_SSP2-4.5_2050_interp-2.epw',\n", " 'Seville_type-1_SSP2-4.5_2050_interp-2.stat',\n", " 'Seville_type-1_SSP2-4.5_2080_interp-2.epw',\n", " 'Seville_type-1_SSP2-4.5_2080_interp-2.stat',\n", " 'Seville_type-1_ssp370_2050_interp-2.epw',\n", " 'Seville_type-1_ssp370_2050_interp-2.stat',\n", " 'Seville_type-1_ssp370_2080_interp-2.epw',\n", " 'Seville_type-1_ssp370_2080_interp-2.stat',\n", " 'Seville_type-1_SSP5-8.5_2050_interp-2.epw',\n", " 'Seville_type-1_SSP5-8.5_2050_interp-2.stat',\n", " 'Seville_type-1_SSP5-8.5_2080_interp-2.epw',\n", " 'Seville_type-1_SSP5-8.5_2080_interp-2.stat']" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "new_files = [i for i in os.listdir('./final_results_workflow_global')]\n", "new_files" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's delete the files we just generated." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "import shutil\n", "shutil.rmtree('final_results_workflow_global')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using `MorphingWorkflowEurope`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Differences compared to `MorphingWorkflowGlobal`\n", ">**FYI**: the usage of `MorphingWorkflowEurope` is very similar to the global version. The only differences are:\n", "\n", ">* Instead of argument `fwg_gcms`, you need to use `fwg_rcm_pairs`.\n", ">* Instead of variable `DEFAULT_GLOBAL_GCMS`, the available models are in variable `DEFAULT_EUROPE_RCMS`. Therefore, the models you can use in `fwg_rcm_pairs` are those included in `DEFAULT_EUROPE_RCMS`.\n", ">* Future scenarios are RCP instead of SSP. Therefore, in `.configure_and_preview`'s' `scenario_mapping` argument, the dictionary keys must be `'rcp26'`, `'rcp45'` and `'rcp85'`. Also, instead of placeholder `{ssp}`, you must use placeholder **`{rcp}`**\n", ">* You have to remember using the `jar_path` to the FutureWeatherGenerator_Europe_vx.x.x.jar file." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example of use\n", "\n", "Since we have already explain the details in the `MorphingWorkflowGlobal` class and highlighted the differences, we are going to show the usage of `MorphingWorkflowEurope` in the following cell." ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:59:47 - INFO - --- Step 1: Mapping categories from filenames ---\u001B[0m\n", "\u001B[32m2025-09-25 09:59:47 - 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-25 09:59:47 - 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-25 09:59:47 - INFO - Category mapping complete.\u001B[0m\n", "\u001B[32m2025-09-25 09:59:47 - INFO - --- Step 2: Configuring and Previewing Morphing Plan ---\u001B[0m\n", "\u001B[32m2025-09-25 09:59:47 - INFO - --- Step 4: Executing morphing workflow ---\u001B[0m\n", "\u001B[32m2025-09-25 09:59:47 - INFO - Validating LCZ availability for GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw...\u001B[0m\n", "\u001B[32m2025-09-25 09:59:47 - 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-25 09:59:47 - INFO - --- Applying UHI effect to GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw ---\u001B[0m\n", "\u001B[32m2025-09-25 09:59:47 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_Europe_v1.0.1.jar\" futureweathergenerator_europe.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\\tmppq_8mfoi/ true 2:3\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_Europe_v1.0.1.jar\n", " - Final Output Directory: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\n", " - EPWs to be Morphed (2 files):\n", " - GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw\n", " - sevilla_in_this_one_the_uhi_is_type-1.epw\n", "\n", " For input file: GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw\n", " -> Generated 'rcp26_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\London_type-2_RCP-2.6_2050_interp-2.epw\n", " -> Generated 'rcp45_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\London_type-2_rcp45_2050_interp-2.epw\n", " -> Generated 'rcp85_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\London_type-2_rcp85_2050_interp-2.epw\n", " -> Generated 'rcp26_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\London_type-2_RCP-2.6_2080_interp-2.epw\n", " -> Generated 'rcp45_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\London_type-2_rcp45_2080_interp-2.epw\n", " -> Generated 'rcp85_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\London_type-2_rcp85_2080_interp-2.epw\n", "\n", " For input file: sevilla_in_this_one_the_uhi_is_type-1.epw\n", " -> Generated 'rcp26_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\Seville_type-1_RCP-2.6_2050_interp-2.epw\n", " -> Generated 'rcp45_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\Seville_type-1_rcp45_2050_interp-2.epw\n", " -> Generated 'rcp85_2050.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\Seville_type-1_rcp85_2050_interp-2.epw\n", " -> Generated 'rcp26_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\Seville_type-1_RCP-2.6_2080_interp-2.epw\n", " -> Generated 'rcp45_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\Seville_type-1_rcp45_2080_interp-2.epw\n", " -> Generated 'rcp85_2080.epw' will be moved to: D:\\Python\\pyfwg\\pyfwg\\tutorials\\final_results_workflow_europe\\Seville_type-1_rcp85_2080_interp-2.epw\n", "============================================================\n", "Configuration set. Call execute_morphing() to start the process.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 09:59:51 - INFO - UHI effect applied successfully.\u001B[0m\n", "\u001B[32m2025-09-25 09:59:51 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001B[0m\n", "\u001B[32m2025-09-25 09:59:51 - INFO - Copied input file to temporary directory: ./morphing_temp_results_europe\\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_Europe_v1.0.1.jar\" futureweathergenerator_europe.Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\GBR_London.Gatwick.037760_IWEC_uhi_type-2.epw ICHEC_EC_EARTH_SMHI_RCA4 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2/ true 2 true 1 1 1:2:3\n", " --- FWG Real-time Output ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 10:00:50 - INFO - Processing generated files in: ./morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp26_2050.epw' to './final_results_workflow_europe\\London_type-2_RCP-2.6_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp26_2050.stat' to './final_results_workflow_europe\\London_type-2_RCP-2.6_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp26_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp26_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp26_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp26_2080.epw' to './final_results_workflow_europe\\London_type-2_RCP-2.6_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp26_2080.stat' to './final_results_workflow_europe\\London_type-2_RCP-2.6_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp26_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp26_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp26_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp45_2050.epw' to './final_results_workflow_europe\\London_type-2_rcp45_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp45_2050.stat' to './final_results_workflow_europe\\London_type-2_rcp45_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp45_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp45_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp45_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp45_2080.epw' to './final_results_workflow_europe\\London_type-2_rcp45_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp45_2080.stat' to './final_results_workflow_europe\\London_type-2_rcp45_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp45_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp45_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp45_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp85_2050.epw' to './final_results_workflow_europe\\London_type-2_rcp85_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp85_2050.stat' to './final_results_workflow_europe\\London_type-2_rcp85_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp85_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp85_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp85_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp85_2080.epw' to './final_results_workflow_europe\\London_type-2_rcp85_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Moving './morphing_temp_results_europe\\GBR_London.Gatwick.037760_IWEC_uhi_type-2\\GBR_-_LONDON-GATWICK_Ensemble_rcp85_2080.stat' to './final_results_workflow_europe\\London_type-2_rcp85_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp85_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp85_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_Ensemble_rcp85_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_ICHEC_EC_EARTH_SMHI_RCA4_rcp26_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_ICHEC_EC_EARTH_SMHI_RCA4_rcp26_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_ICHEC_EC_EARTH_SMHI_RCA4_rcp45_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_ICHEC_EC_EARTH_SMHI_RCA4_rcp45_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_ICHEC_EC_EARTH_SMHI_RCA4_rcp85_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Skipping auxiliary file: 'GBR_-_LONDON-GATWICK_ICHEC_EC_EARTH_SMHI_RCA4_rcp85_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Validating LCZ availability for sevilla_in_this_one_the_uhi_is_type-1.epw...\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - 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-25 10:00:50 - INFO - --- Applying UHI effect to sevilla_in_this_one_the_uhi_is_type-1.epw ---\u001B[0m\n", "\u001B[32m2025-09-25 10:00:50 - INFO - Executing command: java -cp \"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_Europe_v1.0.1.jar\" futureweathergenerator_europe.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\\tmp7rxn2zn3/ true 2:3\u001B[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " --- End of FWG Output ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 10:00:56 - INFO - UHI effect applied successfully.\u001B[0m\n", "\u001B[32m2025-09-25 10:00:56 - INFO - LCZ pair (Original: 2, Target: 3) is available.\u001B[0m\n", "\u001B[32m2025-09-25 10:00:56 - INFO - Copied input file to temporary directory: ./morphing_temp_results_europe\\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_Europe_v1.0.1.jar\" futureweathergenerator_europe.Morph D:\\Python\\pyfwg\\pyfwg\\tutorials\\epws\\wo_pattern\\sevilla_in_this_one_the_uhi_is_type-1.epw ICHEC_EC_EARTH_SMHI_RCA4 1 0.0:0.0 72 D:\\Python\\pyfwg\\pyfwg\\tutorials\\morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1/ true 2 true 1 1 1:2:3\n", " --- FWG Real-time Output ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001B[32m2025-09-25 10:01:56 - INFO - Processing generated files in: ./morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp26_2050.epw' to './final_results_workflow_europe\\Seville_type-1_RCP-2.6_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp26_2050.stat' to './final_results_workflow_europe\\Seville_type-1_RCP-2.6_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp26_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp26_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp26_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp26_2080.epw' to './final_results_workflow_europe\\Seville_type-1_RCP-2.6_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp26_2080.stat' to './final_results_workflow_europe\\Seville_type-1_RCP-2.6_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp26_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp26_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp26_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp45_2050.epw' to './final_results_workflow_europe\\Seville_type-1_rcp45_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp45_2050.stat' to './final_results_workflow_europe\\Seville_type-1_rcp45_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp45_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp45_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp45_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp45_2080.epw' to './final_results_workflow_europe\\Seville_type-1_rcp45_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp45_2080.stat' to './final_results_workflow_europe\\Seville_type-1_rcp45_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp45_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp45_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp45_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp85_2050.epw' to './final_results_workflow_europe\\Seville_type-1_rcp85_2050_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp85_2050.stat' to './final_results_workflow_europe\\Seville_type-1_rcp85_2050_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp85_2050_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp85_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp85_2050_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp85_2080.epw' to './final_results_workflow_europe\\Seville_type-1_rcp85_2080_interp-2.epw'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Moving './morphing_temp_results_europe\\sevilla_in_this_one_the_uhi_is_type-1\\ESP_-_SEVILLA_Ensemble_rcp85_2080.stat' to './final_results_workflow_europe\\Seville_type-1_rcp85_2080_interp-2.stat'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp85_2080_ErrorsAndWarnings.log'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp85_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_Ensemble_rcp85_2080_MorphedEPWsComparison.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_ICHEC_EC_EARTH_SMHI_RCA4_rcp26_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_ICHEC_EC_EARTH_SMHI_RCA4_rcp26_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_ICHEC_EC_EARTH_SMHI_RCA4_rcp45_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_ICHEC_EC_EARTH_SMHI_RCA4_rcp45_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_ICHEC_EC_EARTH_SMHI_RCA4_rcp85_2050_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Skipping auxiliary file: 'ESP_-_SEVILLA_ICHEC_EC_EARTH_SMHI_RCA4_rcp85_2080_GridPointVariables.csv'\u001B[0m\n", "\u001B[32m2025-09-25 10:01:57 - INFO - Morphing workflow finished.\u001B[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " --- End of FWG Output ---\n" ] } ], "source": [ "import os\n", "import pandas as pd\n", "from pyfwg import MorphingWorkflowEurope, DEFAULT_EUROPE_RCMS\n", "\n", "# --- Configuration ---\n", "# !!! IMPORTANT: You MUST change this path to the correct location on your PC !!!\n", "# Also, remember to define the path to the FutureWeatherGenerator_Europe_vx.x.x.jar file\n", "# if you are going to instantiate a MorphingWorkflowEurope class.\n", "jar_path = r\"D:\\OneDrive - Universidad de Cádiz (uca.es)\\Programas\\FutureWeatherGenerator_Europe_v1.0.1.jar\"\n", "\n", "# --- Define file paths for the examples ---\n", "pattern_epw_dir = 'epws/w_pattern'\n", "keyword_epw_dir = 'epws/wo_pattern'\n", "\n", "# Instantiate a workflow object for this example\n", "workflow = MorphingWorkflowEurope()\n", "\n", "# Define the list of files for this specific case\n", "epw_files_without_pattern = [os.path.join(keyword_epw_dir, f) for f in os.listdir(keyword_epw_dir) if f.endswith('.epw')]\n", "\n", "# Define the mapping rules to categorize filenames based on their content.\n", "# This dictionary provides the logic for both keyword searching and normalization.\n", "mapping_rules = {\n", " # The top-level keys ('city', 'uhi') define the final category names\n", " # that will be available as placeholders (e.g., {city}) in the output filename.\n", " 'city': {\n", " # The second-level keys ('Seville', 'London') are the final, clean values\n", " # that will be assigned to the 'city' category.\n", " 'Seville': ['sevilla', 'SVQ'], # The keywords to search for (case-insensitive).\n", " 'London': ['london', 'gatwick'] # A list is used for multiple possible keywords.\n", " },\n", " 'uhi': {\n", " # For convenience, if there is only one keyword to search for,\n", " # you can provide it as a single string instead of a list with one item.\n", " 'type-1': 'type-1',\n", " 'type-2': 'type-2'\n", " }\n", "}\n", "# For example, if a filename contains 'SVQ', pyfwg will assign the value 'Seville'\n", "# to the 'city' category for that file.\n", "\n", "# Let's map the files to the categories.\n", "workflow.map_categories(\n", " epw_files=epw_files_without_pattern,\n", " input_filename_pattern=None,\n", " keyword_mapping=mapping_rules\n", ")\n", "\n", "# We will continue with the 'workflow' object, which now contains the keyword-mapped files.\n", "workflow.configure_and_preview(\n", " final_output_dir='./final_results_workflow_europe',\n", " # The placeholders {city} and {uhi} match the mapping rule keys\n", " output_filename_pattern='{city}_{uhi}_{rcp}_{year}_interp-{fwg_interpolation_method_id}',\n", " # The {ssp} placeholder will be populated from this mapping\n", " # For instance, the SSP scenario will be shown as 'SSP2-4.5' in the output filename instead of 'ssp245'.\n", " scenario_mapping={'rcp26': 'RCP-2.6'},\n", "\n", " # --- FWG Configuration ---\n", " fwg_jar_path=jar_path,\n", " # Important: remember to use fwg_rcm_pairs in the MorphingWorkflowEurope instead of fwg_gcms!\n", " fwg_rcm_pairs=[list(DEFAULT_EUROPE_RCMS)[0]], # Let's use the first RCM of the list for a quick test. Remember it must be a list (even if it contains just 1 item)\n", " fwg_interpolation_method_id=2, # This value will appear in the filename\n", " fwg_epw_original_lcz=2, # Use a validated LCZ from the check above\n", " fwg_target_uhi_lcz=3, # Use a validated LCZ from the check above\n", " fwg_show_tool_output=True,\n", " delete_temp_files=False # Set to False for debugging\n", ")\n", "\n", "# Execute the morphing process\n", "workflow.execute_morphing()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this case, the new files we have generated are:" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['London_type-2_RCP-2.6_2050_interp-2.epw',\n", " 'London_type-2_RCP-2.6_2050_interp-2.stat',\n", " 'London_type-2_RCP-2.6_2080_interp-2.epw',\n", " 'London_type-2_RCP-2.6_2080_interp-2.stat',\n", " 'London_type-2_rcp45_2050_interp-2.epw',\n", " 'London_type-2_rcp45_2050_interp-2.stat',\n", " 'London_type-2_rcp45_2080_interp-2.epw',\n", " 'London_type-2_rcp45_2080_interp-2.stat',\n", " 'London_type-2_rcp85_2050_interp-2.epw',\n", " 'London_type-2_rcp85_2050_interp-2.stat',\n", " 'London_type-2_rcp85_2080_interp-2.epw',\n", " 'London_type-2_rcp85_2080_interp-2.stat',\n", " 'Seville_type-1_RCP-2.6_2050_interp-2.epw',\n", " 'Seville_type-1_RCP-2.6_2050_interp-2.stat',\n", " 'Seville_type-1_RCP-2.6_2080_interp-2.epw',\n", " 'Seville_type-1_RCP-2.6_2080_interp-2.stat',\n", " 'Seville_type-1_rcp45_2050_interp-2.epw',\n", " 'Seville_type-1_rcp45_2050_interp-2.stat',\n", " 'Seville_type-1_rcp45_2080_interp-2.epw',\n", " 'Seville_type-1_rcp45_2080_interp-2.stat',\n", " 'Seville_type-1_rcp85_2050_interp-2.epw',\n", " 'Seville_type-1_rcp85_2050_interp-2.stat',\n", " 'Seville_type-1_rcp85_2080_interp-2.epw',\n", " 'Seville_type-1_rcp85_2080_interp-2.stat']" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "new_files_europe = [i for i in os.listdir('./final_results_workflow_europe')]\n", "new_files_europe" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's delete the files we just generated." ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "shutil.rmtree('final_results_workflow_europe')" ] } ], "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 }