Changeset 8823


Ignore:
Timestamp:
Apr 14, 2013, 5:37:22 PM (12 years ago)
Author:
steve
Message:

Small change to default netcdf_mode_w

Location:
trunk/anuga_core/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/config.py

    r8810 r8823  
    220220
    221221# Determine if we can read/write large NetCDF files
    222 netcdf_mode_w = 'wl'
    223 netcdf_mode_a = 'r+'
     222netcdf_mode_w = 'w'
     223netcdf_mode_a = 'a'
    224224netcdf_mode_r = 'r'
    225225
  • trunk/anuga_core/source/anuga/file/netcdf.py

    r8814 r8823  
    4141   
    4242    """
    43 
    44 
     43   
    4544
    4645    try:
    4746        from Scientific.IO.NetCDF import NetCDFFile
    4847        return NetCDFFile(file_name, netcdf_mode)
    49     except:
     48    except: 
    5049        from netCDF4 import Dataset
    5150        if netcdf_mode == 'wl' :
     
    5352        else:
    5453            return Dataset(file_name, netcdf_mode, format='NETCDF3_64BIT')
     54
    5555
    5656#    from netCDF4 import Dataset
  • trunk/anuga_core/source/anuga/geospatial_data/geospatial_data.py

    r8819 r8823  
    707707            if self.verbose is True:
    708708                log.critical('Geospatial_data: Reading %d points (in ~%d blocks) from file %s. '
    709                              % (self.number_of_points, self.number_of_blocks,
     709                             % (self.number_of_points, self.number_of_blocks+1,
    710710                                self.file_name))
    711711                log.critical('Geospatial_data: Each block consists of %d data points'
  • trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py

    r8763 r8823  
    3030from anuga import Time_boundary
    3131from anuga import Transmissive_boundary
     32from anuga import Transmissive_n_momentum_zero_t_momentum_set_stage_boundary
    3233
    3334from anuga import rectangular_cross
     
    8485if myid == 0:
    8586    domain = create_domain_from_file(mesh_filename)
    86     domain.set_quantity('stage', Set_Stage(x0, x1, 1.0))
     87    #domain.set_quantity('stage', Set_Stage(x0, x1, 1.0))
     88    domain.set_quantity('stage', 0.0)
    8789    #domain.set_datadir('.')
    8890    domain.set_name('merimbula_new')
     
    148150Br = Reflective_boundary(domain)      # Solid reflective wall
    149151
    150 domain.set_boundary({'outflow' :Br, 'inflow' :Br, 'inner' :Br, 'exterior' :Br, 'open' :Br})
     152from math import sin
     153Bts = Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain, lambda t: 10*sin(t/60))
     154
     155domain.set_boundary({'outflow' :Br, 'inflow' :Br, 'inner' :Br, 'exterior' :Br, 'open' :Bts})
     156
     157
     158bdy_ids = domain.tag_boundary_cells['open']
     159vol_ids = domain.boundary_cells[bdy_ids]
     160edge_ids = domain.boundary_edges[bdy_ids]
     161
     162print domain.mesh.edge_midpoint_coordinates[3*vol_ids+edge_ids]
     163
     164
    151165
    152166#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.