Can you provide a little more explanation on how to build a bathymetry file for use in Celeris with the 'write_bathy.m' matlab script? I'd like to build a bathymetry from a source xyz file but I am having difficulty getting the script to work correctly. The user manual provides some brief explanation but is not thorough. Thanks!

Search

Thanks Scott for your interest in Celeris. I believe we resolved this issue via email, but for the record, let's readdress it here as well.

Celeris bathymetry file (.cbf) is a matrix of z (height) values in text format with a given grid resolution (nx * ny). If this resolution is different from the one declared in the input .cml file, Celeris will generate the bathymetry by interpolating.

So, the first step in converting an xyz bathymetry is to convert it to a meshgrid format. This is easy in MATLAB. The result will be a matrix of size nx * ny, where the values are bathymetry/topography height. After this step one can easily use the function declared in "write_bathy.m" to write the matrix to a cbf file. Note that, there is a similar function written in Python, for those without access to MATLAB, or the fans of open source. Thanks again for posting your question in our Community page, so other may also find it helpful.