diff --git a/README.md b/README.md index c17057810be4c9a57ac3fb072c48b2b257eddbb1..020baa86ac8e454cf67a1f02da2c4067d37de28b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ We are looking forward to receiving your [new issue report](https://mbees.med.un If you'd like to contribute source code directly, please [create a fork](https://mbees.med.uni-augsburg.de/gitlab/mbees/boxmox), make your changes and then [submit a merge request](https://mbees.med.uni-augsburg.de/gitlab/mbees/boxmox/-/merge_requests/new) to the original project. +## Building a distribution + +Once forked, you can create your own distributable archive using the `build_dist.sh` script, which takes the build directory as argument. + ## Citation Please cite our work when BOXMOX use constituted a relevant contribution to your scientific work. The citation for BOXMOX is [Knote et al., Atm. Env., 2015](http://dx.doi.org/10.1016/j.atmosenv.2014.11.066). @@ -26,7 +30,7 @@ Please cite our work when BOXMOX use constituted a relevant contribution to your KPP (adjoint) driver for BOXMOX. -`drv/wrapper` +`boxmox/wrapper` This is where all BOXMOX extension code lives. @@ -34,7 +38,7 @@ This is where all BOXMOX extension code lives. Test cases for BOXMOX usage. -`doc/boxmox_README.tex` +`boxmox/boxmox_README.tex` BOXMOX documentation. diff --git a/tools/create_BOXMOX_patch.bash b/tools/create_BOXMOX_patch.bash deleted file mode 100644 index 0fb9106d742c3a125090a89bd6e241709e3e224d..0000000000000000000000000000000000000000 --- a/tools/create_BOXMOX_patch.bash +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -boxmoxVersion=1.8 -kppVersion=2.2.3 -kppFile=kpp-2.2.3_Nov.2012.tar.gz - -boxmoxDir=boxmox -kppDir=kpp-$kppVersion -wrkDir=patch_wrk_dir - -prepScript=$(pwd)/prep_BOXMOX_src_directory.bash - -patchName=$(pwd)/boxmox_${boxmoxVersion}_${kppVersion}.patch - -tar xvzf $kppFile - -# copy both directories here to have relative paths -rm -rf $wrkDir -mkdir -p $wrkDir - -cp -r $boxmoxDir $wrkDir/boxmox -mv $kppDir $wrkDir/kpp - -cd $wrkDir - -bash ${prepScript} boxmox ${boxmoxVersion} - -diff -rupwN kpp boxmox > ${patchName} - -exit 0 diff --git a/tools/install_BOXMOX.bash b/tools/install_BOXMOX.bash deleted file mode 100644 index 5965c06601a0fedf4c924a06c48d2306178d3401..0000000000000000000000000000000000000000 --- a/tools/install_BOXMOX.bash +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -# BOXMOX extensions to KPP - installation script -# -# execute as -# me@mymachine> bash install_BOXMOX.bash -# -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -# -# 1.0 Christoph Knote - NCAR/ACD - knote@ucar.edu - 06/2014 -# 1.1 Christoph Knote - NCAR/ACD - knote@ucar.edu - 07/2014 -# updates to the MOZART mechanism -# 1.2 Christoph Knote - LMU - christoph.knote@lmu.de - 08/2015 -# various updates to BOXMOX -# 1.3 Christoph Knote - LMU - christoph.knote@lmu.de - 11/2015 -# new Namelist feature, various code updates -# 1.4 Christoph Knote - LMU - christoph.knote@lmu.de - 09/2016 -# included MCM and other mechanisms, code updates -# 1.5 Christoph Knote - LMU - christoph.knote@lmu.de - 11/2016 -# new commands included for simplified usage, code updates -# 1.6 Christoph Knote - LMU - christoph.knote@lmu.de - 02/2017 -# ability to create adjoint using prepare_BOXMOX_mechanism -# 1.6.1 Christoph Knote - LMU - christoph.knote@lmu.de - 02/2017 -# bugfix release -# 1.7 Christoph Knote - LMU - christoph.knote@lmu.de - 12/2017 -# new file format, heterogeneous reactions/aerosol, dilution -# 1.8 Christoph Knote - UniA - christoph.knote@med.uni-augsburg.de - 11/2021 -# first release from new website at University Augsburg -# -# USER SECTION - -# This is where your BOXMOX will be -boxmoxDir=$(pwd)/boxmox - -# your C compiler - gcc should be fine on most systems -CC=gcc - -# the FLEX lexical analyzer - check via "which flex" -FLEX=$(which flex 2> /dev/null) - -# the FLEX library directory - on Linux try via "type -a libfl.a", -# if this fails it is usually somewhere close to the binary (e.g. in ../lib) -FLEX_LIB_DIR=/usr/lib/x86_64-linux-gnu - -# your C compiler flags (if any). Note: separate multiple arguments by spaces and enclose in quotation marks. -CC_FLAGS="-g -Wall" - -# standard headers -INCLUDE_DIR=/usr/include - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -# nothing to be changed beyond this point... - -boxmoxVersion=1.8 - -# see if we have everything we need -hash sed >/dev/null 2>&1 || { echo "BOXMOX installer needs 'sed'"; exit 1; } -hash make >/dev/null 2>&1 || { echo "BOXMOX installer needs 'make'"; exit 1; } -hash bison >/dev/null 2>&1 || { echo "BOXMOX installer needs 'bison'"; exit 1; } - -# see if the given options make sense -hash $CC >/dev/null 2>&1 || { echo "C compiler $CC unknown"; exit 1; } -[ -f $FLEX ] || { echo "No FLEX executable found at $FLEX"; exit 1; } -[ -f $FLEX_LIB_DIR/libfl.a ] || { echo "No FLEX library found in $FLEX_LIB_DIR"; exit 1; } -[ -d $INCLUDE_DIR ] || { echo "No include directory found at $INCLUDE_DIR"; exit 1; } - -hash gfortran >/dev/null 2>&1 || { echo "Note: BOXMOX will need 'gfortran' or another Fortran compiler."; } - -# let's go - describe what's gonna happen -echo " " -echo "BOXMOX extension to KPP (${boxmoxVersion})" -echo " " -echo "Output directory: $boxmoxDir" -echo "C compiler: $CC" -echo "C compiler flags: $CC_FLAGS" -echo "FLEX binary: $FLEX" -echo "FLEX library: $FLEX_LIB_DIR/libfl.a" -echo " " - -[ -z $KPP_HOME ] || { echo "The KPP_HOME variable is set (to '${KPP_HOME}'), it seems there is already another KPP/BOXMOX installation. Make sure to update your \$KPP_HOME and \$PATH variables after this new installation."; echo ""; } - -mkdir -p $boxmoxDir || { echo "Could not create BOXMOX directory $boxmoxDir"; exit 1; } - -cd $boxmoxDir - -# make (missing) bin subfolder -mkdir -p bin - -mv Makefile.defs Makefile.defs.BACK - -sed "s|CC=.*|CC=$CC|;s|CC_FLAGS=.*|CC_FLAGS=$CC_FLAGS|;s|FLEX=.*|FLEX=$FLEX|;s|FLEX_LIB_DIR=.*|FLEX_LIB_DIR=$FLEX_LIB_DIR|;s|INCLUDE_DIR = .*|INCLUDE_DIR = $INCLUDE_DIR|" Makefile.defs.BACK > Makefile.defs -[[ $? ]] || { echo "Could not patch Makefile.defs"; exit 1; } - -make &> compile.log - -[ -f bin/kpp ] || { echo "Could not compile BOXMOX - see compile.log"; exit 1; } - -export KPP_HOME=$boxmoxDir -export PATH=$KPP_HOME/bin:$KPP_HOME/boxmox/bin:$PATH - -echo " " -echo " --- YOU ARE GOOD TO GO ---" -echo " " -echo "Remember to copy the following lines into" -echo "your .bashrc (a hidden file in your home directory)" -echo "so they are executed upon login:" -echo " " -echo "export KPP_HOME=$boxmoxDir" -echo "export PATH=\$KPP_HOME/bin:\$KPP_HOME/boxmox/bin:\$PATH" -echo " " - - diff --git a/tools/kpp-2.2.3_Nov.2012.tar.gz b/tools/kpp-2.2.3_Nov.2012.tar.gz deleted file mode 100644 index e0455673c17c38ec24f0217eb0dbebf314c1c9dc..0000000000000000000000000000000000000000 Binary files a/tools/kpp-2.2.3_Nov.2012.tar.gz and /dev/null differ diff --git a/tools/prep_BOXMOX_src_directory.bash b/tools/prep_BOXMOX_src_directory.bash deleted file mode 100644 index 07a19351d2e3e3c33bc0b3f2ee75c5e24984c4bc..0000000000000000000000000000000000000000 --- a/tools/prep_BOXMOX_src_directory.bash +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -boxmoxDir=$1 -boxmoxVersion=$2 - -# now clean up the superfluous directories and files -rm -rf ${boxmoxDir}/boxmox/compiled_mechs -find . -name "*.DS_Store" -delete -find . -name "*~" -delete -find . -name "*.log" -delete -find . -name "*.aux" -delete -find . -name "*.o" -delete -find . -name "*.dvi" -delete -find . -name "*synctex*" -delete -find . -name "*_CSIRO*" -delete -find . -name "*NO_NO2*" -delete - -# replace BOXMOX version strings -sed -i 's/__BOXMOX_VERSION__/'${boxmoxVersion}'/g' ${boxmoxDir}/boxmox/wrapper -sed -i 's/__BOXMOX_VERSION__/'${boxmoxVersion}'/g' ${boxmoxDir}/boxmox/boxmox.f90 -sed -i 's/__BOXMOX_VERSION__/'${boxmoxVersion}'/g' ${boxmoxDir}/boxmox/boxmox_adjoint.f90 -sed -i 's/__BOXMOX_VERSION__/'${boxmoxVersion}'/g' ${boxmoxDir}/boxmox/bin/new_BOXMOX_experiment -sed -i 's/__BOXMOX_VERSION__/'${boxmoxVersion}'/g' ${boxmoxDir}/boxmox/bin/new_BOXMOX_experiment_from_example