Praveen Chandrashekar

Centre for Applicable Mathematics, TIFR, Bangalore

[ People | Codes | Talks | Teaching | Publications | Calendar | Contact ]


Installing using Conda

I have installed Clawpack using Conda. It is better to create a separate environment for this purpose

conda create -n claw

You can see a list of environments using

conda env list

To activate the environment

conda activate claw

Once you are inside this environment, install clawpack using pip, see here for more details.

Now you can run Clawpack programs. Once you are done, you can deactivate the environment

conda deactivate

If you want to delete an environment

conda remove -n claw —-all

Installing Clawpack fortran

See here for installation steps

git clone
cd clawpack
git checkout v5.9.0     # or an older version; `git tag -l` to list options
git submodule init      # for repositories pyclaw, clawutil, visclaw, etc.
git submodule update    # clones all the submodule repositories
export CLAW=/full/path/to/clawpack    # in bash

Test a fortran example

The following command does all the steps: compile, run and make plots

make .plots

Open _plots/_PlotIndex.html file to see the results.

Install clawpack using conda

This does not seem to give the classic fortran version.

unset CLAW PYTHONPATH   # These might interfere if set to something already.
conda create -n claw
conda activate claw
conda install clawpack
conda install nose ipython

Test pyclaw: start ipython and

from clawpack.pyclaw import examples
claw = examples.shock_bubble_interaction.setup()

Examples from the book

The original set of examples designed to run with clawpack-4.3 are here. To run these, download Clawpack-4.3 and set CLAW to the path where it is located. Visualizing the results requires matlab.

Some of these have been converted to run with newer version of clawpack, see here and here. You can get the code like this

cd $CLAW  # or where ever you want apps to be
git checkout master
git clone --recursive

The book examples are in the directory apps/fvmbook.