""" This file contains all your file and directory definitions for elevation, meshes and outputs. """ import os import sys import glob import anuga from os.path import join, exists from time import localtime, strftime, gmtime from anuga.utilities.system_tools import get_user_name, get_host_name event = 'BP3Hydro' SLR = 0.9 ARI = 0.0 stsName = "CutDownWorst.sts" scenario_name = 'Busselton' setup = 'final' # This can be one of three values (defined in setup.py) # trial - coarsest mesh, fast # basic - coarse mesh # final - fine mesh, slowest UseCheckRestore = True UseFlooding = False np = [8] home = '/home/547/sfm547/Busselton' # Absolute path for data folder ParScript = join(home,event,'run_model_parallel.py') outFolder = r'/short/w85/Shane/Output' if UseCheckRestore: restoreFolderName = 'RestorePts_' + setup + "_" + event #------------------------------------------------------------------------------ # Initial Conditions and Internal Variables #------------------------------------------------------------------------------ bounding_polygon_maxarea = 10 # Mesh size (m2) within the hydraulic boundary i.e. model domain minimum_storable_height = 0.10 # Minimum water depth (m) which is stored for visualisation tide = SLR # Mean Sea Level = 0. GEMS model includes tide. # Busselton Chart Datum is 0.786m below AHD (Section 3.3 "Locke Estate Busselton Investigation of Beach Stabilisation - Department for Planning and Infrastructure 2004.pdf" in the original reference/reports folder) friction = 0.03 # 0.01: Very Low 0.025-0.04: "Standard" natural channel 0.04-0.06: Pretty rough alpha = 0.1 # Smoothing of mesh; 1 is smoothest zone = 50 # Specify UTM zone of model starttime= 0 # Start time for simulation yieldstep = 720 # 12 minute timesteps finaltime = 140400 # Final time for simulation if UseCheckRestore: restPtInt = 12*yieldstep # Save a restore point every x timesteps, must be an even number #------------------------------------------------------------------------------- # Input Filenames #------------------------------------------------------------------------------- # ELEVATION DATA # Used in build_elevation.py # Format for points: easting,northing, elevation (AHD) Header: x,y ascii_grid_filenames = [] #point_filenames = ['busselton25mpoints.csv',"Busselton1mDEM_VDD_Pts.csv"] #point_filenames = ['busselton25mpoints.csv',"Busselton1mDEM_VDD_Pts.csv",\ # "Busselton1mDEM_Sab_Pts.csv","Busselton1mDEM_Abb_Pts.csv"] point_filenames = ['busselton25mpoints.csv'] # Output filename for elevation # this is a combination of all the data generated in build_elevation.py combined_elevation_basename = scenario_name + '_combined_elevation' # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh # Used in build_elevation.py # Format for points: easting,northing (no header) bounding_polygon_filename = 'ANUGA_Domain2.xyz' # Maximum size of area modelled bounding_polygon_maxarea = 10000 # Max area (m2) in any one triangle # INTERIOR REGIONS - for designing the mesh # Used in run_model.py # Format for points: easting,northing (no header) interior_regions_data = [['CoastPoly.xyz', 100]]#, # Areas (polygons) which have been refined, max area of triangles inside polygon) ['Vasse_River_1.xyz', 2], # ['Vasse_River.xyz', 2], # ['Sabina_River.xyz', 50], # ['Abba_River.xyz', 50]] # LAND - used to set the initial stage/water to be offcoast only # Used in run_model.py. Format for points easting,northing (no header) Land = 'ANUGA_Land.xyz' InitialStages = [[Land, 0.0], ['The_Broadwater.csv', 0.4], #Values from JDA's Busselton Regional Flood Study Review Volume 2 Appendices ['New_River.csv', 0.2], ['Vasse_Estuary.csv', 0.4], ['Wonnerup_Estuary.csv', 0.4]] VasseDDLine = [[347893.7127, 6271596.0586], [347901.9453, 6271603.7542]] SabinaLine = [[353132.7757,6274869.5972], [353137.009,6274871.2906]] AbbaLine = [[354860.7323,6276575.6181], [354864.4365,6276577.4172]] if ARI == 25: VasseDD = 'VasseDD25_2.tms' #From Vasse July 97 prelim report Sab = "Sabina25_2.tms" #Constructed from 29.0 peak: From Busselton Regional Flood Study Review 1998 DA Abb = "Abba25_2.tms" #Constructed from 67.0 peak: From Busselton Regional Flood Study Review 1998 DA if ARI == 100: VasseDD ="VasseDD100_2.tms" #Constructed from 190.0 peak: From Busselton Regional Flood Study Review 1998 DA Sab = "Sabina100_2.tms" #Constructed from 35.0 peak: From Busselton Regional Flood Study Review 1998 DA Abb = "Abba100_2.tms" #Constructed from 86.0 peak: From Busselton Regional Flood Study Review 1998 DA if UseFlooding: riversHydro = [[VasseDD,VasseDDLine],[Sab,SabinaLine],[Abb,AbbaLine]] else: riversHydro = [] PriorityArea_filename = None # GEMS order filename - should be in same direction as landward boundary points ie clockwise or anti-clockwise # Format is northing, easting (without header) gems_order_filename = 'GEMS_Boundary_pts.xyz' # GAUGES - for creating timeseries at a specific point # Used in get_timeseries.py. # Format easting,northing,name,elevation (with header) gauges_filename = 'gauges.csv' #'tsunamipointsMGA.csv' #------------------------------------------------------------------------------- # Locations for extracting time series (for outputs) #------------------------------------------------------------------------------- #gauges=["Marina,351040,6277403", 'Jetty,345960,6277593', "Hospital,344131,6274965"] # Order of gauges is Marina, Jetty, Hospital # BUILDINGS EXPOSURE - for identifying inundated houses # Used in run_building_inundation.py # Format latitude,longitude etc (geographic) building_exposure_filename = '' # from NEXIS # AREA OF IMAGES - Extent of each image to find out highest runup # Header - easting,northing,id,value # Used in get_runup.py images_filename = '' # Landward bounding points # Format easting,northing (no header) landward_boundary_filename = 'ANUGA_Land_pts.xyz' #------------------------------------------------------------------------------ # ADD ROUGHNESS INFORMATION HERE #------------------------------------------------------------------------------ # mannings value for different landuses, defined by polygons. Have replicated order of materials applied in TUFLOW. # Set the default materials value to 208 (sugarcane). # i.e. the area of the whole hydraulic model is sugarcane unless stated otherwise below. # Does not make sense though why TUFLOW model still defined some areas as 208! # NEED TO CHECK THAT THIS ACTUALLY WORKS IN ANUGA # i.e. THAT ROUHGNESS IN LATER SMALLER POLYGONS OVERRIDES THE DEFAULT ROUGHNESS APPLIED HERE TO THE WHOLE HYDRAULIC MODEL # IF NOT, THEN THIS WON'T WORK PROPERLY!!!!!! #ManningDictionary = {join(polygons_folder, 'mannings', 'historical', 'bounding_polygon.csv'): 0.150, # # Read materials values taken from 2d_mat_tw_422.mif # join(polygons_folder, 'mannings', 'historical', '201_0.csv'): 0.03, #2D river/waterways # join(polygons_folder, 'mannings', 'historical', '202_1.csv'): 0.026, # 2D tidal waterways # join(polygons_folder, 'mannings', 'historical', '203_0.csv'): 0.090, # 2D river banks # join(polygon:xs_folder, 'mannings', 'historical', '204_1.csv'): 0.100, # 2D dense forest # join(polygons_folder, 'mannings', 'historical', '205_0.csv'): 0.080, # 2D vegetated islands in river # join(polygons_folder, 'mannings', 'historical', '206_25.csv'): 0.060, # 2D cleared / grazing / bare land # join(polygons_folder, 'mannings', 'historical', '207_0.csv'): 0.040, # 2D parks # join(polygons_folder, 'mannings', 'historical', '208_0a.csv'): 0.150, # 2D sugarcane # join(polygons_folder, 'mannings', 'historical', '209_0.csv'): 1.000, # 2D urban # join(polygons_folder, 'mannings', 'historical', '210_0a.csv'): 0.025} # 2D highway/roads ################################################################################ ################################################################################ #### NOTE: NOTHING WOULD NORMALLY CHANGE BELOW THIS POINT. #### ################################################################################ ################################################################################ # Get system user and host names. # These values can be used to distinguish between two similar runs by two # different users or runs by the same user on two different machines. user = anuga.get_user_name() host = anuga.get_host_name() # Environment variable names. # The inundation directory, not the data directory. #ENV_INUNDATIONHOME = 'INUNDATIONHOME' #------------------------------------------------------------------------------- # Output Elevation Data #------------------------------------------------------------------------------- ## Output filename for elevation ## this is a combination of all the data generated in build_elevation.py #combined_elevation_basename = scenario_name_init + '_combined_elevation' # Output filename for elevation # this is a combination of all the data generated in build_elevation.py combined_elevation_basename = scenario_name + '_combined_elevation' #------------------------------------------------------------------------------- # Directory Structure #------------------------------------------------------------------------------- # determines time for setting up output directories time = strftime('%Y%m%d_%H%M%S', localtime()) gtime = strftime('%Y%m%d_%H%M%S', gmtime()) build_time = time + '_build' run_time = time + '_run_' # check various directories/files that must exist anuga_folder = join(home, 'anuga') topographies_folder = join(anuga_folder, 'topographies') polygons_folder = join(anuga_folder, 'polygons') boundaries_folder = join(anuga_folder, 'boundaries') gauges_folder = join(anuga_folder, 'gauges') event_folder = join(boundaries_folder, str(event)) hydrographs_folder = join(anuga_folder, 'hydrographs') meshes_folder = join(anuga_folder, 'meshes') output_folder = join(outFolder,event) if UseCheckRestore: restore_folder = join(output_folder,restoreFolderName) #if not os.path.exists(output_folder): # os.makedirs(output_folder) #------------------------------------------------------------------------------- # Location of input and output data #------------------------------------------------------------------------------- # OCEAN INPUT # The absolute pathname for the .sts file. event_sts = join(boundaries_folder, stsName) #------------------------------------------------------------------------------- # Output filename # # Your output filename should be unique between different runs on different data. # The list of items below will be used to create a file in your output directory. # Your user name and time+date will be automatically added. For example,20101017_090339_run_storm_surge_final_worse_case_0408_current20m_gate_0.0_sextoj # [setup, event, which_elevation, gate, SLR] # will result in a filename like # 20090212_091046_run_final_20100527_gcom_12min_current_gate_0_jsexton #------------------------------------------------------------------------------- output_comment = [setup, event] # Convert the user output_comment to a string for run_model.py output_comment = ('_'.join([str(x) for x in output_comment if x != user]) + '_' + user) # The absolute pathname of the all elevation, generated in build_elevation.py combined_elevation = join(topographies_folder, combined_elevation_basename) # The pathname for the GEMS order points if gems_order_filename: gems_order = join(boundaries_folder, gems_order_filename) # The absolute pathname for the landward points of the bounding polygon, # Used within run_model.py) if landward_boundary_filename: landward_boundary = join(boundaries_folder, landward_boundary_filename) # The absolute pathname for the output folder names # Used for build_elevation.py output_build = join(output_folder, build_time) + '_' + str(user) # Used for run_model.py output_run = join(output_folder, output_comment) # Used by post processing output_run_time = join(output_run, scenario_name) # The absolute pathname of the mesh, generated in run_model.py #meshes = join(output_run, scenario_name + "_" + setup) + '.msh' meshes = join(output_run, scenario_name) + '.msh' # Log file name #log.log_filename = join(output_run, scenario_name) + '.log' ## The absolute pathname for the storm gate file ## Used for run_model.py #if storm_gate_filename: # storm_gate = join(polygons_folder, storm_gate_filename) # The absolute pathname for the gauges file # Used for get_timeseries.py if gauges_filename: gauges = join(gauges_folder, gauges_filename) # The absolute pathname for the building file # Used for run_building_inundation.py if building_exposure_filename: building_exposure = join(gauges_folder, building_exposure_filename) ## Areas for export of results ## Used in export_results_max.py #xminBunbury = 371838 #xmaxBunbury = 379640 #yminBunbury = 6309741 #ymaxBunbury = 6316293 # ## Storm gate area: #xminStorm_gate=373515 #xmaxStorm_gate=373582 #yminStorm_gate=6312314 #ymaxStorm_gate=6312358 # ##------------------------------------------------------------------------------- ## Absolute Path Definitions. (This should not change) ##------------------------------------------------------------------------------- # ## determines time for setting up output directories #time = strftime('%Y%m%d_%H%M%S', localtime()) #gtime = strftime('%Y%m%d_%H%M%S', gmtime()) #build_time = time + '_build' #run_time = time + '_run_' # ##------------------------------------------------------------------------------- ## Output filename ## ## Your output filename should be unique between different runs on different data. ## The list of items below will be used to create a file in your output directory. ## Your user name and time+date will be automatically added. For example, ## [setup, tide, event_number] ## will result in a filename like ## 20090212_091046_run_final_0_27283_rwilson ##------------------------------------------------------------------------------- # #output_comment = [setup, tide, radius, event] #output_comment = ('_'.join([str(x) for x in output_comment if x != user]) # + '_' + user) # ## The absolute pathname for the output folder names ## Used for build_elevation.py #output_build = join(output_folder, build_time) + '_' + str(user) ## Used for run_model.py #output_run = join(output_folder, run_time) + output_comment ## Used by post processing #output_run_time = join(output_run, scenario_name) # # ## The absolute pathname of the mesh, generated in run_model.py ##meshes = join(output_run, scenario_name) + '.msh' #meshes = join(os.getcwd(), scenario_name) + '.msh' # ## The absolute pathname for the gauges file ## Used for get_timeseries.py #if gauges_filename: # gauges = join(gauges_folder, gauges_filename) # ## The absolute pathname for the building file ## Used for run_building_inundation.py #if building_exposure_filename: # building_exposure = join(gauges_folder, building_exposure_filename) # ## The absolute pathname for the image file ## Used for get_runup.py #if images_filename: # images = join(polygons_folder, images_filename) # # ## full path to where MUX files (or meta-files) live ##mux_input = join(event_folder, mux_input_filename) # ##Multiple polygons in one CSV file to make internal polygons #if not PriorityArea_filename == None: # PriorityAreas = join(polygons_folder, PriorityArea_filename) # ##friction_list = read_polygon_dir(ManningDictionary, join(polygons_folder,'mannings','historical')) # ##interior_regions = read_polygon_dir(CatchmentDictionary, join(polygons_folder,'bdy')) # ## The absolute pathname of the all elevation, generated in build_elevation.py #combined_elevation = join(topographies_folder, combined_elevation_basename) # ## The pathname for the urs order points, used within build_urs_boundary.py ##if urs_order_filename: ## urs_order = join(boundaries_folder, urs_order_filename) # ## The absolute pathname for the landward points of the bounding polygon, ## Used within run_model.py) ##if landward_boundary_filename: ## landward_boundary = join(boundaries_folder, landward_boundary_filename) # ## The absolute pathname for the .sts file, generated in build_boundary.py ##event_sts = join(event_folder, scenario_name) # ##elevation_name = join(topographies_folder, elevation_filename) # directory location and DEM name. This has been triangulated using 2d_zpts_tw_803.mid as the base. #meshname = join(output_run, scenario_name) + '.msh' # ##ocean_hydrograph_filename=join(ocean_folder, ocean_hydrograph_basename)