Changeset 8810
- Timestamp:
- Apr 5, 2013, 10:25:46 AM (12 years ago)
- Location:
- trunk/anuga_core/source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py
r8782 r8810 1612 1612 self.max_speed = num.zeros(N, num.float) 1613 1613 1614 1614 1615 def evolve_one_euler_step(self, yieldstep, finaltime): 1615 1616 """One Euler Time Step -
trunk/anuga_core/source/anuga/config.py
r8808 r8810 220 220 221 221 # Determine if we can read/write large NetCDF files 222 netcdf_mode_w = 'w '223 netcdf_mode_a = ' a'222 netcdf_mode_w = 'wl' 223 netcdf_mode_a = 'r+' 224 224 netcdf_mode_r = 'r' 225 225 -
trunk/anuga_core/source/anuga/file/netcdf.py
r8785 r8810 43 43 44 44 45 45 46 try: 46 47 from Scientific.IO.NetCDF import NetCDFFile … … 48 49 except: 49 50 from netCDF4 import Dataset 50 return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT') 51 52 51 if netcdf_mode == 'wl' : 52 return Dataset(file_name, 'w', format='NETCDF3_64BIT') 53 else: 54 return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT') 55 56 # from netCDF4 import Dataset 57 # return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT') 53 58 54 59 #return Dataset(file_name, netcdf_mode, format='NETCDF3_CLASSIC') -
trunk/anuga_core/source/anuga/file/sww.py
r8782 r8810 205 205 fid.close() 206 206 207 207 208 def store_timestep(self): 208 209 """Store time and time dependent quantities 209 210 """ 210 211 211 import types212 #import types 212 213 from time import sleep 213 214 from os import stat 215 214 216 215 217 # Get NetCDF … … 238 240 # Check to see if the file is already too big: 239 241 time = fid.variables['time'] 242 240 243 i = len(time) + 1 241 244 file_size = stat(self.filename)[6] … … 309 312 z, _ = Q.get_vertex_values(xy=False) 310 313 311 storable_indices = (w-z >= self.minimum_storable_height)314 storable_indices = num.array(w-z >= self.minimum_storable_height) 312 315 else: 313 316 # Very unlikely branch … … 317 320 dynamic_quantities = {} 318 321 for name in self.writer.dynamic_quantities: 319 netcdf_array = fid.variables[name]322 #netcdf_array = fid.variables[name] 320 323 321 324 Q = domain.quantities[name] … … 363 366 364 367 # Flush and close 365 fid.sync()368 #fid.sync() 366 369 fid.close() 367 370 … … 793 796 794 797 795 798 796 799 def store_quantities(self, 797 800 outfile, -
trunk/anuga_core/source/anuga/shallow_water/boundaries.py
r8578 r8810 26 26 import Boundary, File_boundary 27 27 import numpy as num 28 29 import anuga.utilities.log as log 28 30 29 31 -
trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r8696 r8810 1553 1553 1554 1554 1555 1555 1556 1556 def evolve(self, 1557 1557 yieldstep=None, … … 1583 1583 finaltime=finaltime, duration=duration, 1584 1584 skip_initial_step=skip_initial_step): 1585 1585 1586 # Store model data, e.g. for subsequent visualisation 1586 1587 if self.store is True: -
trunk/anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r8592 r8810 5486 5486 } 5487 5487 5488 5488 5489 PyObject *compute_fluxes_ext_wb(PyObject *self, PyObject *args) { 5489 5490 /*Compute all fluxes and the timestep suitable for all volumes -
trunk/anuga_core/source/anuga_validation_tests/Case_studies/Okushiri/compare_timeseries_with_measures.py
r8807 r8810 168 168 #eps = get_machine_precision() 169 169 170 # Windows tolerances 171 rtol = 1.0e-2 172 atol = 1.0e-2 170 # Tolerances for 20,000 triangles 171 rtol = 2.0e-2 172 atol = 2.0e-2 173 174 # Tolerances for 60,000 triangles 175 #rtol = 1.0e-2 176 #atol = 1.0e-2 177 173 178 print 'Precisions used: rtol=%e, atol=%e' %(rtol, atol) 174 179 -
trunk/anuga_core/source/anuga_validation_tests/Case_studies/Okushiri/create_okushiri.py
r8780 r8810 31 31 #base_resolution = 0.04 # 989,669 triangles 32 32 #base_resolution = 0.1 # 397,456 triangles 33 base_resolution = 0.6 # 68162 triangles34 #base_resolution = 2.0 # 21214 triangles33 #base_resolution = 0.6 # 68162 triangles 34 base_resolution = 2.0 # 21214 triangles 35 35 #base_resolution = 4.0 # 11069 triangles 36 36 -
trunk/anuga_core/source/anuga_validation_tests/Case_studies/Okushiri/run_okushiri.py
r8787 r8810 62 62 domain.set_default_order(2) # Apply second order scheme 63 63 domain.set_minimum_storable_height(0.001) # Don't store w < 0.001m 64 domain.set_quantities_to_be_monitored('stage')64 #domain.set_quantities_to_be_monitored('stage') 65 65 66 66 … … 69 69 # or override manually yourself 70 70 #------------------------------------------------------------------------------ 71 from anuga.utilities.argparsing import parse_standard_args 72 alg, cfl = parse_standard_args() 71 #from anuga.utilities.argparsing import parse_standard_args 72 #alg, cfl = parse_standard_args() 73 alg = '1_5' 74 cfl = 1.0 73 75 domain.set_flow_algorithm(alg) 74 76 domain.set_CFL(cfl) 77 78 79 domain.set_store(False) 75 80 76 81 … … 105 110 t0 = time.time() 106 111 107 for t in domain.evolve(yieldstep = 0.05, finaltime = 22.5): 112 for t in domain.evolve(yieldstep = 0.01, finaltime = 4.0): 113 print 80*"=" 108 114 domain.write_time() 109 print domain.quantity_statistics(precision='%.12f') 115 import objgraph 116 #objgraph.show_most_common_types() 117 #print objgraph.typestats(objgraph.get_leaking_objects()) 118 objgraph.show_growth() 119 #print domain.quantity_statistics(precision='%.12f') 110 120 111 121 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.