| Contact: | Jeff Anderson |
| Reviewers: | |
| Revision: | $Revision: 1.5 $ |
| Release Name: | $Name: pre_hawaii $ |
| Change Date: | $Date: 2004/12/22 20:48:13 $ |
| Change history: | see CVS log (cop-out, I know) |
A note about documentation style. Optional arguments are enclosed in brackets [like this].
Provides a representation of a physical location on 1-D periodic domain. A type that abstracts the location is provided along with operators to compute the distance between two locations. This is a member of a class of similar location modules that provide the same abstraction for different represenations of physical space (for instance a three-dimensional spherical shell).
types_mod utilities_mod random_seq_mod
| use location_mod, only : | location_type |
| get_dist | |
| get_location | |
| set_location | |
| write_location | |
| read_location | |
| interactive_location | |
| set_location_missing | |
| query_location | |
| LocationDims | |
| LocationName | |
| LocationLName |
type location_type private real(r8) :: x end type location_type
Provides an abstract representation of physical location on a one dimensional periodic domain.
| Component | Description |
|---|---|
| x | Location has range 0 to 1 |
real(r8), intent(inout) :: get_location type(location_type), intent(in) :: loc
Extracts the real location value, range 0 to 1, from a location type.
| get_location | The real location |
| loc | A location type |
type(location_type), intent(in) :: set_location real(r8), intent(in) :: x
Returns a location type with the location x.
| set_location | A location type |
| x | Location range 0 to 1 |
integer, intent(in) :: file type(location_type), intent(inout) :: loc character(len=*), optional, intent(in) :: fform
Given an integer IO channel of an open file and a location, writes the location to this file. The fform argument controls whether write is "FORMATTED" or "UNFORMATTED" with default being formatted.
| file | the unit number of the open file. |
| loc | location type to be written. |
| fform | Format specifier (FORMATTED or UNFORMATTED). |
Eventually, a more general file descriptor type should replace the use of the integer unit number.
type(location_type), intent(in) :: loc1, loc2 real(r8) :: var
Returns the distance between two locations.
| loc1 | first location. |
| loc2 | second location. |
| var | distance between loc1 and loc2. |
type(location_type) :: read_location integer, intent(in) :: ifile character(len=*), optional, intent(in) :: fform
Reads a location_type from a file open on channel ifile using format fform (default is formatted).
| read_location | Returned location type read from file |
| ifile | Integer channel opened to a file to be read |
| fform | Optional format specifier (FORMATTED or UNFORMATTED) |
type(location_type), intent(out) :: location logical, optional, intent(in) :: set_to_default
Use standard input to define a location type. With set_to_default true get one with all elements set to 0.
| location | Location created from standard input |
| set_to_default | If true, sets all elments of location type to 0 |
type(location_type), intent(in) :: set_location_missing
Returns a location with location set to missing value from types_mod.
| set_location_missing | A location set to missing value |
real(r8), intent(out) :: query_location type(location_type), intent(in) :: loc character(len=*), optional, intent(in) :: attr
Returns the value of x if attr = 'X' or if attr is not passed.
| query_location | Returns value of x. |
| loc | A location type |
| attr | Selects 'X' |
| Routine | Message | Comment |
|---|---|---|
| set_location_missing | Value of x is out of 0->1 range | x cannot be less than 0 or greater than 1 |
| query_location | Only x is legal attribute to request from location | attr must be 'x' or 'X' |
| read_location | Expected location header "loc1d" in input file | Can only read one-dimensional location files |
None.