Writing Bellhop text files¶
File writing class methods for aubellhop.
These files are the input files passed directly into the bellhop(3d).exe binaries.
The EnvironmentWriter class provides encapsulation of methods. It is not intended to be user-facing. It is the end of the chain for env writing:
~~bellhop.py~~ ~~environment.py~~ ~~writers.py~~ model_fn.write_env() → env.to_file() → EnvironmentWriter().write()
- class aubellhop.writers.EnvironmentWriter(env: Environment, file_handle: TextIO, fname_base: str, taskcode: str)[source]¶
Bellhop file-writer class which creates the .env and related input files.
- write() None[source]¶
Writes a complete .env file for specifying a Bellhop simulation
- Returns:
self.fname_base (str) – Filename base (no extension) of written file
We liberally insert comments and empty lines for readability and take care to
ensure that comments are consistently aligned.
This doesn’t make a difference to bellhop.exe, it just makes debugging far easier.