Changeset 3626


Ignore:
Timestamp:
Sep 19, 2006, 6:13:05 PM (18 years ago)
Author:
sexton
Message:

updates for Hobart (data received today)

Location:
anuga_work/production/hobart_2006
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/hobart_2006/export_results.py

    r3615 r3626  
    77from os import sep
    88
    9 time_dir = '20060706_235246' #MSL
     9time_dir = '20060919_050831' #MSL
    1010directory = project.outputdir
    1111name = directory + time_dir + sep + 'source'
     
    1313#print 'Which variable do you want to export?'
    1414#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
    15 which_var = 2
     15which_var = 4 # for Hamish/Alex to compare
     16#which_var = 2 # for Ingo/Neil to make maps
    1617
    1718if which_var == 0:  # Stage
  • anuga_work/production/hobart_2006/project.py

    r3615 r3626  
    1313
    1414# data provided by Tas SES and checked by NM&I
    15 onshore_name = 'hobart_onshore'
    16 offshore_name = 'hobart_offshore_points'
     15onshore_name = 'hob3_topo'
     16offshore_name_tas1 = 'derwent_2m'
     17offshore_name_tas2 = 'derwent_5m'
     18offshore_name_tas3 = 'south_east_tas'
     19offshore_name_tas4 = 'hobart_1m'
     20
     21# AHO data and checked by NM&I
     22offshore_name1 = 'xy100003760'
     23offshore_name2 = 'xy100003761'
     24offshore_name3 = 'xy100003762'
     25offshore_name4 = 'xy100003907'
     26offshore_name5 = 'xy100003908'
     27offshore_name6 = 'xy100003909'
     28offshore_name7 = 'xy100003910'
     29offshore_name8 = 'xy100003932'
     30offshore_name9 = 'xy100003933'
     31offshore_name10 = 'xy100003934'
     32offshore_name11 = 'xy100003935'
     33offshore_name12 = 'xy100003936'
     34offshore_name13 = 'xy100003964'
     35offshore_name14 = 'xy100014250'
     36offshore_name15 = 'xy100014253'
     37offshore_name16 = 'xy100016142'
    1738
    1839# developed by NM&I
    19 coast_name = 'hobart_coast'
     40coast_name = 'coastline_points'
    2041
    2142boundary_basename = 'SU-AU_clip'
     
    6283
    6384meshname = outputtimedir + 'mesh_' + basename
    64 coarsedemname = datadir + coarsename
    6585
    6686onshore_dem_name = datadir + onshore_name
    67 offshore_dem_name_local = datadir + offshore_name_local
    68 offshore_dem_name_aho = datadir + offshore_name_fairsheets
     87offshore_dem_name_local1 = datadir + offshore_name_tas1
     88offshore_dem_name_local2 = datadir + offshore_name_tas2
     89offshore_dem_name_local3 = datadir + offshore_name_tas3
     90offshore_dem_name_local4 = datadir + offshore_name_tas4
     91offshore_dem_name_aho1 = datadir + offshore_name1
     92offshore_dem_name_aho2 = datadir + offshore_name2
     93offshore_dem_name_aho3 = datadir + offshore_name3
     94offshore_dem_name_aho4 = datadir + offshore_name4
     95offshore_dem_name_aho5 = datadir + offshore_name5
     96offshore_dem_name_aho6 = datadir + offshore_name6
     97offshore_dem_name_aho7 = datadir + offshore_name7
     98offshore_dem_name_aho8 = datadir + offshore_name8
     99offshore_dem_name_aho9 = datadir + offshore_name9
     100offshore_dem_name_aho10 = datadir + offshore_name10
     101offshore_dem_name_aho11 = datadir + offshore_name11
     102offshore_dem_name_aho12 = datadir + offshore_name12
     103offshore_dem_name_aho13 = datadir + offshore_name13
     104offshore_dem_name_aho14 = datadir + offshore_name14
     105offshore_dem_name_aho15 = datadir + offshore_name15
     106offshore_dem_name_aho16 = datadir + offshore_name16
    69107coast_dem_name = datadir + coast_name
    70108combined_dem_name = datadir + 'hobart_combined_elevation'
     
    74112# region to export
    75113e_min_area = 500000
    76 e_max_area = 540000
    77 n_min_area = 5220000
     114e_max_area = 580000
     115n_min_area = 5200000
    78116n_max_area = 5275000
    79117
    80 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees,
    81                         convert_points_from_latlon_to_utm
     118from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
    82119                       
    83120# bounding box
     
    96133refzone = zone
    97134
    98 #Interior region - Hobart city area + glenorchy, Kingston
     135#Interior region - Hobart city area + Glenorchy, Kingston
    99136i0 = [517000, 5267000]
    100137i1 = [517000, 5255000]
     
    105142i6 = [530000, 5244000]
    106143i7 = [530000, 5250000]
    107 i7 = [534000, 5254000]
    108 i7 = [520000, 5270000]
     144i8 = [534000, 5254000]
     145i9 = [520000, 5270000]
    109146
    110 poly_hobart = [i0, i1, i2, i3, i4, i5]
     147poly_hobart = [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
    111148
    112149# Tasman Peninsula
  • anuga_work/production/hobart_2006/run_hobart.py

    r3615 r3626  
    2121
    2222# Related major packages
    23 from anuga.pyvolution.shallow_water import Domain, Reflective_boundary, \
     23from anuga.shallow_water import Domain, Reflective_boundary, \
    2424                            Dirichlet_boundary, Time_boundary, File_boundary
    25 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts
    26 from anuga.pyvolution.combine_pts import combine_rectangular_points_files
    27 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance
     25from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf, dem2pts
    2826from anuga.geospatial_data.geospatial_data import *
    29 from anuga.pyvolution.util import Screen_Catcher
     27from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
    3028
    3129# Application specific imports
     
    4139    mkdir (project.outputtimedir)
    4240copy (project.codedirname, project.outputtimedir + project.codename)
    43 copy (project.codedir + 'run_onslow.py', project.outputtimedir + 'run_onslow.py')
     41copy (project.codedir + 'run_hobart.py', project.outputtimedir + 'run_hobart.py')
    4442print'output dir', project.outputtimedir
    4543
     
    5957#
    6058# Convert ASC 2 DEM 2 PTS using source data and store result in source data
    61 # Do for coarse and fine data
    62 # Fine pts file to be clipped to area of interest
    6359#-------------------------------------------------------------------------------
    6460
     
    7066copied_files = False
    7167
    72 # files to be used
    73 files_used = [onshore_dem_name, offshore_points, coast_points,]
    74 
    7568# creates DEM from asc data
    7669convert_dem_from_ascii2netcdf(onshore_dem_name, use_cache=True, verbose=True)
     
    7972dem2pts(onshore_dem_name, use_cache=True, verbose=True)
    8073
    81 print'create G1'
    82 G1 = Geospatial_data(file_name = project.offshore_dem_name_local + '.xya')
    83 print'create G2'
    84 G2 = Geospatial_data(file_name = project.offshore_dem_name_aho + '.xya')
    85 print'create G3'
    86 G3 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
    87 print'create G4'
    88 G4 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
    89 print'add G1+G2+G3+G4'
    90 G = G1 + G2 + G3 + G4
    91 print'export G'
     74print 'local offshore data sets'
     75G1 = Geospatial_data(file_name = project.offshore_dem_name_local1 + '.xya')
     76#G2 = Geospatial_data(file_name = project.offshore_dem_name_local2 + '.xya')
     77G3 = Geospatial_data(file_name = project.offshore_dem_name_local3 + '.xya')
     78G4 = Geospatial_data(file_name = project.offshore_dem_name_local4 + '.xya')
     79print 'aho offshore data sets'
     80G5 = Geospatial_data(file_name = project.offshore_dem_name_aho1 + '.xya')
     81G6 = Geospatial_data(file_name = project.offshore_dem_name_aho2 + '.xya')
     82G7 = Geospatial_data(file_name = project.offshore_dem_name_aho3 + '.xya')
     83G8 = Geospatial_data(file_name = project.offshore_dem_name_aho4 + '.xya')
     84G9 = Geospatial_data(file_name = project.offshore_dem_name_aho5 + '.xya')
     85G10 = Geospatial_data(file_name = project.offshore_dem_name_aho6 + '.xya')
     86G11 = Geospatial_data(file_name = project.offshore_dem_name_aho7 + '.xya')
     87G12 = Geospatial_data(file_name = project.offshore_dem_name_aho8 + '.xya')
     88G13 = Geospatial_data(file_name = project.offshore_dem_name_aho9 + '.xya')
     89G14 = Geospatial_data(file_name = project.offshore_dem_name_aho10 + '.xya')
     90G15 = Geospatial_data(file_name = project.offshore_dem_name_aho11 + '.xya')
     91G16 = Geospatial_data(file_name = project.offshore_dem_name_aho12 + '.xya')
     92G17 = Geospatial_data(file_name = project.offshore_dem_name_aho13 + '.xya')
     93G18 = Geospatial_data(file_name = project.offshore_dem_name_aho14 + '.xya')
     94G19 = Geospatial_data(file_name = project.offshore_dem_name_aho15 + '.xya')
     95G20 = Geospatial_data(file_name = project.offshore_dem_name_aho16 + '.xya')
     96print 'local onshore dem'
     97G21 = Geospatial_data(file_name = project.onshore_dem_name + '.pts')
     98print 'coast'
     99G22 = Geospatial_data(file_name = project.coast_dem_name + '.xya')
     100print 'adding data sets'
     101G = G3+G4+G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20+G21+G22
    92102G.export_points_file(project.combined_dem_name + '.pts')
    93103
     
    101111
    102112# use 75 for onshore components (12.5m DEM)
    103 island_res = 10000
    104 hobart_res = 10000
    105 peninsular_res = 10000
     113island_res = 35000
     114hobart_res = 35000
     115peninsula_res = 35000
    106116interior_regions = [[project.poly_hobart, hobart_res],
    107117                    [project.poly_tasman_peninsula, peninsula_res],
     
    115125          {'boundary_tags': {'bottom': [0], 'right': [1],
    116126                             'top': [2], 'left': [3]},
    117            'maximum_triangle_area': 100000,
     127           'maximum_triangle_area': 250000,
    118128           'filename': meshname,           
    119129           'interior_regions': interior_regions},
     
    124134# Setup computational domain
    125135#-------------------------------------------------------------------------------                                 
    126 
    127 domain = pmesh_to_domain_instance(meshname, Domain,
    128                                   use_cache = False,
    129                                   verbose = True)
     136domain = Domain(meshname, use_cache = False, verbose = True)
    130137
    131138print 'Number of triangles = ', len(domain)
     
    161168#-------------------------------------------------------------------------------
    162169print 'start ferret2sww'
    163 from anuga.pyvolution.data_manager import ferret2sww
     170from anuga.shallow_water.data_manager import ferret2sww
    164171'''
    165172south = project.south
     
    198205
    199206#Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
    200                     domain, verbose = True)
     207#                    domain, verbose = True)
    201208Br = Reflective_boundary(domain)
    202209Bd = Dirichlet_boundary([tide,0,0])
Note: See TracChangeset for help on using the changeset viewer.