Ignore:
Timestamp:
Mar 7, 2008, 4:37:36 PM (17 years ago)
Author:
herve
Message:

deleting data files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/tonga/project.py

    r5135 r5139  
    22"""Common filenames and locations for topographic data, meshes and outputs.
    33"""
    4 print 'hello'
     4
    55from os import sep, environ, getenv, getcwd
    66from os.path import expanduser
    77import sys
    88from time import localtime, strftime, gmtime
    9 from anuga.utilities.polygon import read_polygon, plot_polygons, \
    10                                     polygon_area, is_inside_polygon
     9from anuga.utilities.polygon import read_polygon, plot_polygons, is_inside_polygon, number_mesh_triangles
     10#from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
     11from anuga.utilities.system_tools import get_user_name, get_host_name
     12
     13# file and system info
     14#---------------------------------
     15#codename = 'project.py'
     16
     17home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent diruser = get_user_name()
     18user = get_user_name()
     19host = get_host_name()
     20
     21# INUNDATIONHOME is the inundation directory, not the data directory.
     22
     23#time stuff
     24time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
     25gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
     26build_time = time+'_build'
     27run_time = time+'_run'
     28print 'gtime: ', gtime
     29
     30#Making assumptions about the location of scenario data
     31state = 'sw_pacific'
     32scenario_name = 'Tonga'
     33scenario = 'fixed_wave'
     34
     35tide = 0
     36
     37alpha = 0.1
     38friction=0.01
     39starttime=10000
     40midtime=21600
     41finaltime=10000
     42export_cellsize=50
     43setup='trial'
     44
     45if setup =='trial':
     46    print'trial'
     47    res_factor=10
     48    time_thinning=48
     49    yieldstep=240
     50if setup =='basic':
     51    print'basic'
     52    res_factor=4
     53    time_thinning=12
     54    yieldstep=120
     55if setup =='final':
     56    print'final'
     57    res_factor=1
     58    time_thinning=4
     59    yieldstep=60
     60
     61dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+str(user)
     62
     63
     64topo_gridfile ='tongatapu_10mgrid'
     65
     66anuga_dir = home+state+sep+scenario+sep+'anuga'+sep
     67
     68topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep
     69topographies_dir = anuga_dir+'topographies'+sep
     70#topographies_time_dir = topographies_dir+build_time+sep
     71
     72meshes_dir = anuga_dir+'meshes'+sep
     73meshes_dir_name = meshes_dir + scenario_name
     74
     75polygons_dir = anuga_dir+'polygons'+sep
     76tide_dir = anuga_dir+'tide_data'+sep
     77
     78boundaries_in_dir_name = boundaries_in_dir + scenario_name
     79boundaries_dir = anuga_dir+'boundaries'+sep
     80boundaries_dir_name = boundaries_dir + scenario_name
     81
     82#output locations
     83output_dir = anuga_dir+'outputs'+sep
     84output_build_time_dir = anuga_dir+'outputs'+sep+build_time+dir_comment+sep
     85output_run_time_dir = anuga_dir+'outputs'+sep+run_time+dir_comment+sep
     86output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post pr
    1187
    1288###############################
    1389# Domain definitions
    1490###############################
    15 
    16 # bounding polygon for study area
    17 bounding_polygon = read_polygon('extent.txt')
    18 
    19 print 'Area of bounding polygon', polygon_area(bounding_polygon)/1000000.0
     91from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
     92
     93poly_all = read_polygon(polygons_dir+'extent.txt')
     94res_poly_all = 100000*res_factor
     95
    2096
    2197###############################
     
    39115poly_island13= read_polygon('islands13.txt')
    40116
    41 #plot_polygons([bounding_polygon,poly_cairns,poly_island0,poly_island1,\
    42 #               poly_island2,poly_island3,poly_shallow],\
    43 #              'boundingpoly',verbose=False)
     117
     118islands_res = 5000
     119cairns_res = 5000
     120interior_regions = [[project.poly_tongatapu, tongatapu_res],
     121                    [project.poly_island1, islands_res],
     122                    [project.poly_island2, islands_res],
     123                    [project.poly_island3, islands_res],
     124                    [project.poly_island4, islands_res],
     125                    [project.poly_island5, islands_res],
     126                    [project.poly_island6, islands_res],
     127                    [project.poly_island7, islands_res],
     128                    [project.poly_island8, islands_res],
     129                    [project.poly_island9, islands_res],
     130                    [project.poly_island10, islands_res],
     131                    [project.poly_island11, islands_res],
     132                    [project.poly_island12, islands_res],
     133                    [project.poly_island13, islands_res]]
     134
     135boundary_tags={'ocean_east': [0],'ocean_north': [1],'ocean_west': [2],'land': [3,4,5,6,7],'ocean_southeast':[8,9]}
     136
     137trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
     138
     139print 'min number triangles', trigs_min
    44140
    45141###################################################################
     
    57153slide_depth = 207.
    58154
    59 gauge_filename = 'gauges.csv'
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165# topo Filenames
     166dem_name = 'tongatapu_10mgrid'
     167meshname = 'tongatapu.msh'
     168
     169# Create DEM from asc data
     170convert_dem_from_ascii2netcdf(dem_name, use_cache=True, verbose=True)
     171
     172# Create pts file for onshore DEM
     173dem2pts(dem_name, use_cache=True, verbose=True)
     174
     175
     176
     177
     178
     179
     180# -*- coding: cp1252 -*-
     181"""Common filenames and locations for topographic data, meshes and outputs.
     182"""
     183
     184from os import sep, environ, getenv, getcwd
     185from os.path import expanduser
     186import sys
     187from time import localtime, strftime, gmtime
     188from anuga.utilities.polygon import read_polygon, plot_polygons, \
     189                                    polygon_area, is_inside_polygon
     190
     191###############################
     192# Domain definitions
     193###############################
     194
     195# bounding polygon for study area
     196bounding_polygon = read_polygon('Y:\data\sw_pacific\tonga\anuga\boundaries\extent.txt')
     197
     198print 'Area of bounding polygon', polygon_area(bounding_polygon)/1000000.0
     199
     200###############################
     201# Interior region definitions
     202###############################
     203
     204# interior polygons
     205poly_tongatapu = read_polygon('tongatapu_finemesharea.txt')
     206poly_island1 = read_polygon('island1.txt')
     207poly_island2 = read_polygon('island2.txt')
     208poly_island3 = read_polygon('islands3.txt')
     209poly_island4 = read_polygon('islands4.txt')
     210poly_island5= read_polygon('islands5.txt')
     211poly_island6= read_polygon('islands6.txt')
     212poly_island7= read_polygon('islands7.txt')
     213poly_island8= read_polygon('islands8.txt')
     214poly_island9= read_polygon('islands9.txt')
     215poly_island10= read_polygon('islands10.txt')
     216poly_island11= read_polygon('islands11.txt')
     217poly_island12= read_polygon('islands12.txt')
     218poly_island13= read_polygon('islands13.txt')
     219
     220#plot_polygons([bounding_polygon,poly_cairns,poly_island0,poly_island1,\
     221#               poly_island2,poly_island3,poly_shallow],\
     222#              'boundingpoly',verbose=False)
     223
     224###################################################################
     225# Clipping regions for export to asc and regions for clipping data
     226###################################################################
     227
     228# exporting asc grid
     229eastingmin = 670500
     230eastingmax = 712750
     231northingmin = 7646000
     232northingmax = 7677000
     233
     234
     235slide_origin = [701290, 7665750] # move onto the continental shelf, depth = 500
     236slide_depth = 207.
     237
     238#gauge_filename = 'gauges.csv'
Note: See TracChangeset for help on using the changeset viewer.