Rev | Line | |
---|
[2987] | 1 | """Stochastic study of the ANUGA implementation of the |
---|
| 2 | shallow water wave equation. |
---|
| 3 | |
---|
| 4 | This script runs the model for one realisation of bathymetry as |
---|
| 5 | given in the file bathymetry.txt and outputs a full simulation is \ |
---|
| 6 | sww NetCDF format. |
---|
| 7 | |
---|
| 8 | The left boundary condition is a timeseries defined in |
---|
| 9 | NetCDF file: input_wave.tms |
---|
| 10 | |
---|
| 11 | Note: This scripts needs create_mesh.py to have been run |
---|
| 12 | |
---|
| 13 | Suresh Kumar and Ole Nielsen 2006 |
---|
| 14 | """ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | #------------------------------------------------------------------------------ |
---|
| 18 | # Import necessary modules |
---|
| 19 | #------------------------------------------------------------------------------ |
---|
| 20 | |
---|
| 21 | # Standard modules |
---|
| 22 | import os |
---|
| 23 | import time |
---|
| 24 | import cPickle |
---|
| 25 | |
---|
| 26 | # Application specific imports |
---|
| 27 | import project # Definition of file names and polygons |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | finaltime = 22.5 |
---|
| 31 | timestep = 0.05 |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | realisation = 0 |
---|
| 35 | for filename in os.listdir(project.working_dir): |
---|
| 36 | if filename.startswith(project.basename) and filename.endswith('.pck'): |
---|
| 37 | print 'Reading %s' %filename |
---|
[2988] | 38 | fid = open(project.working_dir + filename) |
---|
[2987] | 39 | V = cPickle.load(fid) |
---|
| 40 | fid.close() |
---|
| 41 | |
---|
| 42 | print 'V', V[25,:] |
---|
| 43 | |
---|
| 44 | raw_input() |
---|
Note: See
TracBrowser
for help on using the repository browser.