Skip to content

Commit

Permalink
Merge branch 'master' into wrf_partmc_for_partmc_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jcurtis2 committed Jan 16, 2024
2 parents 8510d50 + cfa50cd commit 2f4744c
Show file tree
Hide file tree
Showing 15 changed files with 373 additions and 178 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- name: Build the testing docker image
run: docker build -f Dockerfile.mpi -t partmc-test .
- name: Run the tests in the docker container
run: docker run -t partmc-test bash -c 'cd /build; make test'
run: docker run -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test'
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ project(PARTMC Fortran C)

set(PACKAGE_BUGREPORT "[email protected]")
set(PACKAGE_NAME "PartMC")
set(PACKAGE_STRING "PartMC 2.6.1")
set(PACKAGE_STRING "PartMC 2.7.0")
set(PACKAGE_TARNAME "partmc")
set(PACKAGE_VERSION "2.6.1")
set(PACKAGE_VERSION "2.7.0")

######################################################################
# options
Expand Down
13 changes: 13 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2.7.0 - 2023-08-11

* Add support for SUNDIALS 6+ (Alex Hirzel).

* Add wrapper around stop (Sylwester Arabas).

* Change timestepping structure in run_part (Jeff Curtis).

* Update kappa value of NaCl (Jeff Curtis).

* Remove optional communicator in photolysis.F90 (Jeff Curtis).

* Use relative tolerance for comparing water properties (Jeff Curtis).

2.6.1 - 2022-02-18

Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ PartMC: Particle-resolved Monte Carlo code for atmospheric aerosol simulation

