Source code documentation

The windsurf Python package connects the model cores within the Windsurf composite model and acts as user-interface to the end-user. The package consists of different modules that are documented in the following sections.

model

netcdf

parsers

class parsers.AeolisParser(configfile)[source]

Configuration parser class for AeoLiS models

Inherits from ConfigParser.

class parsers.ConfigParser(configfile)[source]

Configuration parser base class

Base class for the construction of model engine configuration file parsers. Parses the main configuration file and referenced files therin.

__init__(configfile)[source]

Initialize the class

Parameters:configfile (str) – path to model configuration file
parse()[source]

Parse configuration file

Returns:key/value pairs of model configuration
Return type:dict
parse_config_file(configfile)[source]

Parse configuration file

Parameters:configfile (str) – path to configuration file
Returns:key/value pairs of model configuration
Return type:dict
parse_config_value(value, force_list=False)[source]

Parse configuration value string to valid Python variable type

Parameters:value (str) – configuration value string
Returns:parsed configuration value
Return type:str, int, float, bool or list
parse_referenced_file(fname)[source]

Parse a file referenced in the main configuration file

Parameters:fname (str) – referenced filename
Returns:a np.ndarray for numeric data, a dictionary for key/value data or a list for plain text data
Return type:np.ndarray, dict or list
class parsers.XBeachParser(configfile)[source]

Configuration parser class for XBeach models

Inherits from ConfigParser.

console