anuga.Field_boundary

class anuga.Field_boundary(filename, domain, mean_stage=0.0, time_thinning=1, time_limit=None, boundary_polygon=None, default_boundary=None, use_cache=False, verbose=False)[source]

Set boundary from given field.

Given field is represented in an sww file containing values for stage, xmomentum and ymomentum.

Optionally, the user can specify mean_stage to offset the stage provided in the sww file.

This function is a thin wrapper around the generic File_boundary. The difference between the File_boundary and Field_boundary is only that the Field_boundary will allow you to change the level of the stage height when you read in the boundary condition. This is very useful when running different tide heights in the same area as you need only to convert one boundary condition to a SWW file, ideally for tide height of 0 m (saving disk space). Then you can use Field_boundary to read this SWW file and change the stage height (tide) on the fly depending on the scenario.

__init__(filename, domain, mean_stage=0.0, time_thinning=1, time_limit=None, boundary_polygon=None, default_boundary=None, use_cache=False, verbose=False)[source]

Constructor

Parameters:
  • filename – Name of sww file containing stage and x/ymomentum

  • domain – pointer to shallow water domain for which the boundary applies

  • mean_stage – The mean water level which will be added to stage derived from the boundary condition

  • time_thinning – Will set how many time steps from the sww file read in will be interpolated to the boundary.

  • default_boundary – This will be used in case model time exceeds that available in the underlying data.

  • time_limit

  • boundary_polygon

  • use_cache – True if caching is to be used.

  • verbose – True if this method is to be verbose.

For example if the sww file has 1 second time steps and is 24 hours in length it has 86400 time steps. If you set time_thinning to 1 it will read all these steps. If you set it to 100 it will read every 100th step eg only 864 step. This parameter is very useful to increase the speed of a model run that you are setting up and testing.

Methods

__init__(filename, domain[, mean_stage, ...])

Constructor

evaluate([vol_id, edge_id])

Calculate 'field' boundary results.

evaluate_segment([domain, segment_edges])

Evaluate boundary condition at edges of a domain in a list defined by segment_edges

get_boundary_values([t])

get_time()