Changeset 4423


Ignore:
Timestamp:
Apr 27, 2007, 1:29:59 PM (18 years ago)
Author:
sexton
Message:

updates for export scripts

Location:
anuga_work/production
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/broome_2006/locate_indigeneous.py

    r3908 r4423  
    3636filename_out = project.community_broome
    3737fid_out = open(filename_out, 'w')
    38 extent = project.polyAll
     38extent = project.poly_all
    3939zone = 51
    4040
  • anuga_work/production/dampier_2006/export_results.py

    r4422 r4423  
    55from os import sep
    66
    7 time_dir = '20070418_035124_run' #
     7time_dir = '20070419_065050_run' # HAT
     8#time_dir = '20070419_065018_run' # MSL
    89cellsize = 25
    910timestep = None
     
    1617print 'output dir:', name
    1718
    18 which_var = 2
    19 if which_var == 0:  # Stage
    20     outname = name + '_stage'
    21     quantityname = 'stage'
     19var = [2,3] # depth and speed
    2220
    23 if which_var == 1:  # Absolute Momentum
    24     outname = name + '_momentum_i1'
    25     quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
     21for which_var in var:
     22    if which_var == 0:  # Stage
     23        outname = name + '_stage'
     24        quantityname = 'stage'
    2625
    27 if which_var == 2:  # Depth
    28     outname = name + '_depth'
    29     quantityname = 'stage-elevation
     26    if which_var == 1:  # Absolute Momentum
     27        outname = name + '_momentum_i1'
     28        quantityname = '(xmomentum**2 + ymomentum**2)**0.5
    3029
    31 if which_var == 3:  # Speed
    32     outname = name + '_speed_i0'
    33     quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
     30    if which_var == 2:  # Depth
     31        outname = name + '_depth_facility'
     32        quantityname = 'stage-elevation' 
    3433
    35 if which_var == 4:  # Elevation
    36     outname = name + '_elevation'
    37     quantityname = 'elevation'  #Elevation
     34    if which_var == 3:  # Speed
     35        outname = name + '_speed_facility'
     36        quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
    3837
     38    if which_var == 4:  # Elevation
     39        outname = name + '_elevation'
     40        quantityname = 'elevation'  #Elevation
    3941
    40 
    41 if is_parallel == True:
    42 #    print 'is_parallel',is_parallel
    43     for i in range(0,nodes):
    44         namei = name + '_P%d_%d' %(i,nodes)
    45         outnamei = outname + '_P%d_%d' %(i,nodes)
    46         print 'start sww2dem for sww file %d' %(i)
    47         sww2dem(namei, basename_out = outnamei,
     42    if is_parallel == True:
     43    #    print 'is_parallel',is_parallel
     44        for i in range(0,nodes):
     45            namei = name + '_P%d_%d' %(i,nodes)
     46            outnamei = outname + '_P%d_%d' %(i,nodes)
     47            print 'start sww2dem for sww file %d' %(i)
     48            sww2dem(namei, basename_out = outnamei,
     49                        quantity = quantityname,
     50                        timestep = timestep,
     51                        cellsize = cellsize,     
     52                        easting_min = project.e_min_area,
     53                        easting_max = project.e_max_area,
     54                        northing_min = project.n_min_area,
     55                        northing_max = project.n_max_area,       
     56                        reduction = max,
     57                        verbose = True,
     58                        format = 'asc')
     59    else:
     60        print 'start sww2dem'
     61        sww2dem(name, basename_out = outname,
    4862                    quantity = quantityname,
    4963                    timestep = timestep,
     
    5670                    verbose = True,
    5771                    format = 'asc')
    58 else:
    59     print 'start sww2dem'
    60     sww2dem(name, basename_out = outname,
    61                 quantity = quantityname,
    62                 timestep = timestep,
    63                 cellsize = cellsize,     
    64                 easting_min = project.e_min_area,
    65                 easting_max = project.e_max_area,
    66                 northing_min = project.n_min_area,
    67                 northing_max = project.n_max_area,       
    68                 reduction = max,
    69                 verbose = True,
    70                 format = 'asc')
  • anuga_work/production/dampier_2006/make_report_cipma.py

    r4228 r4423  
    7777                    #'20061101_054432_run': 'big event'} # sequential
    7878                    #'20061107_070805_run': 'Mw 9.0',
    79                     '20061116_055135_run': 'Mw 9.0'} # multiple interior regions
     79                    #'20061116_055135_run': 'Mw 9.0'} # multiple interior regions
    8080                    #'20061116_062924_run': 'Mw 9.0'} # one interior region
     81                    '20070426_045818_run': '1 in 10000 wave height'} # revised run with water flowing in the correct direction!
    8182
    8283is_parallel = True
     
    8485    nodes = 8
    8586
    86 max_maps = {'Mw 9.0': 'mw9_map'}
     87max_maps = {'1 in 10000 wave height': 'mw9_map'}
    8788
    8889gauge_map1 = 'dampier_gauges_1.jpg'
  • anuga_work/production/dampier_2006/project.py

    r4422 r4423  
    124124gauges_dir_name_test = gauges_dir + gauge_name_test
    125125
     126community_filename = gauges_dir + 'CHINS_v2.csv'
     127community_KD = gauges_dir + 'community_KD.csv'
    126128
    127129#buildings_filename = gauges_dir + 'dampier_res_nexis.csv'
     
    261263poly_mainland = read_polygon(polygons_dir+'mainland_only.csv')
    262264
    263 # exporting asc grid - Dampier
     265# exporting asc grid - Dampier gas facility
    264266e_min_area = 474000
    265267e_max_area = 480000
     
    267269n_max_area = 7725000
    268270
     271# residential Dampier
     272e_min_area_d = 468450
     273e_max_area_d = 470820
     274n_min_area_d = 7714050
     275n_max_area_d = 7716625
     276
     277# residential Karratha
     278e_min_area_k = 474690
     279e_max_area_k = 489900
     280n_min_area_k = 7704760
     281n_max_area_k = 7712600
  • anuga_work/production/exmouth_2006/locate_indigeneous.py

    r3908 r4423  
    3434
    3535filename = project.community_filename
    36 filename_out = project.community_broome
     36filename_out = project.community_exmouth
    3737fid_out = open(filename_out, 'w')
    38 extent = project.polyAll
     38extent = project.poly_all
    3939zone = 50 # or is it 49?
    4040
  • anuga_work/production/exmouth_2006/project.py

    r4399 r4423  
    112112buildings_filename_damage_out = 'exmouth_res_nexis_modified.csv'
    113113
     114community_filename = gaugedir + 'CHINS_v2.csv'
     115community_exmouth = gaugedir + 'community_exmouth.csv'
     116
    114117###############################
    115118# Domain definitions
  • anuga_work/production/newcastle_2006/export_results.py

    r4347 r4423  
    4040#time_dir = '20070331_070841' # yacaaba - c1
    4141#time_dir = '20070331_080603' # birubi - c2
    42 time_dir = '20070401_030248' # yacaaba - historical
     42time_dir = '20070402_062735' # yacaaba - historical
    4343#time_dir = '20070331_080235' # bulli - c2
    4444#time_dir = '20070331_080213' # shovel - c2
  • anuga_work/production/onslow_2006/project.py

    r4151 r4423  
    142142# work as region needs to be inside bounding box (polyAll)!!
    143143
    144 e_min_area = 240000
    145 e_max_area = 340000
    146 n_min_area = 7580000
    147 n_max_area = 7690000
     144#e_min_area = 240000
     145#e_max_area = 340000
     146#n_min_area = 7580000
     147#n_max_area = 7690000
    148148export_region = [[e_min_area, n_min_area],
    149149                 [e_min_area, n_max_area],
  • anuga_work/production/pt_hedland_2006/project.py

    r4045 r4423  
    194194outputname = outputtimedir + basename  #Used by post processing
    195195
     196community_filename = gaugedir + 'CHINS_v2.csv'
     197community_pt_hedland = gaugedir + 'community_pt_hedland.csv'
     198
    196199# clipping region to make DEM (pts file) from onshore data
    197200eastingmin = 594000
  • anuga_work/production/sydney_2006/run_sydney_slide.py

    r4276 r4423  
    2828from anuga.geospatial_data.geospatial_data import *
    2929from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files
     30from anuga_parallel.parallel_api import distribute, numprocs, myid, barrier
    3031
    3132# Application specific imports
     
    3839
    3940# creates copy of code in output dir
    40 copy_code_files(project_slide.outputtimedir,__file__,dirname(project_slide.__file__)+sep+ project_slide.__name__+'.py' )
     41#copy_code_files(project_slide.outputtimedir,__file__,dirname(project_slide.__file__)+sep+ project_slide.__name__+'.py' )
    4142myid = 0
    4243numprocs = 1
    43 start_screen_catcher(project_slide.outputtimedir, myid, numprocs)
     44#start_screen_catcher(project_slide.outputtimedir, myid, numprocs)
     45#barrier()
    4446
    4547print 'USER:    ', project_slide.user
     
    5658nsw_dem_name = project_slide.nsw_dem_name
    5759meshname = project_slide.meshname+'.msh'
    58 
     60'''
    5961# creates DEM from asc data
    6062convert_dem_from_ascii2netcdf(on_offshore25_dem_name, use_cache=True, verbose=True)
     
    105107G.export_points_file(project_slide.combined_dem_name + '.pts')
    106108#G.export_points_file(project_slide.combined_dem_name + '.xya')
    107 
     109'''
    108110#----------------------------------------------------------------------------
    109111# Create the triangular mesh based on overall clipping polygon with a tagged
Note: See TracChangeset for help on using the changeset viewer.