Changeset 5720
- Timestamp:
- Sep 1, 2008, 2:25:29 PM (16 years ago)
- Location:
- anuga_work/development/convergence_okushiri_2008
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/convergence_okushiri_2008/README.txt
r5366 r5720 6 6 the Third International Conference on Long Wave Runup: 7 7 http://www.cee.cornell.edu/longwave/index.cfm?page=benchmark&problem=2. 8 Once this up-scaling has been completed and verified, then the files will be used for conducting 9 a convergence study in ANUGA. This component is still in development. 8 9 The "up-scaled" files are then used for conducting a convergence study 10 in ANUGA. 10 11 11 12 Data files available in this directory are … … 40 41 together with the experimental data provided. Numerical similarity 41 42 measures will also be computed. 42 43 44 get_timeseries.py 45 This script extracts timeseries from the sww file and writes them to individual 46 csv files for each gauge location. 47 48 export_results.py 49 This script extracts a number of variables from the sww file (for eg stage, 50 depth, momentum) in three regions at three different but fixed regular grid 51 resolutions (at either discrete time indices or maximised over the whole 52 simulation). 43 53 44 54 Methodology for true-scale transformation: -
anuga_work/development/convergence_okushiri_2008/export_results.py
r5604 r5720 1 1 import project_truescale, os 2 2 import sys 3 import time 3 4 from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf, dem2pts 4 5 from anuga.shallow_water.data_manager import sww2dem 6 from anuga.geospatial_data.geospatial_data import * 5 7 from os import sep 6 8 … … 15 17 res_dir9 = '20080715_015727_run_1-32_contour_polygons_lfountai' 16 18 res_dir10 = '20080721_015521_run_1-64_contour_polygons_lfountai' 17 res_dirs = [#res_dir1, res_dir2, res_dir3, res_dir4, res_dir5, res_dir6, res_dir7, res_dir8, 18 res_dir9, res_dir10] 19 res_dirs = [res_dir1, #res_dir2, res_dir3, res_dir4, res_dir5, res_dir6, res_dir7, res_dir8,res_dir9, 20 res_dir10] 21 #timesteps = [200, 250, 300, 350, 400, 450] 22 timesteps = [327] #this is time of maximum inundation 23 19 24 20 25 for res_dir in res_dirs: 21 26 22 #timestep = 0 23 directory = project_truescale.output_dir+res_dir+sep 24 name = directory+'okushiri_truescale' 27 for timestep in timesteps: 28 29 directory = project_truescale.output_dir+res_dir+sep 30 name = directory+'okushiri_truescale' 25 31 26 is_parallel = False27 #is_parallel = True32 is_parallel = False 33 #is_parallel = True 28 34 29 if is_parallel == True: nodes = 1030 print 'output directory:', directory35 if is_parallel == True: nodes = 10 36 print 'output directory:', directory 31 37 32 area = ['Deep', 'Mid', 'Shallow'] 38 area = ['Deep', 'Mid', 'Shallow'] 39 40 for which_area in area: 41 if which_area == 'Deep': 42 cellsize = 50 43 easting_min = project_truescale.xminDeep 44 easting_max = project_truescale.xmaxDeep 45 northing_min = project_truescale.yminDeep 46 northing_max = project_truescale.ymaxDeep 33 47 34 for which_area in area: 35 if which_area == 'Deep': 36 cellsize = 50 37 easting_min = project_truescale.xminDeep 38 easting_max = project_truescale.xmaxDeep 39 northing_min = project_truescale.yminDeep 40 northing_max = project_truescale.ymaxDeep 48 if which_area == 'Mid': 49 cellsize = 25 50 easting_min = project_truescale.xminMid 51 easting_max = project_truescale.xmaxMid 52 northing_min = project_truescale.yminMid 53 northing_max = project_truescale.ymaxMid 41 54 42 if which_area == 'Mid':43 cellsize = 2544 easting_min = project_truescale.xminMid45 easting_max = project_truescale.xmaxMid46 northing_min = project_truescale.yminMid47 northing_max = project_truescale.ymaxMid55 if which_area == 'Shallow': 56 cellsize = 10 57 easting_min = project_truescale.xminShallow 58 easting_max = project_truescale.xmaxShallow 59 northing_min = project_truescale.yminShallow 60 northing_max = project_truescale.ymaxShallow 48 61 49 if which_area == 'Shallow': 50 cellsize = 10 51 easting_min = project_truescale.xminShallow 52 easting_max = project_truescale.xmaxShallow 53 northing_min = project_truescale.yminShallow 54 northing_max = project_truescale.ymaxShallow 62 ## which_area='all' 63 ## easting_min=0 64 ## easting_max=2179.2 65 ## northing_min=0 66 ## northing_max=1360.8 67 ## cellsize=10 68 69 70 var = [2] 71 72 for which_var in var: 73 if which_var == 0: # Stage 74 outname = directory + which_area + '_stage_' + str(timestep) 75 quantityname = 'stage' 76 77 if which_var == 1: # Absolute Momentum 78 outname = directory + which_area + '_momentum_' + str(timestep) 79 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 80 81 if which_var == 2: # Depth 82 outname = directory + which_area + '_depth_' + str(timestep) 83 quantityname = 'stage-elevation' 84 85 if which_var == 3: # Speed 86 outname = directory + which_area + '_speed_' + str(timestep) 87 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed 88 89 if which_var == 4: # Elevation 90 outname = directory + which_area + '_elevation_' + str(timestep) 91 quantityname = 'elevation' 92 93 ## if is_parallel == True: 94 ## # print 'is_parallel',is_parallel 95 ## for i in range(0,nodes): 96 ## namei = name + '_P%d_%d' %(i,nodes) 97 ## outnamei = outname + '_P%d_%d' %(i,nodes) 98 ## print 'start sww2dem for sww file %d' %(i) 99 ## sww2dem(namei, basename_out = outnamei, 100 ## quantity = quantityname, 101 ## timestep = timestep, 102 ## cellsize = cellsize, 103 ## easting_min = project_grad.e_min_area, 104 ## easting_max = project_grad.e_max_area, 105 ## northing_min = project_grad.n_min_area, 106 ## northing_max = project_grad.n_max_area, 107 ## reduction = max, 108 ## verbose = True, 109 ## format = 'asc') 110 ## else: 111 112 113 print 'start sww2dem', which_area 114 sww2dem(name, basename_out = outname, 115 quantity = quantityname, 116 timestep = timestep, 117 cellsize = cellsize, 118 easting_min = easting_min, 119 easting_max = easting_max, 120 northing_min = northing_min, 121 northing_max = northing_max, 122 reduction = max, 123 verbose = True, 124 format = 'ers') 55 125 56 126 57 # var = [2,3,4] # depth and speed 58 #var = [2] # depth 59 var = [0,4] 60 61 for which_var in var: 62 if which_var == 0: # Stage 63 outname = directory + which_area + '_stage' 64 quantityname = 'stage' 65 66 if which_var == 1: # Absolute Momentum 67 outname = directory + which_area + '_momentum' 68 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 69 70 if which_var == 2: # Depth 71 outname = directory + which_area + '_depth' 72 quantityname = 'stage-elevation' 73 74 if which_var == 3: # Speed 75 outname = directory + which_area + '_speed' 76 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed 77 78 if which_var == 4: # Elevation 79 outname = directory + which_area + '_elevation' 80 quantityname = 'elevation' 81 82 ## if is_parallel == True: 83 ## # print 'is_parallel',is_parallel 84 ## for i in range(0,nodes): 85 ## namei = name + '_P%d_%d' %(i,nodes) 86 ## outnamei = outname + '_P%d_%d' %(i,nodes) 87 ## print 'start sww2dem for sww file %d' %(i) 88 ## sww2dem(namei, basename_out = outnamei, 89 ## quantity = quantityname, 90 ## timestep = timestep, 91 ## cellsize = cellsize, 92 ## easting_min = project_grad.e_min_area, 93 ## easting_max = project_grad.e_max_area, 94 ## northing_min = project_grad.n_min_area, 95 ## northing_max = project_grad.n_max_area, 96 ## reduction = max, 97 ## verbose = True, 98 ## format = 'asc') 99 ## else: 100 print 'start sww2dem', which_area 101 sww2dem(name, basename_out = outname, 102 quantity = quantityname, 103 #timestep = timestep, 104 cellsize = cellsize, 105 easting_min = easting_min, 106 easting_max = easting_max, 107 northing_min = northing_min, 108 northing_max = northing_max, 109 reduction = max, 110 verbose = True, 111 format = 'ers') 112 127 ##convert_dem_from_ascii2netcdf(outname, use_cache=True, verbose=True) 128 ##dem2pts(outname, use_cache=True, verbose=True) 129 ##G = Geospatial_data(file_name = outname + '.pts') 130 ##G.export_points_file('test' + '.txt') -
anuga_work/development/convergence_okushiri_2008/get_timeseries.py
r5411 r5720 16 16 17 17 #timestamp='20080617_001810_run_leharne' 18 timestamp='20080617_041810_run_original_no_int_polygons_lfountai' 18 #timestamp='20080617_041810_run_original_no_int_polygons_lfountai' 19 #timestamp='20080617_040837_run_half_lfountai' 20 #timestamp='20080617_041356_run_double_lfountai' 21 #timestamp='20080708_064714_run_original_contour_polygons_lfountai' 22 #timestamp='20080708_064815_run_half_contour_polygons_lfountai' 23 #timestamp='20080708_064841_run_double_contour_polygons_lfountai' 24 #timestamp='20080714_231759_run_quarter_contour_polygons_lfountai' 25 #timestamp='20080714_234934_run_eighth_contour_polygons_lfountai' 26 #timestamp='20080714_235634_run_sixteenth_contour_polygons_lfountai' 27 #timestamp='20080715_015727_run_1-32_contour_polygons_lfountai' 28 #timestamp='20080715_023223_run_quadruple_contour_polygons_lfountai' 29 #timestamp='20080721_015521_run_1-64_contour_polygons_lfountai' 30 #timestamp='20080725_051221_run_octuple_contour_polygons_lfountai' 31 timestamp='20080725_022934_run_1.5_contour_polygons_lfountai' 32 33 19 34 filename=project_truescale.output_dir+timestamp+sep+project_truescale.output_filename 20 35 -
anuga_work/development/convergence_okushiri_2008/project_truescale.py
r5604 r5720 1 """Common filenames for truescale Okushiri Island convergence study2 Formats are given as ANUGA native netCDF where applicable.1 """Common filenames and run parameters for truescale Okushiri Island 2 convergence study. Formats are given as ANUGA native netCDF where applicable. 3 3 4 4 """ … … 200 200 201 201 xminDeep = 0 202 xmaxDeep = 1000202 xmaxDeep = 950 203 203 yminDeep = 0 204 ymaxDeep = 1 360.8204 ymaxDeep = 1400 205 205 206 206 xminMid = 1000 207 207 xmaxMid = 1700 208 208 yminMid = 0 209 ymaxMid = 1 360.8210 211 xminShallow = 17 00212 xmaxShallow = 217 9.2209 ymaxMid = 1400 210 211 xminShallow = 1725 212 xmaxShallow = 2175 213 213 yminShallow = 0 214 ymaxShallow = 1 360.8215 216 217 218 219 214 ymaxShallow = 1400 215 216 217 218 219 -
anuga_work/development/convergence_okushiri_2008/run_okushiri_truescale.py
r5442 r5720 13 13 14 14 This version up-scales the original 1:400 scale wave-tank experiment, to 15 "true-scale" with mesh defined using interior polygons. 15 "true-scale" with mesh defined using interior polygons. The resolution is then 16 varied by a factor of 2 to investigate convergence behaviour (refer to script 17 project_truescale.py for details). 16 18 17 19 The original validation data is available at … … 61 63 boundary_tags={'wall': [0, 1, 3],'wave': [2]}, 62 64 maximum_triangle_area=project_truescale.res_poly_all, 63 #interior_regions=project_truescale.interior_regions,65 interior_regions=project_truescale.interior_regions, # comment out when not using interior polygon definitions 64 66 filename=project_truescale.mesh_name+'.msh', 65 67 verbose=True) … … 74 76 75 77 # Write vertex coordinates to file 76 filename=project .vertex_filename78 filename=project_truescale.vertex_filename 77 79 fid=open(filename,'w') 78 80 fid.write('x (m), y (m)\n')
Note: See TracChangeset
for help on using the changeset viewer.