PartMC-Mosaic

Overview

MOSAIC (Model for Simulating Aerosol Interactions & Chemistry) interfaces with Particle-resolved Monte Carlo PartMC code for atmospheric aerosol simulation.

The PartMC-MOSAIC suite includes a number of programs, amongst them being:

    • CBM-Z which simulates lower tropospheric trace gas photochemistry for background, urban, biogenic, and marine (DMS) sub-regimes.
    • ASTEM solves the dynamic partitioning of semi-volatile species between gas and particle phases.
    • MESA solves the multicomponent solid-liquid equilibria within the aerosol phase.
  • MTEM computes the multicomponent activity coefficients of electrolytes in aqueous atmospheric aerosols.

Version 22.0 is installed on the CSF.

Restrictions on use

This version of the software is restricted to members of Zhonghua Zheng’s research group in Department of Earth and Environmental Sciences. All users who wish to use the software must request access to the ‘partmc-mosaic’ unix group and should familiarise themselves with the Terms and Conditions of the license as outlined below:

  1. MOSAIC and its submodules CBM-Z, ASTEM, MESA, and MTEM may not be included in any commercial package, or used for any commercial
    applications without prior authorization from the author.
  2. The MOSAIC code may be used for educational or non-profit purposes only. Any other usage must be first approved by the author.
  3. The MOSAIC code cannot be modified in any way or form or distributed without the author’s prior consent.
  4. No portion of the MOSAIC source code can be used in other codes without the author’s prior consent.
  5. The MOSAIC code is provided on an as-is basis, and the author bears no liability from its usage.
  6. Publications resulting from the usage of MOSAIC must cite the references below for proper acknowledgment.

All requests for access should be made to:

its-ri-team@manchester.ac.uk

Please copy Dr. Zhonghua Zheng on your request: zhonghua.zheng@manchester.ac.uk .

Set up procedure

To access PartMC-MOSAIC please load the following modulefile by entering:

module load apps/gcc/partmc-mosaic/22.0

Running the application

Please do not run partmc-mosaic on the login node. All jobs should be submitted to the compute nodes via batch.

Serial batch job submission

Ensure that all the necessary files for the scenario that needs to be run has been copied over to the scratch area:

 cp -r /opt/apps/apps/gcc/partmc/2.6.1/scenarios/1_urban_plume ~/scratch/

We now recommend loading modulefiles within your jobscript so that you have a full record of how the job was run. See the example jobscript below for how to do this. Alternatively, you may load modulefiles on the login node and let the job inherit these settings.

Create a batch submission script (which will load the modulefile in the jobscript), for example:

#!/bin/bash --login
#$ -cwd        # Job will run from the current directory

# Choose your required version and load the module. We also need gnuplot.
module load apps/gcc/partmc-mosaic/22.0
module load tools/gcc/gnuplot/5.2.7

# Go to your local copy of the plume files
cd ~/scratch/1_urban_plume

# Run partmc-mosaic bash scripts one after another.
./1_run.sh && ./2_process.sh && ./3_plot.sh

gnuplot -persist plot_species.gnuplot

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

If you need more RAM (memory) to complete the analysis successfully, and you may well do!, please add the flags mentioned at the high-memory jobs page for more information.

Example of a task-array batch job submission

cp -r /opt/apps/apps/gcc/partmc/2.6.1/scenarios/*_urban_plume* ~/scratch/task-array

Create a batch submission script (which will load the modulefile in the jobscript), for example:

#!/bin/bash --login
#$ -cwd        # Job will run from the current directory
#$ -t 1-2      # 2 tasks but ntasks can be increased to as many as required
#$ -j y

# Choose your required version and load the module. We also use gnuplot.
module load apps/gcc/partmc-mosaic/22.0
module load tools/gcc/gnuplot/5.2.7

# exit on error
set -e

# array for scripts
declare -a array
array=(1_run.sh 2_process.sh 3_plot.sh)

# Set I to the current task number (1, 2, ...) See -t line above.
I=$SGE_TASK_ID

# Go in to the directory according to number (1_urban_plume, 2_urban_plume, ...)
cd ${I}_urban_plume/

# create the out dir
if [ ! -d "out" ]; then
  mkdir out;
else
  echo "The directory out exists.";
fi

# checks for each script in the array
for i in ${array[@]}; do
  if [ ! -z "$i" ] && [ -e "$i" ] && [ -n "$i" ]; then
    FINDANDREPLACE='s,../../build/,,'
    sed -i -e $FINDANDREPLACE "$i"
    ./$i
  else
    echo "something is wrong, file ${array[i]} not found";
  fi
done

cd ..

Further info

Updates

None.

Last modified on September 27, 2023 at 4:50 pm by George Leaver