# -*- coding: cp1252 -*- """Common filenames and locations for topographic data, meshes and outputs. """ from os import sep, environ, getenv, getcwd from os.path import expanduser import sys from time import localtime, strftime, gmtime from anuga.utilities.polygon import read_polygon, plot_polygons, is_inside_polygon, number_mesh_triangles from anuga.utilities.system_tools import get_user_name, get_host_name from anuga.shallow_water.data_manager import urs2sts,create_sts_boundary from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon # file and system info #--------------------------------- #codename = 'project.py' home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent diruser = get_user_name() muxhome = getenv('MUXHOME') user = get_user_name() host = get_host_name() # INUNDATIONHOME is the inundation directory, not the data directory. #time stuff time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir build_time = time+'_build' run_time = time+'_run' print 'gtime: ', gtime #Making assumptions about the location of scenario data state = 'anuga_validation' scenario = 'benchmark_problem_4' sww_name = 'slide' friction=0.01 #basal friction starttime=0 finaltime=500 #duration of evolution remainder_res = 1. #area of mesh triangle in m*2 export_cellsize=25 #length along side of mesh triangle dir_comment='_'+'finaltime'+str(finaltime)+'_'+str(user) anuga_dir = home+state+sep+scenario+sep+'anuga'+sep meshes_dir = anuga_dir+'meshes'+sep meshes_dir_name = meshes_dir + sww_name polygons_dir = anuga_dir+'polygons'+sep #output locations output_dir = anuga_dir+'outputs'+sep output_run_time_dir = anuga_dir+'outputs'+sep+run_time+dir_comment+sep output_run_time_dir_name = output_run_time_dir + sww_name #Used by post processing #gauges gauge_name = 'gauge_location.csv' gauges_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep gauges_dir_name = gauges_dir + gauge_name ############################### # Interior region definitions ############################### #Initial bounding polygon for data clipping #poly_all = read_polygon(polygons_dir+'poly_all.csv') #res_poly_all = 100000 ################################################################### # Clipping regions for export to asc and regions for clipping data ################################################################### #Geordie Bay extract ascii grid xminGeordie = 358000 xmaxGeordie = 362000 yminGeordie = 6458500 ymaxGeordie = 6461000 #Sorrento extract ascii grid xminSorrento = 379000 xmaxSorrento = 382500 yminSorrento = 6477000 ymaxSorrento = 6480000 #Fremantle extract ascii grid xminFremantle = 376000 xmaxFremantle = 388000 yminFremantle = 6449000 ymaxFremantle = 6461000 #Rockingham extract ascii grid xminRockingham = 373500 xmaxRockingham = 385500 yminRockingham = 6424000 ymaxRockingham = 6433000