Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,19 @@ If you see error messages about missing software (for example, telling you that

Run make install `make install`. This will create an executable file called cme in the CoastalME folder.

Edit cme.ini to tell CoastalME which input file to read (for example, in/test_suite/minimal_wave_angle_230/minimal.dat). You'll need to make sure that the "Path for output" listed in cme.ini (for example, out/test_suite/minimal_wave_angle_230) exists. If it doesn't exist, then create it: `mkdir -p out/test_suite/minimal_wave_angle_230/`.
CoastalME supports two configuration file formats: `.ini` (legacy) and `.yaml` (modern).

**Using YAML format (recommended)**:
Edit `cme.yaml` to specify input and output paths. Example:
```yaml
input_data_file: in/test_suite/minimal_wave_angle_230/minimal.yaml
output_path: out/test_suite/minimal_wave_angle_230/
```

**Using legacy .ini format**:
Edit `cme.ini` to tell CoastalME which input file to read (for example, in/test_suite/minimal_wave_angle_230/minimal.dat). You'll need to make sure that the "Path for output" listed in cme.ini (for example, out/test_suite/minimal_wave_angle_230) exists. If it doesn't exist, then create it: `mkdir -p out/test_suite/minimal_wave_angle_230/`.

**Note**: CoastalME will automatically detect which format to use. If both `cme.yaml` and `cme.ini` exist, `cme.yaml` takes priority.

Run cme `./cme`. Output will appear in the "Path for output" folder.

Expand Down
32 changes: 32 additions & 0 deletions cme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#======================================================================================================================
#
# CoastalME initialization file (YAML format)
#
# Copyright (C) 2024 David Favis-Mortlock and Andres Payo
#
#=====================================================================================================================
#
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#======================================================================================================================

# Path to the main input configuration file (.dat or .yaml)
# Can be absolute or relative to the directory containing this file
input_data_file: /home/wilfchun/CoastalME/CoastalME_data_local/Typology/Cliff/in/cliff.yaml

# Path for output files
# Can be absolute or relative to the directory containing this file
# IMPORTANT: A trailing slash is required
output_path: /home/wilfchun/CoastalME/CoastalME_data_local/Typology/Cliff/out/

# Email address for notification messages (optional, Linux only)
# Uncomment to enable email notifications
# email_address: user@example.com
16 changes: 14 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,22 @@ elseif(CMAKE_BUILD_TYPE_LC STREQUAL "relwithdebinfo")
add_compile_options(
-march=native
-O3
-g3
-gdwarf-3
-fopenmp
# -foffload=nvidia-ptx
-ffast-math
-fno-omit-frame-pointer
# -Wall
-fno-delete-null-pointer-checks
-fno-strict-overflow
-fno-strict-aliasing
-ftrivial-auto-var-init=zero
-flto=auto
)
add_link_options(
-flto=auto
-rdynamic
)
if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|QCC)$")
# Production build using gcc
Expand Down Expand Up @@ -239,6 +250,7 @@ elseif(CMAKE_BUILD_TYPE_LC STREQUAL "release")
-fno-strict-overflow
-fno-strict-aliasing
-ftrivial-auto-var-init=zero
-flto
)
if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|QCC)$")
# Production build using gcc
Expand All @@ -251,9 +263,9 @@ endif()

# Finally set some gcc-specific linker flags, for all build types
if(UNIX)
add_link_options(-Wl)
# add_link_options(-Wl)
if(LINUX)
add_link_options(--as-needed -Wl,--no-undefined)
# add_link_options(--as-needed -Wl,--no-undefined)
elseif(APPLE)
endif()
endif()
Expand Down
90 changes: 45 additions & 45 deletions src/assign_landforms.cpp

Large diffs are not rendered by default.

96 changes: 54 additions & 42 deletions src/calc_shadow_zones.cpp

Large diffs are not rendered by default.

663 changes: 298 additions & 365 deletions src/calc_waves.cpp

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,9 @@ class CGeomCell
void SetDownDriftZoneNumber(int const);
int nGetDownDriftZoneNumber(void) const;
};

// Include inline implementations for CGeomRasterGrid::Cell() methods
// Must be included here after CGeomCell is fully defined to avoid circular dependency
#include "raster_grid_inline.h"

#endif // CELL_H
Loading