Ignore:
Timestamp:
Jun 23, 2008, 1:01:17 PM (16 years ago)
Author:
Leharne
Message:

Updates to okushiri convergence study

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/convergence_okushiri_2008/project_truescale.py

    r5396 r5411  
    1 """Common filenames for truescale Okushiri Island validation
     1"""Common filenames for truescale Okushiri Island convergence study
    22Formats are given as ANUGA native netCDF where applicable.
    33
     
    1111from anuga.utilities.system_tools import get_user_name, get_host_name
    1212
    13 codename = 'project_grad.py' # FIXME can be obtained automatically as __file__
    14 
    15 home = join(getenv('INUNDATIONHOME'), 'data', 'anuga_validation',
    16             'convergence_okushiri_2008')# Location of Data   
     13home = join(getenv('INUNDATIONHOME'),'data', 'anuga_validation',
     14            'convergence_okushiri_2008') # Location of Data
    1715user = get_user_name()
    1816host = get_host_name()
     
    2018umask(002)
    2119
    22 #time stuff
    23 time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
    24 run_time = time+'_run'
    25 
    26 #Set anuga directories
    27 anuga_dir = join(home, 'anuga')
    28 
    29 dir_comment='_'+setup+'_'+str(tide)+'_'+\
    30              str(user)+'_'+boundary_event+'_'+which_data
    31 
    32 mesh_dir = join(anuga_dir, 'meshes')
    33 mesh_name = join(mesh_dir, 'okushiri_truescale')
    34 
    35 polygons_dir = join(anuga_dir, 'polygons') # Created with ArcGIS (csv files)
    36 tide_dir = join(anuga_dir, 'tide_data')
    37 
    38 #output locations
    39 output_dir = join(anuga_dir, 'outputs')+sep
    40 output_run_time_dir = output_dir +run_time+dir_comment+sep
    41 output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
    42 
    43 #gauges
    44 gauges_dir = join(anuga_dir,'gauges')
    45 gauge_name = 'gauge_location_onslow.csv'
    46 gauges_dir_name = gauges_dir + gauge_name
     20#-------------------
     21# Input file names
     22#-------------------
    4723
    4824# Given boundary wave
     
    5531bathymetry_filename = 'okushiri_truescale_bathymetry.pts'
    5632
    57 # Triangular mesh
    58 mesh_filename = 'okushiri_truescale.msh'
     33
     34#------------------------------------
     35# Output file names and directories
     36#------------------------------------
    5937
    6038# Model output
    6139output_filename = 'okushiri_truescale.sww'
    6240
     41# Time stuff
     42time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
     43run_time = time+'_run'
     44
     45# Run parameters
     46finaltime=450
     47setup='original'
     48
     49if setup =='original':
     50    print 'original resolution'
     51    base_resolution=1
     52    yieldstep=1
     53if setup =='double':
     54    print 'double original resolution'
     55    base_resolution=0.5
     56    yieldstep=1
     57if setup =='half':
     58    print 'half original resolution'
     59    base_resolution=2
     60    yieldstep=1
     61if setup =='no polygons':
     62    print 'half original resolution'
     63    base_resolution=2
     64    yieldstep=1
     65 
     66   
     67# Set anuga directories
     68anuga_dir = join(home,'anuga')+sep
     69
     70dir_comment='_'+setup+'_'+str(user)
     71
     72mesh_dir = join(anuga_dir, 'meshes')+sep
     73mesh_name = join(mesh_dir, 'okushiri_truescale')
     74
     75polygons_dir = join(anuga_dir, 'polygons')+sep # Created with ArcGIS (csv files)
     76
     77# Output locations
     78output_dir = join(anuga_dir, 'outputs')+sep
     79output_run_time_dir = output_dir+run_time+dir_comment+sep
     80output_run_time_dir_name = output_run_time_dir + output_filename #Used by post processing
     81
     82# Gauges
     83gauges_dir = join(anuga_dir,'gauges')+sep
     84gauge_name = 'gauge_location_okushiri.csv'
     85gauges_dir_name = gauges_dir+gauge_name
     86
     87# Vertex coordinates
     88vertex_filename = output_run_time_dir+setup+'vertex_coordinates.txt'
     89
     90#------------------------------
     91# Polygon definitions
     92#------------------------------
     93
     94poly_all = read_polygon(polygons_dir+'bounding_polygon.csv')
     95res_poly_all = 16000*base_resolution
     96
     97#print 'Area of bounding polygon', polygon_area(poly_all)/1000000.0
     98
     99poly_gulleys = read_polygon(polygons_dir+'gulleys_polygon.csv')
     100res_gulleys = 3.2*base_resolution
     101
     102poly_island = read_polygon(polygons_dir+'island_polygon.csv')
     103res_island = 32*base_resolution
     104
     105poly_rhs = read_polygon(polygons_dir+'rhs_polygon.csv')
     106res_rhs = 80*base_resolution
     107
     108interior_regions = [[poly_gulleys,res_gulleys],[poly_island,res_island],
     109                    [poly_rhs,res_rhs]]
     110                   
     111trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
     112
     113print 'min number triangles', trigs_min
    63114
    64115
     116
     117
     118
     119
Note: See TracChangeset for help on using the changeset viewer.