Replies: 1 comment · 4 replies
-
Hello, Thanks for your interest in using R2D! To import the hazard with only flood depth, you can start from the built-in example 7 and remove the 'PWD' column in all the 'GP_files' (e.g., '10001.csv') in the input_data/IMs folder. This can be down with a simple Python script like below: import os import pandas as pd orig_dir = '../E7HurricaneWindWater/input_data/IMs' new_dir = '../E7HurricaneWaterOnly/input_data/IMs' orig_grid_file = os.path.join(orig_dir, 'EventGrid.csv') orig_grid = pd.read_csv(orig_grid_file) for i in orig_grid.index: gp_file = os.path.join(orig_dir, orig_grid.loc[i, 'GP_file']) gp = pd.read_csv(gp_file) gp = gp.drop(columns = ['PWS']) gp.to_csv(os.path.join(new_dir, orig_grid.loc[i, 'GP_file']), index=False) Besides preparing the hazard files, you will also need to modify the "auto-population script" defined in the DL panel under pelicun3 to assign proper fragility/consequence functions to each building in your building inventory. Can you provide more information on what type of fragility functions you plan to use so we can better assist you in modifying the "auto-population script"? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you so much for your response, yes i was exactly trying that but getting error when removing the wind data column. I do not have access to fragility curves of HAZUS, but I believe it does have fragility curves only for flood, right? is there any way for modifying auto_population script to use those fragility curves? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you describe the error you encounter when removing the wind data column? I tested this and did not experience any errors. The HAZUS fragility curves are described in FEMA HAZUS technical manuals. HAZUS do not use conventional fragility curves that map water depth to probabilities of damage states. Instead, HAZUS uses vulnerability functions, which directly relate water depth to loss ratios. The current version of the damage and loss package (Pelicun) used by R2D does not support these vulnerability functions. However, the next release, expected within one to two weeks, will include support for them. To modify the "auto_population script" and use the flood vulnerability functions only without considering wind damages, you can start with the auto_population script in the built-in Example 7, and remove the wind sensitive components on line 150 of auto_HU_NJ.py. One example of such auto_population is attached at: NJ_rulesets.zip In summary, after the release of the new Pelicun, you can use the NJ_rulesets.zip provided above to analyze flood-induced damage for the region in example 7. However, since the ruleset is region-specific, I recommend creating your own rulesets tailored to your region of interest. If you have any questions, please feel free to post them here. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you so much for your response. My area of interest is Hoboken in NJ, so do you think I can use the same DL for my region? Also, when I followed as you mentioned (removed PWS from .csv files and use the auto_HU_NJ.py with removing line 150 to consider flood depth only), I got this error: 08:42:08 - Setting up temporary directory. 08:42:10 - /Users/shimakasaei/.bash_profile: line 95: dirname: command not found 08:42:10 - /Users/shimakasaei/.bash_profile: line 20: dirname: command not found 08:42:10 - /Users/shimakasaei/.bash_profile: line 21: dirname: command not found 08:42:30 - System Information: 08:42:11 Started running the workflow script
08:42:11 Initializing the working directory.
"/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9" "/Applications/R2D.app/Contents/MacOS/applications/createAIM/CSV_to_AIM/CSV_to_AIM.py" "--assetFile" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/Buildings1-20.json" "--assetSourceFile" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/input_data/AtlanticBuildingInventory.csv" "--filter" "1-20" "--getRV"
Output: 0
08:42:12 Augmenting files for individual assets for Workflow
08:42:12 Simulating regional event... 08:42:12 Creating regional mapping... "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9" "/Applications/R2D.app/Contents/MacOS/applications/performRegionalMapping/NearestNeighborEvents/NNE.py" "--assetFile" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/Buildings1-20.json" "--filenameEVENTgrid" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/input_data/EventGrid.csv" "--neighbors" "4" "--samples" "10" "--seed" "85" Output: 0 /Applications/R2D.app/Contents/MacOS/applications/performRegionalMapping/NearestNeighborEvents/NNE.py:155: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0! df["col"][row_indexer] = value Use See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy AIM_df.iloc[count]['Longitude'] = asset_loc['longitude'] df["col"][row_indexer] = value Use See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy AIM_df.iloc[count]['Latitude'] = asset_loc['latitude'] df["col"][row_indexer] = value Use See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy AIM_df.iloc[count]['file'] = asset['file']
08:42:26 Buildings id 1 in file /Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/1-AIM.json Starting sWHALE workflow 08:42:26 Running the workflow script Copied AIM file to: /Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/1/templatedir/1-AIM.json
08:42:26 Running preprocessing step random variables
"/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9" "/Applications/R2D.app/Contents/MacOS/applications/createEVENT/SimCenterEvent/SimCenterEvent.py" "--filenameAIM" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/1-AIM.json" "--filenameEVENT" "EVENT.json" "--getRV" Output: 0
"/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9" "/Applications/R2D.app/Contents/MacOS/applications/performSIMULATION/IMasEDP/IMasEDP.py" "--filenameAIM" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/1-AIM.json" "--filenameSAM" "SAM.json" "--filenameEVENT" "EVENT.json" "--filenameEDP" "EDP.json" "--filenameSIM" "SIM.json" "--getRV" Output: 0
08:42:26 No UQ requested, workflow driver is not needed. "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9" "/Applications/R2D.app/Contents/MacOS/applications/performDL/pelicun3/pelicun3_wrapper.py" "--filenameDL" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/1-AIM.json" "--demandFile" "response.csv" "--Realizations" "500" "--auto_script" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/input_data/auto_HU_NJ.py" "--coupled_EDP" "True" "--detailed_results" "False" "--ground_failure" "False" "--log_file" "True" "--regional" "true" "--resource_dir" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results" "--dirnameOutput" "/Users/shimakasaei/Library/CloudStorage/OneDrive-stevens.edu/SFINCS/R2D_inputs/tmp.SimCenter/Results/Buildings/1"
08:42:27 ERROR
08:42:27 No performance assessment requested, performance assessment step is skipped.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello, thanks for posting the error messages. The error is because a newer version of the python package Pelicun is required. Such a package that enables water only analysis has not been released but will be released in the coming weeks. Once the new Peliun is released, you will need to run the command: The auto_population I shared with you should be applicable to Hoboken in NJ. However, I suggest reading the ruleset and confirming the correct loss functions are being used. For each building, according to the building's properties, the "FloodRulesets.py" in NJ_rulesets.zip assigns the id (e.g., 'structural.111.RES1.FIA.split_level.no_basement.a_zone') of a loss function to the building. Using the id, you can find the loss function definition here. It is suggested to review the ruleset and make decision on if the rules can be applied to your region. Hope this helps. Jinyan |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I am simulating my flood model and as a result of that I do have flood depth. I would like to use R2D to assess the damage caused by the flood depth on my critical buildings.
I have generated asset file (a csv file based on the nsi data), and I have flood depth at those points. I am not sure how to give the model my hazard file so that it knows all of the analysis are just based on flood depth not wind.
could you please help me on this part.
also, attached please find the inventory file I generated for the model.
HobokenBuildingInventory.csv
I do appreciate any guidance.
Beta Was this translation helpful? Give feedback.
All reactions