Model:CEM: Difference between revisions
m (Text replacement - "{{End headertab}}" to "{{End headertab}} {{{{PAGENAME}}_autokeywords}}") |
No edit summary |
||
Line 29: | Line 29: | ||
|Phone=919 681-5069 | |Phone=919 681-5069 | ||
|Fax=919 684-5833 | |Fax=919 684-5833 | ||
}} | |||
{{Additional modeler information | |||
|Additional first name=Andrew | |||
|Additional last name=Ashton | |||
|Additional institute / Organization=WHOI | |||
|Additional town / City=Woods Hole | |||
|Additional postal code=02543 | |||
|Additional country=United States | |||
|Additional state=Massachusetts | |||
|Additional email address=aashton@whoi.edu | |||
}} | }} | ||
{{Model technical information | {{Model technical information |
Revision as of 08:44, 17 May 2022
CEM
Metadata
|
|
Introduction
NOTE: This page is still under development. Some information may be incorrect. When we believe everything is correct, we'll remove this message.
Coastline Evolution Model: Introduction
This site hosts the source code for the Coastline Evolution Model (CEM) from Duke University. To find out more technical details of this model, please see above. This purpose of the instructions on this page are to explain how to download, compile, and use the model.
Please keep in mind this is an open-source project, not shrink-wrapped software. So it may require a bit of effort to get running on your own system. The source code is very-well documented however, and we'd encourage you to extend it for your own purposes.
The source code is licensed under the Berkeley Standard Distribution (BSD) license.
Supported Systems & Requirements
Currently, the source code has only been run on Linux CentOS (which is a variation of RedHat Linux). It has also been successfully used on Mac OSX and Solaris, but the Makefiles will need slight tweaks on those systems. We'd appreciate any help getting the model to run on systems other than Linux!
The model code is written in C and requires the GNU Compiler Collection (GCC), preferably under version 4.0.2 or greater. It has also been run under GCC v2.9.6. Please do not use the GCC v3.x.x compiler series; we have run into issues with them.
The model code requires two libraries to be installed on your system:
- libxml2: Normally this comes standard with Linux
- libjpeg: You may need to download this from http://www.ijg.org/
You may need to tweak the Makefile to compile if you have these two libraries installed in a non-standard location; contact us for help.
Compiling the Source Code
Once you have downloaded the source code, you can compile it using the UNIX/Linux 'make' utility (which should come standard with your Operating System). It is probably worthwhile to edit the Makefile in the cem/ and cem/tools/ directories to set the options you want. There are further instructions there.
To compile from the cem/ directory, simply enter the 'make' command. It compiles the model into an executable named 'cem'. It also compiles the tools/ subdirectory.
Running the CEM Model
The CEM model is a command-line driven program. It has no GUI (Graphical User Interface). It takes several inputs:
- An XML-based configuration file
- An initial shoreline, in a custom binary (SPX) format
- A set of wave forcings, in a custom binary (WVX) format
It generates several outputs:
- A set of model shorelines during the simulation and at the end of the simulation in either SPX or JPEG (picture) format
- A debug file
Once you have generated the configuration file, the initial shoreline, and the set of wave forcings (described below), you can run the model on the command-line as follows:
% cem --config=<path to config file>/config.xml
Note that the 'cem' executable must be in your path, and <path to config file> is the directory in which the XML configuration file is located.
The XML-based Configuration File
A text-based XML-formatted file sets configuration options for CEM. You can find an example in the xml/ subdirectory. Please use that example config.xml for your own purposes. The configuration options are relatively straight forward with brief explanations below.
- paths:output: The directory in which all output from the model will be stored
- input:initial_profile: The location of your initial shoreline (SPX) file
- input:waves: The location of your wave forcings (WVX) file
- output:debug_file: The name of the file to write debug information to
- output:final_spx: The name of the final shoreline (SPX) when the simulation is done
- output:final_jpg: The name of the final shoreline as a JPEG image
- output:jpeg: Output the model shoreline as a JPEG image at intervals during the simulation. Each JPEG file will named according to a file prefix, and a 'frame' number, where you can specify the initial frame number, the number of digits to print in the frame number, and the timestep interval of when to output a new JPEG
- output:spx: Output the model shoreline (SPX) at intervals during the simulation
- simulation:number_threads: Parallelize the computation of key algorithms in the model. Typical values are 2, 4, 8.
- simulation:timesteps: The number of timesteps to conduct the simulation
- simulation:timesteps_per_wave: The number of timesteps to use the same wave before selecting a new wave from the wave forcings file
- simulation:days_per_timestep: The number of simulated days per model timestep, typically either 0.1 or 1.
- boundary_conditions: Typically "periodic".
- ast_rate: To scale the rate of alongshore sediment transport constant.
Creating an Initial Shoreline (SPX) File
There is a utility program in the tools/ directory, called 'spxcreate' to create an initial shoreline. This utility creates model shorelines that are initially straight or have small initial perturbations. The utility works off a set number of predefined shorelines; you have the ability to override any individual attribute of the initial shoreline.
For example,
% spxcreate "Rough Beach 100m"
will create an initially straight shoreline with small perturbations that is 150 cells alongshore, 100 cells cross-shore, where each cell is 100 m on each side. If you want to make an initial shoreline with an alongshore length of 300 cells instead, you can do something like
% spxcreate "Rough Beach 100m" ALONG=300
Please see the source code (tools/spxcreate.c) for more documentation. Typically, cells in the shoreline have widths of either 100 m or 1000 m.
Creating a Wave Forcings (WVX) File
There is a utility program in the tools/ directory, called 'wvxcreate' to create an initial shoreline. This utility creates waves according to two parameters: the proportion of waves approaching from high angles and the proportion of the waves approach from the left (looking off-shore).
For example,
% wvxcreate -n 5000 -d 0.60 -h 0.55 -w 1.7 -f waves.wvx
will create a file named 'waves.wvx' that contains 5000 waves. Each wave has a height of 1.7m and 60% of the wave influences approach from the left (looking off-shore) and 55% of the wave influences approach from high-angle.
Note that you must generate enough waves for your simulation. The number of waves is simply the number of timesteps of your simulation divided by the number of timesteps per wave as set in your config.xml file.
Processing the Output
The CEM model lets you generate both shoreline (SPX) files and picture (JPEG) files at any point during the simulation. If you wish to generate a text file of the positions of the beach (the dividing line between the ocean and land), you may use the 'spxposition' utility located in the tools/ directory. You can then import this text file into other programs (e.g. MATLAB). The usages of the 'spxposition' utility is simple:
% spxposition <spx file>
References
Nr. of publications: | 13 |
Total citations: | 1614 |
h-index: | 9 |
m-quotient: | 0.38 |
Featured publication(s) | Year | Model described | Type of Reference | Citations |
---|---|---|---|---|
Ashton, Andrew; Murray, A. Brad; Arnoult, Olivier; 2001. Formation of coastline features by large-scale instabilities induced by high-angle waves. Nature, 414, 296–300. 10.1038/35104541 (View/edit entry) | 2001 | CEM |
| 484 |
Ashton, A.D.; Murray, A.B. 2006. High-angle wave instability and emergent shoreline shapes: 1. Modeling of sand waves, flying spits, and capes. Journal of Geophysical Research, 111, . 10.1029/2005JF000422 (View/edit entry) | 2006 | CEM |
Model overview | 320 |
Murray, A.B. 2011. CEM, version 0.1.1.. , , https://csdms.colorado.edu/pub/models/doi-source-code/cem-10.1594.IEDA.100100-0.1.tar.gz. 10.1594/IEDA/100100 (View/edit entry) | 2011 | CEM |
Source code ref. | 0 |
See more publications of CEM |