Changeset 5245 for anuga_work/production


Ignore:
Timestamp:
Apr 28, 2008, 8:00:14 AM (17 years ago)
Author:
sexton
Message:

(1) update of production processes document (2) test for generating points for URS output (3) update of graduate proposal

Location:
anuga_work/production
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/broome/run_boundary_points.py

    r5001 r5245  
    2121from anuga.shallow_water.data_manager import URS_points_needed_to_file, \
    2222     urs_ungridded2sww
    23 import project                 # Definition of file names and polygons
     23import project_urs                 # Definition of file names and polygons
    2424
    2525#------------------------------------------------------------------------------
     
    2727# output to file
    2828#------------------------------------------------------------------------------
    29 poly = project.poly_all
     29poly = project_urs.poly_all
    3030print "poly", poly
    31 print "project.boundaries_in_dir_name",project.boundaries_in_dir_name
    32 URS_points_needed_to_file(project.boundaries_in_dir_name,poly, export_csv=True, zone=51)
     31print "project_urs.boundaries_in_dir_name",project_urs.boundaries_in_dir_name
     32URS_points_needed_to_file(project_urs.boundaries_in_dir_name,poly, export_csv=True, zone=51)
    3333#URS_points_needed_to_file(project.boundaries_dir_name5,poly, export_csv=True, zone=50)
    3434#URS_points_needed_to_file(project.boundaries_dir_name5,poly, export_csv=True)
  • anuga_work/production/exmouth_2006/plot_contour_data.py

    r4949 r5245  
    33
    44import project
    5 from pylab import plot, xlabel, ylabel, savefig, ion, close, axis, title, legend, grid
     5from pylab import plot, xlabel, ylabel, savefig, ion, close, axis, title, legend, grid, figure
    66from os import sep
    77 
     
    5656#Magnitude 9.0 event (Sumba) at Exmouth')
    5757legend(['ANUGA','Green\'s law'])
    58 axis([-5,85,min(stage_max)*0.9,max(stage_max)*1.1])
     58#axis([-5,85,min(stage_max)*0.9,max(stage_max)*1.1])
     59axis([-5,85,3.5,max(stage_max)*1.1])
    5960grid(True)
    6061#savefig('stratification_onslow_gun')
     
    6263#savefig('stratification_dampier_gun')
    6364
     65depthv2 = [0,5,20,80]
     66datav2 = [8.2,6,4,h1]
     67figure(2)
     68plot(d2,green,'g-',depthv2,datav2,'bo-')
     69xlabel('depth (m)')
     70ylabel('stage (m)')
     71title('ANUGA modelled maximum stage versus Green\'s approximation \n \
     72Magnitude 9.3 event (Java) at Exmouth')
     73legend(['ANUGA','Green\'s law'])
     74axis([-5,85,3.5,max(stage_max)*1.1])
     75grid(True)
     76savefig('strat_exmouth_gun_v2')
    6477close('all')
    6578
  • anuga_work/production/onslow_2006/convert_db_points.py

    r4580 r5245  
    1313   
    1414    fid_out = open(filenameout, 'w')
    15     s = '%s,%s\n' %('easting','northing')
     15    s = '%s,%s,%s\n' %('easting','northing','zone')
    1616    fid_out.write(s)
    1717    for line in lines[1:]:
    1818       fields = line.split(',')
    19        x = float(fields[1])
    20        y = float(fields[0])
     19       #x = float(fields[1])
     20       #y = float(fields[0])
     21       x = float(fields[0])
     22       y = float(fields[1])
    2123       zone, easting, northing = redfearn(x,y)
    22        s = '%f,%f\n' %(easting,northing)
     24       s = '%f,%f,%f\n' %(easting,northing,zone)
    2325       fid_out.write(s)
    2426
     
    2931import project
    3032
    31 filename = project.gaugedir + 'db_points.txt'
    32 filename_out = project.gaugedir + 'db_points_convert.txt'
     33#filename = project.gaugedir + 'db_points.txt'
     34#filename_out = project.gaugedir + 'db_points_convert.txt'
     35filename = project.gaugedir + 'aus_hazard_pts.txt'
     36filename_out = project.gaugedir + 'aus_hazard_pts_en.txt'
    3337alter_file(filename,filename_out)
     38
  • anuga_work/production/shark_bay_2007/export_results.py

    r4856 r5245  
    7171                    reduction = max,
    7272                    verbose = True,
    73                     format = 'asc')
     73                    format = 'txt')
  • anuga_work/production/west_tas_2008/convert2eastnorth.py

    r4968 r5245  
    3131#filename = project_smf.polygondir + 'domain.txt'
    3232#filename = project_smf.polygondir + 'local.txt'
    33 filename = project_smf.polygondir + 'region.txt'
     33#filename = project_smf.polygondir + 'region.txt'
     34#filename = project_smf.datadir + 'Sorell_Basin_150m_DD_Interp.txt'
     35#filename = project_smf.datadir + 'S_Tasman_Rise_150m_DD_Interp.txt'
     36filename = project_smf.polygondir + 'origin.txt'
    3437#filename_out = project_smf.polygondir + 'domain.csv'
    3538#filename_out = project_smf.polygondir + 'local.csv'
    36 filename_out = project_smf.polygondir + 'region.csv'
     39#filename_out = project_smf.polygondir + 'region.csv'
     40#filename_out = project_smf.datadir + 'Sorell_Basin_150m_EN_Interp.txt'
     41#filename_out = project_smf.datadir + 'S_Tasman_Rise_150m_EN_Interp.txt'
     42filename_out = project_smf.polygondir + 'origin_EN.csv'
    3743alter_file(filename,filename_out)
  • anuga_work/production/west_tas_2008/project_smf.py

    r4968 r5245  
    2424state = 'tasmania'
    2525scenario_dir_name = 'smf_scenario_2008'
    26 '''
    27 # onshore data provided by NSW LPI, Krishna merged with existing
    28 # PMD data to make 100m DEM
    29 on_offshore_name100 = 'bathyland100'
     26
     27# onshore data sourced from 250m grid
     28onshore_name250 = 'bathyland250'
     29
     30# coastline from GA
     31coast_line_name = 'aus_cst'
    3032
    3133# survey data
    32 offshore_name1 = 'surveyAreaA'
    33 offshore_name2 = 'surveyAreaB'
    34 offshore_name3 = 'surveyAreaC'
     34offshore_name1 = 'S_Tasman_Rise_150m_EN_Interp'
     35offshore_name2 = 'Sorell_Basin_150m_EN_Interp'
     36offshore_name3 = 'West_Tas_EastNorth_z'
    3537
    36 # AHO data
    37 offshore_name4 = '1000003611export'
    38 offshore_name5 = '1000003613export'
    39 offshore_name6 = '1000003614export'
    40 offshore_name7 = '1000003627export'
    41 offshore_name8 = '1000003628export'
    42 offshore_name9 = 'AHDexport'
    43 '''
    4438#swollen/ all data output
    4539basename = 'source'
     
    6155codedirname = codedir + 'project_smf.py'
    6256meshname = outputtimedir + 'mesh_' + basename
    63 '''
     57
    6458# Necessary if using point datasets, rather than grid
    65 on_offshore100_dem_name = datadir + on_offshore_name100
     59onshore_250_dem_name = datadir + onshore_name250
    6660offshore_dem_name1 = datadir + offshore_name1
    6761offshore_dem_name2 = datadir + offshore_name2
    6862offshore_dem_name3 = datadir + offshore_name3
     63coast_line = datadir + coast_line_name
    6964
    7065combined_dem_name   = datadir + 'west_tas_combined_elevation'
    71 '''
     66
    7267###############################
    7368# Domain definitions
     
    9489###################################################################
    9590
    96 
    9791# exporting asc grid
    9892eastingmin = 333000
     
    107101
    108102# historical slides
    109 #slide_origin = [,]
     103slide_origin = [338270.5407, 5217273.89]
    110104
    111105depth = 1750.0
  • anuga_work/production/west_tas_2008/run_west_tas_smf.py

    r4968 r5245  
    5454
    5555# filenames
    56 on_offshore25_dem_name = project_smf.on_offshore25_dem_name
     56onshore_250_dem_name = project_smf.onshore_250_dem_name
    5757meshname = project_smf.meshname+'.msh'
    5858
    5959# creates DEM from asc data
    60 convert_dem_from_ascii2netcdf(on_offshore25_dem_name, use_cache=True, verbose=True)
     60convert_dem_from_ascii2netcdf(onshore_250_dem_name, use_cache=True, verbose=True)
    6161
    6262#creates pts file for onshore DEM
    63 dem2pts(on_offshore25_dem_name,
    64         easting_min=project_smf.eastingmin25,
    65         easting_max=project_smf.eastingmax25,
    66         northing_min=project_smf.northingmin25,
    67         northing_max= project_smf.northingmax25,
    68         use_cache=True, verbose=True)
     63dem2pts(onshore_250_dem_name, use_cache=True, verbose=True)
    6964
    7065print 'create offshore'
    71 G1 = Geospatial_data(file_name = project_smf.offshore_dem_name1 + '.xya')+\
    72      Geospatial_data(file_name = project_smf.offshore_dem_name2 + '.xya')+\
    73      Geospatial_data(file_name = project_smf.offshore_dem_name3 + '.xya')
     66G1 = Geospatial_data(file_name = project_smf.offshore_dem_name1 + '.txt')+\
     67     Geospatial_data(file_name = project_smf.offshore_dem_name2 + '.txt')+\
     68     Geospatial_data(file_name = project_smf.offshore_dem_name3 + '.txt')
    7469
    7570print 'create onshore'
    76 G2 = Geospatial_data(file_name = project_smf.on_offshore25_dem_name + '.pts')
     71G2 = Geospatial_data(file_name = project_smf.onshore_250_dem_name + '.pts')
     72
     73print 'create coastline'
     74G3 = Geospatial_data(file_name = project_smf.coast_line + '.txt')
    7775
    7876print 'add'
    79 G = G1 + G2
     77G = G1.clip(Geospatial_data(project_smf.polyAll)) + G2 + G3
    8078
    8179print 'export points'
Note: See TracChangeset for help on using the changeset viewer.