Changeset 8145 for trunk/anuga_core/source/anuga/file
- Timestamp:
- Mar 10, 2011, 9:26:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file/netcdf.py
r7859 r8145 23 23 precision = netcdf_float # So if we want to change the precision its done here 24 24 25 ##26 # @brief Clas for a NetCDF data file writer.27 25 class Write_nc: 28 26 """Write an nc file. … … 32 30 """ 33 31 34 ##35 # @brief Instantiate a Write_nc instance.36 # @param quantity_name37 # @param file_name38 # @param time_step_count The number of time steps.39 # @param time_step The time_step size.40 # @param lon41 # @param lat42 32 def __init__(self, 43 33 quantity_name, … … 95 85 #outfile.close() 96 86 97 ##98 # @brief Write a time-step of quantity data.99 # @param quantity_slice The data to be stored for this time-step.100 87 def store_timestep(self, quantity_slice): 101 88 """Write a time slice of quantity info … … 121 108 122 109 123 ##124 # @brief Write an NC elevation file.125 # @param file_out Path to the output file.126 # @param lon ??127 # @param lat ??128 # @param depth_vector The elevation data to write.129 110 def write_elevation_nc(file_out, lon, lat, depth_vector): 130 111 """Write an nc elevation file.""" … … 150 131 outfile.close() 151 132 152 153 ##154 # @brief Write lat/lon headers to a NetCDF file.155 # @param outfile Handle to open file to write to.156 # @param lon An iterable of the longitudes.157 # @param lat An iterable of the latitudes.158 # @note Defines lat/long dimensions and variables. Sets various attributes:159 # .point_spacing and .units160 # and writes lat/lon data.161 133 162 134 def nc_lon_lat_header(outfile, lon, lat): … … 188 160 189 161 190 ##191 # @brief Filter data file, selecting timesteps first:step:last.192 # @param filename1 Data file to filter.193 # @param filename2 File to write filtered timesteps to.194 # @param first First timestep.195 # @param last Last timestep.196 # @param step Timestep stride.197 162 def filter_netcdf(filename1, filename2, first=0, last=None, step=1): 198 163 """Filter data file, selecting timesteps first:step:last.
Note: See TracChangeset
for help on using the changeset viewer.