diff --git a/Makefile.am_BLUEPRINT b/Makefile.am_BLUEPRINT index 84f8965f59445e2b2193f959c4f62c0dc07d7b28..35571740a9ad07c637e8a3aa2648c8f30684a737 100644 --- a/Makefile.am_BLUEPRINT +++ b/Makefile.am_BLUEPRINT @@ -45,7 +45,19 @@ install-data-local: uninstall-local: rmdir $(DESTDIR)$(pkgdatadir)/compiled_mechs 2>/dev/null || : -all-local: +dist-hook: + chmod u+w $(distdir)/boxmox/wrapper + @sed 's/__BOXMOX_VERSION__/'$(VERSION)'/g' $(distdir)/boxmox/wrapper > tmp; mv tmp $(distdir)/boxmox/wrapper + chmod u+w $(distdir)/drv/boxmox.f90 + @sed 's/__BOXMOX_VERSION__/'$(VERSION)'/g' $(distdir)/drv/boxmox.f90 > tmp; mv tmp $(distdir)/drv/boxmox.f90 + chmod u+w $(distdir)/drv/boxmox_adjoint.f90 + @sed 's/__BOXMOX_VERSION__/'$(VERSION)'/g' $(distdir)/drv/boxmox_adjoint.f90 > tmp; mv tmp $(distdir)/drv/boxmox_adjoint.f90 + chmod u+w $(distdir)/scripts/new_BOXMOX_experiment + @sed 's/__BOXMOX_VERSION__/'$(VERSION)'/g' $(distdir)/scripts/new_BOXMOX_experiment > tmp; mv tmp $(distdir)/scripts/new_BOXMOX_experiment + chmod u+w $(distdir)/scripts/new_BOXMOX_experiment_from_example + @sed 's/__BOXMOX_VERSION__/'$(VERSION)'/g' $(distdir)/scripts/new_BOXMOX_experiment_from_example > tmp; mv tmp $(distdir)/scripts/new_BOXMOX_experiment_from_example + +install-data-hook: @echo " " @echo " --- YOU ARE GOOD TO GO ---" @echo " " diff --git a/boxmox/UserManual.tex b/boxmox/UserManual.tex index 55f24a77e77ff3d04e6dd5bb5f2d24b92cb8d53b..8290b6883283fb7cbea17642af9cac58170ea6ed 100644 --- a/boxmox/UserManual.tex +++ b/boxmox/UserManual.tex @@ -15,11 +15,11 @@ \ \\[8cm] {\LARGE BOXMOX extensions to KPP} \\[1cm] -Christoph Knote (christoph.knote@lmu.de)\\ -Meteorological Institute, LMU Munich, Germany +Christoph Knote (christoph.knote@med.uni-augsburg.de)\\ +Model-Based Environmental Exposure Science, Faculty of Medicine, University of Augsburg, Germany \\[1cm] -Version 1.8a\\ -09/2019 +Version 1.8\\ +03/2022 % version name comment % 0.9 CK initial release @@ -34,6 +34,7 @@ Version 1.8a\\ % 1.7 CK revamped mixing process options, included simple aerosol as % surface density area and radius % 1.8a CK implemented NOx fixing +% 1.8 CK move to GNU autotools for distribution \end{center} \thispagestyle{empty} @@ -46,11 +47,20 @@ Version 1.8a\\ \section*{Version history} -\subsection*{1.8a} +\subsection*{1.8} \textit{not released yet} New features +\begin{itemize} + \item Move to GNU autotools for distribution +\end{itemize} + +\subsection*{1.8a} +\textit{not released} + +New features + \begin{itemize} \item Implemented NO$_x$ fixing method for steady state calculations \end{itemize} @@ -200,49 +210,22 @@ doi:10.5194/acp-6-187-2006, 2006. \emph{BOXMOX is a Linux program, we assume you are working on a reasonably recent Linux distribution.} -You should have received or downloaded the \emph{install\_BOXMOX.bash} shell -script. The script is written in {\tt bash}, a shell that is installed on most -*nix machines, but might not be your default. Do not worry. Open the script in -your favorite text editor and adapt the user section to your machine. You need -to set +Requirements for installing and running BOXMOX: \begin{itemize} - \item absolute path to the location you want BOXMOX to be \item C compiler (usually {\tt gcc} or {\tt cc}) - \item C compile flags (if any) - \item absolute path to the FLEX binary (test with {\tt which flex}) - \item absolute path to the FLEX library (libfl.a, try {\tt type -a libfl.a}) + \item Fortran compiler ({\tt gfortran} is assumed) + \item flex (test with {\tt which flex}) + \item flex library (libfl.a, try {\tt type -a libfl.a}) + \item yacc or bison \end{itemize} -Save the file. Now execute it: +BOXMOX installation is then straightforward: \begin{verbatim} -me@mymachine> bash install_BOXMOX.bash - -BOXMOX extension to KPP (1.7) - -Output directory: /glade/u/home/knote/testy -C compiler: gcc -C compiler flags: -O -FLEX binary: /usr/bin/flex -FLEX library: /usr/lib64/libfl.a - -Downloading BOXMOX -Downloading KPP -Unpacking KPP -Patching KPP -Compiling KPP -Tex'ing BOXMOX readme (boxmox/README.pdf) - - --- YOU ARE GOOD TO GO --- - -Remember to set the following env. variables and -add them to your .bashrc. to remember them permanently: - -export KPP_HOME=/glade/u/home/knote/boxmox -export PATH=$KPP_HOME/bin:$PATH - -me@mymachine> +./configure --prefix= +make +make install \end{verbatim} Once you see the message ``YOU ARE GOOD TO GO'', everything should have worked @@ -288,7 +271,7 @@ me@mymachine> This creates a box model executable for the chosen mechanism (in this case, MOZART-4) which you can now use for your experiments. The executables can be -found in \emph{\$KPP\_HOME/boxmox/compiled\_mechs/\mech}. +found in \emph{\$KPP\_HOME/compiled\_mechs/\mech}. \subsubsection{{\tt new\_BOXMOX\_experiment}} diff --git a/build_dist.sh b/build_dist.sh index b3240471f00c8e79301fe63cf264050bbd4cacc0..ba9e14836bdfc4f8102b6c6a02ef11ad80e2df65 100755 --- a/build_dist.sh +++ b/build_dist.sh @@ -1,11 +1,20 @@ #!/bin/sh buildDir=$1 +echo +echo " --- pruning existing build dir ---" +echo + +if [ ! -z "$buildDir" ] +then + rm -rf $buildDir +fi + echo echo " --- prep Makefile.am ---" echo -# fancy shit: no wildcards in automake, add all files to be distributed with BOXMOX/KPP explicitly +# (1) fancy shit: no wildcards in automake, add all files to be distributed with BOXMOX/KPP explicitly cp Makefile.am_BLUEPRINT Makefile.am # list all files in these subdirectories diff --git a/configure.ac b/configure.ac index 48a5f1119b9391eff14a41de22dede30f9b382de..fb67220e04bd76bd9b5537ac07d53a959f42cf1b 100644 --- a/configure.ac +++ b/configure.ac @@ -6,19 +6,23 @@ AC_INIT([boxmox], [1.8], [christoph.knote@med.uni-augsburg.de]) dnl we use the build type foreign here instead of gnu because I do not have a NEWS file and similar, yet. AM_INIT_AUTOMAKE([-Wall foreign tar-pax]) AC_PROG_CC -if test x$CC = "x" ; then +if test "x$CC" = "x" ; then AC_MSG_ERROR([C compiler is required to build KPP.]) fi AC_PROG_LEX(noyywrap) -if test x$LEX = "x" ; then +if test "x$LEX" = "x" ; then AC_MSG_ERROR([flex is required to build KPP.]) fi AC_PROG_YACC -if test x$YACC = "x" ; then +if test "x$YACC" = "x" ; then AC_MSG_ERROR([bison or yacc is required to build KPP.]) fi +AC_PROG_SED +if test "x$SED" = "x" ; then + AC_MSG_ERROR([sed is required to build BOXMOX.]) +fi AC_PROG_FC -if test x$FC = "x" ; then +if test "x$FC" = "x" ; then AC_MSG_ERROR([Fortran compiler is required to build BOXMOX mechanisms.]) fi AC_PROG_MKDIR_P diff --git a/scripts/list_BOXMOX_mechanisms b/scripts/list_BOXMOX_mechanisms index 7113d8ca3638e2b7152d708e0b0fa69d61f7e5b5..433bf515171433a0905720435d300b3188105c7e 100755 --- a/scripts/list_BOXMOX_mechanisms +++ b/scripts/list_BOXMOX_mechanisms @@ -29,7 +29,7 @@ validate_BOXMOX_installation || { echo "Validating BOXMOX installation failed"; BOXMOX_MECH_PATH=${KPP_HOME}/compiled_mechs if [ ! -z $(ls -A ${BOXMOX_MECH_PATH}) ]; then - for mech in $(find ${BOXMOX_MECH_PATH}/*) + for mech in $(ls -1 -d ${BOXMOX_MECH_PATH}/*) do mechList+=($(basename $mech)) done @@ -37,7 +37,7 @@ fi if $all then - for mech in $(find ${KPP_HOME}/models/*.eqn) + for mech in $(ls -1 ${KPP_HOME}/models/*.eqn) do mechi=$(basename $mech) mechList+=(${mechi/.eqn/})