Changeset 2407 for production/sydney_2006/project.py
- Timestamp:
- Feb 14, 2006, 5:19:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
production/sydney_2006/project.py
r2403 r2407 3 3 """ 4 4 5 from os import sep 5 from os import sep, environ 6 6 from os.path import expanduser 7 from utilities.polygon import read_polygon 7 8 import sys 9 10 from pmesh.create_mesh import convert_points_from_latlon_to_utm 11 12 13 8 14 9 15 #Making assumptions about the location of scenario data … … 14 20 finename = 'bathy_dem25' # get from Neil/Ingo (DEM or topo data) Wed 25 Jan 15 21 22 23 16 24 # creating easting and northing max and min for fine data - region of interest 17 25 eastingmin = 332090 … … 29 37 30 38 if sys.platform == 'win32': 31 home = '..\..\..\..\..'#Sandpit's parent dir39 home = environ['INUNDATIONHOME'] #Sandpit's parent dir 32 40 else: 33 41 home = expanduser('~') 42 34 43 35 44 … … 38 47 datadir = home+sep+scenario_dir_name+sep+'topographies'+sep 39 48 outputdir = home+sep+scenario_dir_name+sep+'output'+sep 49 polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep 40 50 41 51 meshname = meshdir + basename … … 44 54 combineddemname = datadir + 'sydneytopo' 45 55 outputname = outputdir + basename #Used by post processing 56 57 #csv file of coastline 50m epsilon belt 58 manly_polygonname = polygondir + 'manly_polygon_UTM56_coarse' 59 manly_polygon = read_polygon(manly_polygonname + '.csv') 60 #print manly_polygon 61 46 62 gauge_filename = outputdir + 'sydney_gauges.xya' 47 63 gauge_outname = outputdir + 'gauges_max_output.xya' … … 51 67 52 68 # define clipping polygon 69 south = degminsec2decimal_degrees(-34,05,0) 70 north = degminsec2decimal_degrees(-33,33,0) 71 west = degminsec2decimal_degrees(151,1,0) 72 east = degminsec2decimal_degrees(151,30,0) 73 p0 = [south, west] 74 p1 = [south, east] 75 p2 = [north, east] 76 p3 = [north, west] 77 78 polygonall, zone = convert_points_from_latlon_to_utm([p0, p1, p2, p3]) 79 refzone = zone 80 81 print 'Got refzone', refzone 82 53 83 dsouth = degminsec2decimal_degrees(-34,05,0) 54 84 dnorth = degminsec2decimal_degrees(-33,33,0) … … 72 102 dp8 = [dnorth, dwest] 73 103 74 diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7] 75 104 diffpolygonall, zone = convert_points_from_latlon_to_utm([dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7]) 105 # to put chunk back in 106 #diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp8] 107 108 109 110 #Interior regions - the Harbour - take 2 76 111 #Interior regions - the Harbour 77 112 harbour_1x = degminsec2decimal_degrees(-33,51,0) … … 122 157 k142 = [harbour_15x, harbour_15y] 123 158 124 harbour_polygon_2 = [k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52] #worked 159 harbour_polygon_2, zone = convert_points_from_latlon_to_utm([k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52]) #worked 160 assert zone == refzone 161 125 162 126 163 #Interior region - Botany Bay 164 165 #Interior region - Botany Bay - take 2 127 166 bb_1x = degminsec2decimal_degrees(-34,3,0) 128 167 bb_1y = degminsec2decimal_degrees(151,2,30) … … 157 196 j92 = [bb_10x, bb_10y] 158 197 159 botanybay_polygon_2 = [j92, j12, j22, j62, j82, j72, j42] # worked 160 161 # around 42km across from harbour(385000,6255000) 198 botanybay_polygon_2, zone = convert_points_from_latlon_to_utm([j92, j12, j22, j62, j82, j72, j42]) # worked 199 200 201 # close to botany bay opening (340000,6236000) 202 # x0 = 25964 203 # y0 = 11049 204 # around 10km from botany bay opening (350000,6236000) 205 # x0 = 35964 206 # y0 = 11049 207 # around 21km from botany bay opening (361000,6236000) 208 #x0 = 46964 209 #y0 = 11049 210 211 # not used for sydney scenario, original interior regions listed though 212 # setting up problem area for doing just around the harbour 213 hsouth = degminsec2decimal_degrees(-33,54,0) 214 hnorth = degminsec2decimal_degrees(-33,48,0) 215 hwest = degminsec2decimal_degrees(151,0,0) 216 heast = degminsec2decimal_degrees(151,30,0) 217 218 hp0 = [hsouth, hwest] 219 hp1 = [hsouth, heast] 220 hp2 = [hnorth, heast] 221 hp3 = [hnorth, hwest] 222 polygon_h, zone = convert_points_from_latlon_to_utm([hp0, hp1, hp2, hp3]) 223 224 #Interior regions - the Harbour - take 1 225 harbour_south = degminsec2decimal_degrees(-33,53,0) 226 harbour_north = degminsec2decimal_degrees(-33,47,0) 227 harbour_west = degminsec2decimal_degrees(151,5,0) 228 harbour_east = degminsec2decimal_degrees(151,19,0) 229 230 #harbour_south1 = degminsec2decimal_degrees(-33,53,0) 231 #harbour_south2 = degminsec2decimal_degrees(-33,52,0) 232 #harbour_north1 = degminsec2decimal_degrees(-33,45,0) 233 #harbour_north2 = degminsec2decimal_degrees(-33,48,0) 234 #harbour_west = degminsec2decimal_degrees(151,5,0) 235 #harbour_east = degminsec2decimal_degrees(151,19,0) 236 237 k0 = [harbour_south, harbour_west] 238 k1 = [harbour_south, harbour_east] 239 k2 = [harbour_north, harbour_east] 240 k3 = [harbour_north, harbour_west] 241 242 harbour_polygon, zone = convert_points_from_latlon_to_utm([k0, k1, k2, k3]) 243 244 # setting up problem area for doing just around Botany Bay 245 bsouth = degminsec2decimal_degrees(-33,56,0) 246 bnorth = degminsec2decimal_degrees(-34,3,0) 247 bwest = degminsec2decimal_degrees(151,0,0) 248 beast = degminsec2decimal_degrees(151,30,0) 249 250 bp0 = [bsouth, bwest] 251 bp1 = [bsouth, beast] 252 bp2 = [bnorth, beast] 253 bp3 = [bnorth, bwest] 254 polygon_bb, zone = convert_points_from_latlon_to_utm([bp0, bp1, bp2, bp3]) 255 256 #Interior region - Botany Bay - take 1 257 botanybay_south = degminsec2decimal_degrees(-33,58,0) 258 botanybay_north = degminsec2decimal_degrees(-34,1,0) 259 botanybay_west = degminsec2decimal_degrees(151,5,0) 260 botanybay_east = degminsec2decimal_degrees(151,18,0) 261 262 j0 = [botanybay_south, botanybay_west] 263 j1 = [botanybay_south, botanybay_east] 264 j2 = [botanybay_north, botanybay_east] 265 j3 = [botanybay_north, botanybay_west] 266 267 botanybay_polygon, zone = convert_points_from_latlon_to_utm([j0, j1, j2, j3]) 268 assert zone == refzone 269 162 270 #x0 = 28964 + 42000 163 271 #y0 = 30049
Note: See TracChangeset
for help on using the changeset viewer.