{"id":6934,"date":"2023-07-03T10:39:52","date_gmt":"2023-07-03T09:39:52","guid":{"rendered":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/?page_id=6934"},"modified":"2025-10-15T10:42:03","modified_gmt":"2025-10-15T09:42:03","slug":"partmc-mosaic","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/applications\/partmc\/partmc-mosaic\/","title":{"rendered":"PartMC-Mosaic"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>MOSAIC (Model for Simulating Aerosol Interactions &amp; Chemistry) interfaces with Particle-resolved Monte Carlo PartMC code for atmospheric aerosol simulation.<\/p>\n<p>The PartMC-MOSAIC suite includes a number of programs, amongst them being:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>CBM-Z which simulates lower tropospheric trace gas photochemistry for background, urban, biogenic, and marine (DMS) sub-regimes.<\/li>\n<li>ASTEM solves the dynamic partitioning of semi-volatile species between gas and particle phases.<\/li>\n<li>MESA solves the multicomponent solid-liquid equilibria within the aerosol phase.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>MTEM computes the multicomponent activity coefficients of electrolytes in aqueous atmospheric aerosols.<\/li>\n<\/ul>\n<p>Version 22.0 is installed on the CSF.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>This version of the software is restricted to members of Zhonghua Zheng&#8217;s research group in Department of Earth and Environmental Sciences. All users who wish to use the software must request access to the \u2018partmc-mosaic\u2019 unix group and should familiarise themselves with the Terms and Conditions of the license as outlined below:<\/p>\n<ol>\n<li>MOSAIC and its submodules CBM-Z, ASTEM, MESA, and MTEM may not be included in any commercial package, or used for any commercial<br \/>\napplications without prior authorization from the author.<\/li>\n<li>The MOSAIC code may be used for educational or non-profit purposes only. Any other usage must be first approved by the author.<\/li>\n<li>The MOSAIC code cannot be modified in any way or form or distributed without the author&#8217;s prior consent.<\/li>\n<li>No portion of the MOSAIC source code can be used in other codes without the author&#8217;s prior consent.<\/li>\n<li>The MOSAIC code is provided on an as-is basis, and the author bears no liability from its usage.<\/li>\n<li>Publications resulting from the usage of MOSAIC must cite the references below for proper acknowledgment.<\/li>\n<\/ol>\n<p>All requests for access should be made to: &#105;t&#x73;-&#x72;i&#x2d;t&#x65;a&#x6d;&#64;&#x6d;&#97;&#x6e;&#99;&#x68;&#101;&#x73;&#116;&#x65;&#114;&#x2e;&#97;&#x63;&#46;u&#x6b;<br \/>\n<strong>Please copy (CC) Dr. Zhonghua Zheng on your request: &#x7a;&#x68;&#x6f;&#110;&#103;hu&#x61;&#x2e;&#x7a;&#x68;&#101;&#110;g&#64;&#x6d;&#x61;&#x6e;&#99;&#104;&#101;st&#x65;&#x72;&#x2e;&#97;&#99;&#46;u&#x6b;<\/strong><\/p>\n<h2>Set up procedure<\/h2>\n<p>To access PartMC-MOSAIC please load the following modulefile by entering:<\/p>\n<pre>module load apps\/gcc\/partmc-mosaic\/22.0<\/pre>\n<h2>Running the application<\/h2>\n<p>Please do not run partmc-mosaic on the login node. All jobs should be submitted to the compute nodes via batch.<\/p>\n<h3>Serial batch job submission<\/h3>\n<p>Ensure that all the necessary files for the scenario that needs to be run has been copied over to the scratch area:<\/p>\n<pre> cp -r \/opt\/apps\/apps\/gcc\/partmc\/2.6.1\/scenarios\/1_urban_plume ~\/scratch\/<\/pre>\n<p>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 <abbr title=\"add '#$ -V' to your jobscript\">inherit these settings<\/abbr>.<\/p>\n<p>Create a batch submission script (which will load the modulefile in the jobscript), for example:<\/p>\n<pre>\r\n#!\/bin\/bash --login\r\n#SBATCH -p serial      # (or --partition=) Use the nodes dedicated to serial jobs\r\n#SBATCH -t 1-0         # Wallclock timelimt (1-0 is 1 day, max permitted is 7-0)\r\n\r\n# Choose your required version and load the module. We also need gnuplot.\r\nmodule purge\r\nmodule load apps\/gcc\/partmc-mosaic\/22.0\r\nmodule load tools\/gcc\/gnuplot\/5.2.7\r\n\r\n# Go to your local copy of the plume files\r\ncd ~\/scratch\/1_urban_plume\r\n\r\n# Run partmc-mosaic bash scripts one after another.\r\n.\/1_run.sh &amp;&amp; .\/2_process.sh &amp;&amp; .\/3_plot.sh\r\n\r\ngnuplot -persist plot_species.gnuplot\r\n<\/pre>\n<p>Submit the jobscript using:<\/p>\n<pre>sbatch <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your jobscript.<\/p>\n<p>If you need more RAM (memory) to complete the analysis successfully, and you may well do!, please add the flags mentioned at the <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/batch-slurm\/high-memory-jobs-slurm\/\">high-memory jobs<\/a> page for more information.<\/p>\n<h3>Example of a task-array batch job submission<\/h3>\n<pre>\r\ncp -r \/opt\/apps\/apps\/gcc\/partmc\/2.6.1\/scenarios\/*_urban_plume* ~\/scratch\/task-array\r\n<\/pre>\n<p>Create a batch submission script (which will load the modulefile in the jobscript), for example:<\/p>\n<pre>\r\n#!\/bin\/bash --login\r\n#SBATCH -p serial     # Job will use 1 core for each task\r\n#SBATCH -t 4-0        # Wallclock time limit - each task will run for up to 4 days (0 hours)\r\n\r\n#SBATCH -a 1-10     # An array job with 10 \"tasks\", numbered 1...10\r\n                      # (Note: unlike CSF3 \"SGE\" job array, SLURM job arrays can also start at 0)\r\n\r\n# Choose your required version and load the module. We also use gnuplot.\r\nmodule purge\r\nmodule load apps\/gcc\/partmc-mosaic\/22.0\r\nmodule load tools\/gcc\/gnuplot\/5.2.7\r\n\r\n# exit on error\r\nset -e\r\n\r\n# array for scripts\r\ndeclare -a array\r\narray=(1_run.sh 2_process.sh 3_plot.sh)\r\n\r\n# Set I to the current task number (1, 2, ...) See -t line above.\r\nI=${SLURM_ARRAY_TASK_ID}\r\n\r\n# Go in to the directory according to number (1_urban_plume, 2_urban_plume, ...)\r\ncd ${I}_urban_plume\/\r\n\r\n# create the out dir\r\nif [ ! -d \"out\" ]; then\r\n  mkdir out;\r\nelse\r\n  echo \"The directory out exists.\";\r\nfi\r\n\r\n# checks for each script in the array\r\nfor i in ${array[@]}; do\r\n  if [ ! -z \"$i\" ] &amp;&amp; [ -e \"$i\" ] &amp;&amp; [ -n \"$i\" ]; then\r\n    FINDANDREPLACE='s,..\/..\/build\/,,'\r\n    sed -i -e $FINDANDREPLACE \"$i\"\r\n    .\/$i\r\n  else\r\n    echo \"something is wrong, file ${array[i]} not found\";\r\n  fi\r\ndone\r\n\r\ncd ..\r\n<\/pre>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/m-edal\/computing\/blob\/main\/docs\/pages\/environments_setup\/partmc_mosaic_installation.md\">Installation<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview MOSAIC (Model for Simulating Aerosol Interactions &amp; 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.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/applications\/partmc\/partmc-mosaic\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":6906,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6934","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/6934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/comments?post=6934"}],"version-history":[{"count":16,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/6934\/revisions"}],"predecessor-version":[{"id":11158,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/6934\/revisions\/11158"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/6906"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/media?parent=6934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}