All Pyclaw data objects inherit from the basic functionality of Data. It defines the way all data files are read and written and provides functionality for doing both. Please see Data for more information for general functionality and each individual definition for the specifics.
Data Module
Contains the general class definition and the subclasses of the Clawpack data objects.
Authors: | Kyle T. Mandli and Randall J. LeVeque (2008-08-07) Initial version Randall J. LeVeque (2008-08-07) Plotting data objects Alan McIntyre (2009-01-01) Speed ups and rebuilding of Data Kyle T. Mandli (2009-04-01) Stripped down and improved version |
---|
Bases: pyclaw.data.Data
Object that will be written out to amr2ez.data.
Bases: pyclaw.data.Data
Object that will be written out to claw.data.
Bases: pyclaw.data.Data
Object that will be written out to claw.data.
Bases: object
Generalized clawpack data object
Generalized class for Clawpack data. Contains generic methods for reading and writing data to and from a data file.
Initialization: |
|
---|---|
Version: | 1.2 (2009-04-01) |
Adds an attribute called name to the data object
If an attribute needs to be added to the object, this routine must be called or the attribute will not be written out.
Input: |
|
---|
Returns the owner of the data attribute name
Input: |
|
---|---|
Output: |
|
Returns a list of owners excluding the owner None
If supplementary_file is provided, None is replace by that owner.
Input: |
|
---|---|
Output: |
|
Check if this data object has the given attributes
Input: |
|
---|---|
Output: |
|
Returns an iterator of keys and values from this object
Output: |
|
---|
Read data in from a clawpack style data file.
Any lines of the form:
values =: name
is used to set an attribute of self.
INPUT
Sets the owner of the given data
Input: |
|
---|
Write out the contents of the data object
This method writes out the current required attributes of the data object to a file or list of files. The format for the output will be in the form:
values =: name
The order is either retained from the files in the data list or written in the order they are in the list of attributes
The behavior is determined by the arguments passed into the routine:
No arguments:
The contents of the object will be written out to the files listed in data_files only if each attribute is contained in the file. This implies that if an attribute is not located in any of the files in data_files then it will not be written out to file.
If data_files is provided and data_files is a valid owner:
Write out the attributes appropriate to that file
If data_files is provided and not(data_files in owner):
Write all attributes to the data_file given
If supplementary_file is provided:
Write out any attributes without an owner to this file, all owned attributes will be written out to the approriate files
Bases: pyclaw.data.Data
Data to be written out to gauge.data specifying gauges. DEPRECATED: Use GeoclawInputData instead.
Bases: pyclaw.data.Data
Object that will be written out to the various GeoClaw data files.
Bases: pyclaw.data.Data
Object that will be written out to claw.data.
Bases: pyclaw.data.Data
Object that will be written out to user file such as setprob.data, as determined by the fname attribute.
Write out value to data file, in the form
value =: name descr
Remove brackets and commas from lists, and replace booleans by T/F. Also convert numpy array to a list first.
Input: |
|
---|
Open a data file and write a warning header. Warning header starts with ‘#’ character. These lines are skipped if data file is opened using the library routine opendatafile.
Input: |
|
---|---|
Output: |
|