Changeset 4926


Ignore:
Timestamp:
Jan 10, 2008, 4:48:13 PM (16 years ago)
Author:
nick
Message:

updates to cocos grid development code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/cocos/grid_data.py

    r4846 r4926  
    1919copy_code_files(output_dir,__file__)
    2020
    21 start_screen_catcher(output_dir)
     21start_screen_catcher(output_dir,verbose=True)
     22print'testing'
    2223
    2324data_dir='/d/ehn/4/ehn/tsunami/data/bathymetry/Cocos/bathymetry/'
     
    7879#        4.3m2
    7980
    80 res = 10
     81res = 100
    8182#G = Geospatial_data(file_name = data_dir_name + '.txt')
    8283#G1=G.clip(poly1)
     
    8485
    8586
    86 interior_polys = [[poly2,(grid2_res**2/2)*res],[poly3,(grid3_res**2/2)*res],[poly4,(grid4_res**2/2)*res]]
     87#interior_polys = [[poly2,(grid2_res**2/2)*res],[poly3,(grid3_res**2/2)*res],[poly4,(grid4_res**2/2)*res]]
     88interior_polys = [[poly2,(grid2_res**2)*2],[poly3,(grid3_res**2)*res],[poly4,(grid4_res**2)*res]]
    8789#interior_polys = [[poly4,4.3*res]]
    8890
     
    9496#                         use_cache=True,
    9597#                         verbose=True)
     98max_tri = (grid1_res**2/2)*res
     99print 'max_tri',max_tri
    96100create_mesh_from_regions(poly1,
    97101#create_mesh_from_regions(poly3,
    98102                         boundary_tags={'side': [0,1,2,3]},
    99                          maximum_triangle_area=(grid1_res**2/2)*res,
     103                         maximum_triangle_area=(grid1_res**2)*res,
     104#                         maximum_triangle_area=(grid1_res**2)*1,
    100105#                         maximum_triangle_area=110*res,
    101106                         interior_regions=interior_polys,
     
    105110                         
    106111                         
    107 value, alpha = find_optimal_smoothing_parameter(data_file=data_dir_name_clip + '.txt',
    108                                              alpha_list=[0.0001,0.001,0.01,0.1,1.0],
    109 #                                             alpha_list=[0.01],
    110                                              boundary_poly=poly3,
    111                                              mesh_file=mesh_file,
    112                                              plot_name=None,
    113                                              cache=True,
    114                                              verbose=True)
     112#value, alpha = find_optimal_smoothing_parameter(data_file=data_dir_name_clip + '.txt',
     113##                                             alpha_list=[0.0001,0.001,0.01,0.1,1.0],
     114#                                             alpha_list=[0.1],
     115#                                             boundary_poly=poly3,
     116#                                             mesh_file=mesh_file,
     117#                                             plot_name=None,
     118#                                             split_factor=0.1,
     119#                                             cache=True,
     120#                                             verbose=True)
    115121                                             
    116 print 'Setup computational domain', value, alpha
     122#print 'Setup computational domain', value, alpha
    117123
    118124    #domain = cache(Domain, (meshes_dir_name), {'use_cache':True, 'verbose':True}, verbose=True)
     
    126132                            use_cache = True,
    127133                            verbose = True,
    128                             alpha = alpha)
     134#                            alpha = alpha)
     135                            alpha = 0.01)
    129136print 'Finished Set quantity'
    130137
    131138domain.set_name(sww_file)
    132139domain.set_datadir(output_dir)
    133 domain.set_default_order(2) # Apply second order scheme
     140domain.set_default_order(1) # Apply second order scheme
    134141domain.set_minimum_storable_height(0.01) # Don't store anything less than 1cm
    135142domain.set_store_vertices_uniquely(False)
     
    150157                    timestep = None,
    151158                    reduction = max,
     159#                    cellsize = grid4_res*sqrt(1),
    152160                    cellsize = grid4_res*sqrt(res),
    153161                    NODATA_value = -9999,
     
    165173                    timestep = None,
    166174                    reduction = max,
     175#                    cellsize = grid3_res*sqrt(1),
    167176                    cellsize = grid3_res*sqrt(res),
    168177                    NODATA_value = -9999,
     
    180189                    timestep = None,
    181190                    reduction = max,
    182                     cellsize = grid2_res*sqrt(res),
     191                    cellsize = grid2_res*sqrt(1),
     192#                    cellsize = grid2_res*sqrt(res),
    183193                    NODATA_value = -9999,
    184194                    easting_min = 224424.96,
     
    195205                    timestep = None,
    196206                    reduction = max,
     207#                    cellsize = grid1_res*sqrt(1),
    197208                    cellsize = grid1_res*sqrt(res),
    198209                    NODATA_value = -9999,
Note: See TracChangeset for help on using the changeset viewer.