[![Latest version](https://img.shields.io/github/tag/compdyn/partmc.svg?label=version)](https://github.com/compdyn/partmc/blob/master/ChangeLog.md) [![Docker build status](https://img.shields.io/docker/automated/compdyn/partmc.svg)](https://hub.docker.com/r/compdyn/partmc/builds/) [![Github Actions Status](https://github.com/compdyn/partmc/workflows/CI/badge.svg?branch=master)](https://github.com/compdyn/partmc/actions/workflows/main.yml) [![License](https://img.shields.io/github/license/compdyn/partmc.svg)](https://github.com/compdyn/partmc/blob/master/COPYING) [![DOI](https://zenodo.org/badge/24058992.svg)](https://zenodo.org/badge/latestdoi/24058992)

Version 2.6.1
Released 2022-02-18
Version 2.7.0
Released 2023-08-11

**Source:** <https://github.com/compdyn/partmc>

**Homepage:** <http://lagrange.mechse.illinois.edu/partmc/>

**Cite as:** M. West, N. Riemer, J. Curtis, M. Michelotti, and J. Tian (2022) PartMC, [![version](https://img.shields.io/github/release/compdyn/partmc.svg?label=version)](https://github.com/compdyn/partmc), [![DOI](https://zenodo.org/badge/24058992.svg)](https://zenodo.org/badge/latestdoi/24058992)
**Cite as:** M. West, N. Riemer, J. Curtis, M. Michelotti, and J. Tian (2023) PartMC, [![version](https://img.shields.io/github/release/compdyn/partmc.svg?label=version)](https://github.com/compdyn/partmc), [![DOI](https://zenodo.org/badge/24058992.svg)](https://zenodo.org/badge/latestdoi/24058992)

Copyright (C) 2005-2022 Nicole Riemer and Matthew West
Portions copyright (C) Andreas Bott, Richard Easter, Jeffrey Curtis,
Expand Down Expand Up @@ -184,12 +184,12 @@ Installation

2. Unpack PartMC:

tar xzvf partmc-2.6.1.tar.gz
tar xzvf partmc-2.7.0.tar.gz

3. Change into the main PartMC directory (where this README file is
located):

cd partmc-2.6.1
cd partmc-2.7.0

4. Make a directory called `build` and change into it:

Expand Down Expand Up @@ -273,3 +273,18 @@ particle-resolved runs) or binned data (from sectional or exact
runs). The `extract_*` programs can read these per-timestep NetCDF
files and output ASCII data (the `extract_sectional_*` programs are
used for sectional and exact model output).

Python bindings
===============

The [PyPartMC](https://github.com/open-atmos/PyPartMC) project offers
pip-installable Python bindings to PartMC. Both source and binary
packages are available and ship with all PartMC dependencies included.
PyPartMC exposes internal components of PartMC (utility routines and
derived types) which then can serve as building blocks to develop PartMC
simulations in Python. Time stepping can be performed either using the
internal PartMC time-stepper or externally within a Python loop. The
latter allows to couple the simulation with external Python components
in each timestep. PyPartMC features examples developed as Jupyter notebooks.
Snippets of code provided in the README file depict how to use PyPartMC
from Julia (using PyCall.jl) and Matlab (using Matlab's built-in Python bridge).
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = PartMC
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.6.1
PROJECT_NUMBER = 2.7.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VERSION = 2.6.1
VERSION = 2.7.0

GRAPHVIZ_FILE = partmc_modules.gv
GRAPHVIZ_PDF = $(patsubst %.gv,%.pdf,$(GRAPHVIZ_FILE))
Expand Down
5 changes: 4 additions & 1 deletion src/aero_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,9 @@ subroutine aero_data_output_netcdf(aero_data, ncid)
call pmc_nc_write_real_1d(ncid, aero_data%kappa, &
"aero_kappa", (/ dimid_aero_species /), unit="1", &
long_name="hygroscopicity parameters (kappas) of aerosol species")
call pmc_nc_write_integer(ncid, aero_data%i_water, &
"aero_i_water", long_name="Index of aerosol water or " &
// "0 if water does not exist.")
call fractal_output_netcdf(aero_data%fractal, ncid)

end subroutine aero_data_output_netcdf
Expand Down Expand Up @@ -1027,7 +1030,7 @@ subroutine aero_data_input_netcdf(aero_data, ncid)
end do
call assert(377166448, aero_weight_class_names == "")

call aero_data_set_water_index(aero_data)
call pmc_nc_read_integer(ncid, aero_data%i_water, "aero_i_water")

call fractal_input_netcdf(aero_data%fractal, ncid)

Expand Down
6 changes: 6 additions & 0 deletions src/camp_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ subroutine pmc_camp_interface_set_partmc_aerosol(aero_data, aero_state, &
type(camp_state_t), intent(in) :: camp_state

integer :: i_part, i_spec
real(kind=dp) :: reweight_num_conc(aero_state_n_part(aero_state))

call aero_state_num_conc_for_reweight(aero_state, aero_data, &
reweight_num_conc)

associate (aero_rep => aero_data%aero_rep_ptr)
select type (aero_rep)
Expand All @@ -190,6 +194,8 @@ subroutine pmc_camp_interface_set_partmc_aerosol(aero_data, aero_state, &
end select
end associate

call aero_state_reweight(aero_state, aero_data, reweight_num_conc)

end subroutine pmc_camp_interface_set_partmc_aerosol

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down
9 changes: 6 additions & 3 deletions src/condense_solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ static int condense_check_flag(void *flagvalue, char *funcname, int opt);
// solver block

static int condense_solver_Solve(double t, N_Vector ycur, N_Vector fcur,
N_Vector r, N_Vector b, double gamma, double delta, int lr, void *user_data);
N_Vector r, N_Vector b, double gamma,
double delta, int lr, void *user_data);

/*******************************************************/

void condense_vf_f(int neq, realtype t, double *y_f, double *ydot_f);
void condense_jac_solve_f(int neq, double t, double *ycur_f, double *fcur_f, double *b_f, double gamma);
void condense_jac_solve_f(int neq, double t, double *ycur_f, double *fcur_f,
double *b_f, double gamma);

/** \brief Call the ODE solver.
*
Expand Down Expand Up @@ -272,7 +274,8 @@ static int condense_check_flag(void *flagvalue, char *funcname, int opt)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
static int condense_solver_Solve(double t, N_Vector ycur, N_Vector fcur,
N_Vector b, N_Vector z, double gamma, double delta, int lr, void *user_data)
N_Vector b, N_Vector z, double gamma,
double delta, int lr, void *user_data)
{
realtype *b_data, *ycur_data, *fcur_data, *z_data;
int i, neq;
Expand Down
2 changes: 1 addition & 1 deletion src/output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module pmc_output
#endif

!> PartMC verson number.
character(len=100), parameter :: PARTMC_VERSION = "2.6.1"
character(len=100), parameter :: PARTMC_VERSION = "2.7.0"

!> Type code for undefined or invalid output.
integer, parameter :: OUTPUT_TYPE_INVALID = 0
Expand Down
Loading

0 comments on commit 2f4744c

Please sign in to comment.