Changeset 5396


Ignore:
Timestamp:
Jun 10, 2008, 4:05:44 PM (14 years ago)
Author:
Leharne
Message:

Updating output directory in project and run scripts to automatically include run time, user and mesh resolution. Still in progress.

Location:
anuga_work/development/convergence_okushiri_2008
Files:
2 edited

Legend:

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

    r5345 r5396  
    33
    44"""
     5from os import sep, environ, getenv, getcwd, umask
     6from os.path import expanduser, basename, join
     7from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon, number_mesh_triangles
     8import sys
     9from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
     10from time import localtime, strftime, gmtime
     11from anuga.utilities.system_tools import get_user_name, get_host_name
     12
     13codename = 'project_grad.py' # FIXME can be obtained automatically as __file__
     14
     15home = join(getenv('INUNDATIONHOME'), 'data', 'anuga_validation',
     16            'convergence_okushiri_2008')# Location of Data   
     17user = get_user_name()
     18host = get_host_name()
     19#needed when running using mpirun, mpirun doesn't inherit umask from .bashrc
     20umask(002)
     21
     22#time stuff
     23time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
     24run_time = time+'_run'
     25
     26#Set anuga directories
     27anuga_dir = join(home, 'anuga')
     28
     29dir_comment='_'+setup+'_'+str(tide)+'_'+\
     30             str(user)+'_'+boundary_event+'_'+which_data
     31
     32mesh_dir = join(anuga_dir, 'meshes')
     33mesh_name = join(mesh_dir, 'okushiri_truescale')
     34
     35polygons_dir = join(anuga_dir, 'polygons') # Created with ArcGIS (csv files)
     36tide_dir = join(anuga_dir, 'tide_data')
     37
     38#output locations
     39output_dir = join(anuga_dir, 'outputs')+sep
     40output_run_time_dir = output_dir +run_time+dir_comment+sep
     41output_run_time_dir_name = output_run_time_dir + scenario_name  #Used by post processing
     42
     43#gauges
     44gauges_dir = join(anuga_dir,'gauges')
     45gauge_name = 'gauge_location_onslow.csv'
     46gauges_dir_name = gauges_dir + gauge_name
    547
    648# Given boundary wave
  • anuga_work/development/convergence_okushiri_2008/run_okushiri_truescale.py

    r5343 r5396  
    4040print domain.statistics()
    4141
     42z = domain.get_vertex_coordinates()
    4243
     44# Write vertex coordinates to file
     45filename='okushiri_mesh_vertex_coordinates_truescale.txt'
     46fid=open(filename,'w')
     47fid.write('x (m), y (m)\n')
     48for i in range(len(z)):
     49    pt=z[i]
     50    x=pt[0]
     51    y=pt[1]
     52    fid.write('%.6f, %.6f\n' %(x, y))
     53       
    4354#-------------------------
    4455# Initial Conditions
     
    5768#-------------------------
    5869domain.set_name(project_truescale.output_filename)  # Name of output sww file
     70domain.set_datadir(project_truescale.output_dir)
    5971domain.set_default_order(2)               # Apply second order scheme
    6072domain.set_all_limiters(0.9)              # Max second order scheme (old lim)
Note: See TracChangeset for help on using the changeset viewer.