Package: rafem
AboutThe River Avulsion and Floodplain Evolution Model (RAFEM) is a morphodynamic
model designed to be coupled with the Coastline Evolution Model (CEM).Documentation is currently being updated (5/9/19). Please seeour paper,Exploring Wave and Sea‐Level Rise Effects on Delta Morphodynamics With a
Coupled River‐Ocean Modelfor a detailed model description.RequirementsRafemrequires Python 3.Apart from Python,Rafemhas a number of other requirements, all of which
can be obtained through eitherpiporconda, that will be automatically
installed when you installRafem.To see a full listing of the requirements, have a look at the project’srequirements.txtfile.If you are a developer ofRafemyou will also want to install
additional dependencies for runningRafem’s tests to make sure
that things are working as they should. These dependencies are listed
inrequirements-testing.txt.InstallationTo installRafem, first create a new environment in
whichRafemwill be installed. This, although not necessary, will
isolate the installation so that there won’t be conflicts with your
basePythoninstallation. This can be done withcondaas:$ conda create -n rafem python=3
$ conda activate rafemStable ReleaseRafem, and its dependencies, can be installed either withpiporconda. Usingpip:$ pip install rafemUsingconda:$ conda install rafem -c conda-forgeFrom SourceAfter downloading theRafemsource code, run the following fromRafem’s top-level folder (the one that containssetup.py) to
installRafeminto the current environment:$ pip install -e .Input FilesRafem Parameter FileThe mainRafeminput file is a yaml-formatted text file that lists
parameter values for the various components. Running the following will
print a sampleRafemparameter file:$ rafem show rafemshape:-120-200spacing:-0.1-0.1n0:5.0nslope:0.001max_rand:0.1days:7dt_day:0.01rand_seed:623Initial_SL:0.0SLRR_m:0.0SubRate_m:0.0Sub_Start:0ch_width:10.0ch_depth:1.0ch_discharge:10.0A:1.0c_f:0.01C_0:1.0sed_sg:2.65init_cut_frac:1super_ratio:1.0short_path:1WL_Z:0.0WL_dist:0blanket_rate_m:0.0fine_dep_frac:0.0splay_type:2saveavulsions:falsesavecourseupdates:falseOutput FilesThere are three main sets of output files. These are writen to theoutputfolder as the model is running.
*output/elevation: elevations of the entire model grid.
*output/profile: elevations along the river profile
*output/river: x, and y coordinates of the river profileEach of these files is a CSV formatted text file. To create a plot
of one of these output files, use theplotsubcommand. For example:$ rafem plot elevationwill plot the final elevations for the simulation in the current directory.
Userafem plot –helpto see further options.ExamplesTo run a simulation using the sample input files described above, you first
need to create a set of sample files. This can be done by hand or by runningrafem setupto get a default set of parameters that you can then edit.
For example:$ mkdir example
$ cd example
$ rafem setupThis command has created a new file,rafem.yaml, that you can edit for your
simulation.  To runrafemusing this file:$ rafem runThis will have create a new folder,output, that contains the output files.
You can look at some of the output with theplotsubcommand. For example,
the following will create a plot the final elevations:$ rafem plot elevationUse the–helpoption to get help about other command line options.