Changeset 7859


Ignore:
Timestamp:
Jun 18, 2010, 5:21:09 PM (10 years ago)
Author:
hudson
Message:

Cleaned up some code.

Location:
trunk/anuga_core/source/anuga/file
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/file/netcdf.py

    r7800 r7859  
    22"""
    33
    4 import os, sys
    5 import csv
    6 import string
    7 import shutil
    8 from struct import unpack
    9 import array as p_array
    10 from os import sep, path, remove, mkdir, access, F_OK, W_OK, getcwd
    11 
    124import numpy as num
    135
    146from Scientific.IO.NetCDF import NetCDFFile
    15 from os.path import exists, basename, join
    16 from os import getcwd
    17 
    18 from anuga.coordinate_transforms.redfearn import redfearn, \
     7
     8from anuga.coordinate_transforms.redfearn import \
    199     convert_from_latlon_to_utm
    20 from anuga.coordinate_transforms.geo_reference import Geo_reference, \
    21      write_NetCDF_georeference, ensure_geo_reference
    22 from anuga.geospatial_data.geospatial_data import Geospatial_data,\
    23      ensure_absolute
    2410from anuga.config import minimum_storable_height as \
    2511     default_minimum_storable_height
    26 from anuga.config import netcdf_mode_r, netcdf_mode_w, netcdf_mode_a
    27 from anuga.config import netcdf_float, netcdf_float32, netcdf_int
    28 from anuga.config import max_float
     12from anuga.config import netcdf_mode_r, netcdf_mode_w
     13from anuga.config import netcdf_float, netcdf_int
    2914from anuga.utilities.numerical_tools import ensure_numeric,  mean
    30 from anuga.caching.caching import myhash
    31 from anuga.shallow_water.shallow_water_domain import Domain
    32 from anuga.abstract_2d_finite_volumes.pmesh2domain import \
    33      pmesh_to_domain_instance
    34 from anuga.abstract_2d_finite_volumes.util import get_revision_number, \
    35      remove_lone_verts, sww2timeseries, get_centroid_values
    36 
    37 from anuga.abstract_2d_finite_volumes.neighbour_mesh import segment_midpoints
    38 from anuga.load_mesh.loadASCII import export_mesh_file
    39 from anuga.geometry.polygon import intersection
    40 from anuga.file_conversion.sww2dem import sww2dem
    41 
    42 from anuga.utilities.system_tools import get_vars_in_expression
     15
    4316import anuga.utilities.log as log
    44 
    45 from anuga.utilities.file_utils import create_filename,\
    46                         get_all_swwfiles
    47 from anuga.file.csv_file import load_csv_as_dict
    48 from sww import Read_sww, Write_sww
    49 
    50 from anuga.anuga_exceptions import DataMissingValuesError, \
    51                 DataFileNotOpenError, DataTimeError, DataDomainError, \
    52                 NewQuantity
    5317
    5418
     
    151115        quantity[i,:] = quantity_slice * self.quantity_multiplier
    152116
    153     ##
    154     # @brief Close file underlying the class instance.
    155117    def close(self):
     118        """ Close file underlying the class instance. """
    156119        self.outfile.close()
    157120
  • trunk/anuga_core/source/anuga/file/pts.py

    r7778 r7859  
    1  
    2 ##
    3 # @brief Convert points to a polygon (?)
    4 # @param points_file The points file.
    5 # @param minimum_triangle_angle ??
    6 # @return
     1"""
     2    Fit a boundary polygon around arbitrary points.
     3"""
     4
     5
    76def load_pts_as_polygon(points_file, minimum_triangle_angle=3.0):
    87    """
     
    1514    """
    1615
    17     from anuga.pmesh.mesh import Mesh, importMeshFromFile
     16    from anuga.pmesh.mesh import importMeshFromFile
    1817    from anuga.shallow_water.shallow_water_domain import Domain
    19     from anuga.pmesh.mesh_interface import create_mesh_from_regions
    2018
    2119    mesh = importMeshFromFile(points_file)
  • trunk/anuga_core/source/anuga/file/sts.py

    r7858 r7859  
    11import numpy as num
    2 import log
     2import anuga.utilities.log as log
    33from Scientific.IO.NetCDF import NetCDFFile
    44
Note: See TracChangeset for help on using the changeset viewer.