PartMC - Particle-resolved Monte Carlo code for atmospheric aerosol simulation
Version 1.1.0
Released 2008-02-17
http://www.mechse.uiuc.edu/research/mwest/partmc/
Copyright (C) 2005-2008 Nicole Riemer and Matthew West
Portions copyright (C) Andreas Bott and Richard Easter
Licensed under the GNU General Public License version 2 or (at your
option) any later version.
For details see the file COPYING or
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
Required dependencies:
Optional dependencies:
PartMC can be compiled out-of-the-box on Fedora 8 with all dependencies except MOSAIC if the following packages are installed:
The various helper scripts and testcases assume a Unix environment (tested on Fedora 8 Linux and OS X 10.4). The Makefile requires GNU make. The default compiler is gfortran.
To build TAGS or the .deps dependency files set DEV_BUILD = yes
in
the Makefile. The .deps dependency files are rebuilt using
tool/f90_mod_deps.py
, which requires Python.
The NetCDF libraries are required to compile PartMC. The netcdf.mod
Fortran 90 module file is required, and it must be produced by the
same compiler being used to compile PartMC.
PartMC can interface to the MOSAIC chemistry code (see above for
availability) but this is not enabled by default. To use MOSAIC,
uncomment the MOSAIC_LIB
and MOSAIC_FLAG
variables in the Makefile
and set MOSAIC_MODDIR
and MOSAIC_LIBDIR
to the appropriate
directories. If MOSAIC is built in /opt/mosaic
, for example, then
MOSAIC_MODDIR
should be -I/opt/mosaic/datamodules
and
MOSAIC_LIBDIR
should be -L/opt/mosaic
. Without MOSAIC support the
test/mosaic
testcase in PartMC will fail.
The main partmc
command reads .spec
files and does the run
specified therein. Either Monte Carlo runs, sectional code runs, or
exact solutions can be generated. A run produces binned summary data
in a NetCDF file which can be plotted with the included python
scripts. Monte Carlo runs can also output the full internal state in
an ASCII format that can then be processed with partmc -p
to produce
the same summary NetCDF data.
There are a number of examples provided in the test
directory that
can be run by the run.sh
scripts. These use the python scripts with
ScientificPython and Pyx to plot the results.
The code is mainly Fortran 90, with a few parts still clearly showing their Fortran 77 heritage.
Extensive use is made of Fortran 90 derived types and pointers for
dynamic memory allocation of arrays inside derived types. Derived
types are named my_type_t
and are generally defined in modules named
pmc_mod_my_type
within files named my_type.f90
. Each derived type
has allocation and deallocation functions my_type_alloc()
and
my_type_free()
, respectively.
The auto-generation of module dependencies relies on a particular
naming convention. The module names must be the same as the name of
the containing file, but prefixed with pmc_mod_
. Thus the module
pmc_mod_condensation
is contained in the file
condensation.f90
. The dependencies are autogenerated by the
tool/f90_mod_deps.py
python script, which is called automatically by
the Makefile to regenerate dependencies if DEV_BUILD = yes
is set.
To debug the parallel code run it with:
om-mpiexec --mca mpi_abort_delay -1 -n 2 ../src/partmc golovin_mc.spec
then run the debugger with:
gdb ../src/partmc <pid>
and use bt
to get a backtrace.
To turn on MPI debugging info add the -d
parameter to
mpiexec/mpirun
. To restrict the transport to only TCP use the --mca
btl tcp
option.
1.1.0 - 2008-02-17
Internal reorganization to use Fortran 90 derived types for the data structures.
Integration with the MOSAIC gas- and aerosol-chemistry code.
Output is in binary NetCDF format.
Parallel implementation using 1D mixing.
1.0.0 - 2007-02-26