You can follow the same procedure for Linux, except that csh probably is already installed at /bin/csh and gfortran needs to be installed differently (see this post).
Tuesday, October 19, 2010
Installing Bruzual & Charlot 2003 (GALAXEV) on Debian Squeeze
The installation procedure is confusing only if you are not using CSH (I use BASH) and if g77 is not available. Otherwise you can simply follow the installation procedure outlined in the official documentation file (i.e., bc03/doc/bc03.ps.gz).
First, you definitely need csh and a FORTRAN compiler:
$ sudo apt-get install csh gfortran
Download from the B&C 2003 website the following tarballs (assuming here they are saved under /usr/local/SED):
bc03.doc.tar.gz bc03.models.padova_1994_chabrier_imf.tar.gz bc03.models.padova_1994_salpeter_imf.tar.gz bc03.src.tar.gz bc03.templates.tar.gz
Uncompress and untar all these at once by
for i in *.tar.gz; do tar -xvzf $i; done
This will create the directory bc03 under /usr/local/SED and all the subdirectories (bc03/doc, bc03/models, bc03/src, bc03/templates) should be filled with files.
Unfortunately the setup file only exists for csh (bc03/src/.bc_cshrc), so you need to create one for yourself. Save the following to a file at bc03/src/.bc_bash:
export FILTERS="$bc03/FILTERBIN.RES" export A0VSED="$bc03/A0V_KURUCZ_92.SED" export RF_COLORS_ARRAYS="$bc03/RF_COLORS.filters" #################################################### alias add='csh $bc03/add_bursts.sh' alias csp='csh $bc03/csp_galaxev.sh' alias vdisp='csh $bc03/vel_disp.sh' alias cmev='csh $bc03/cm_evolution.sh' alias dgr='csh $bc03/downgrade_resolution.sh' alias gpl='$bc03/galaxevpl' alias zmag='$bc03/zmag'
(This file is actually provided by default in C&B 2007, which you should be using instead of the 2003 version.) Furthermore, you need to modify a line in bc03/src/Makefile to use gfortran instead of g77:
#FC = g77 -ffixed-line-length-132 # comment out this line and add: FC = gfortran -ffixed-line-length-none
Then compile the programs:
$ bc03=/usr/local/SED/bc03/src $ cd $bc03 $ . .bc_bash $ make all
Add the following lines to ~/.bashrc and all the commands for GALAXEV will be available (as aliases):
export bc03=/usr/local/SED/bc03/src . $bc03/.bc_bash
That’s it.