Session 2: Assignment#
Apply session 2 material to create a remote model-based Tornado and local dataset-based Tornado with the given information and get hazard values from created hazards
Agenda
1. Create a model-based Tornado (Remote)
2. Create a dataset-based Tornado (Local)
Please follow the instruction at each cell.
1. Create a model-based Tornado (Remote)#
Using the data from section 2.1.2, slightly alter the values of the Centerville tornado and obtain a new set of parameters that differ from the previously seen examples.
Tornado model definition:
Tornado Model: MeanWidthTornado
EF Rating: EF3
Start point of path:
Latitude:
Longitude:
End point of path:
Latitude:
Longitude:
Wind speed method: 1
number of simulation: 1
random seed: 2023
After you have obtained them, proceed as shown during the session.
# Import modules
from pyincore import HazardService, IncoreClient
import json
# Connect to IN-CORE serivce by creating IncoreClient
client = IncoreClient()
# Create the HazardService object
# TODO: create a JSON (dictionary) definition of tornado model as given above
my_tornado_model = ""
# TODO: create a tornado using the hazard service
# TODO: acquire hazard id you created and visualize
# TODO: Getting and printing hazard value from your tornado
2. Create a dataset-based Tornado (Local)#
Now, using the dataset-based tornado definition seen in section 3.1.1, define a new local tornado hazard and get values for the same location with and without a seed parameter.
Proceed as in the prior exercise.
# Import modules
from pyincore import Tornado
import os
# TODO: indicate the path of the tornado dataset files
dir = "data/hazard/tornado/"
# TODO: create the tornado object with definition
# TODO: attach the shapefile representing the tornado
# TODO: Getting and printing hazard value from your tornado for specific seed value
# TODO: Getting and printing hazard values from your tornado for a random seed value
# TODO: Visualize the tornado using GeoDataFrame.explore(), see section 3.2.1 for getting the geodataframe