PyPartMC 2.0.0rc5__cp313-cp313-macosx_15_0_arm64.whl → 2.0.0rc7__cp313-cp313-macosx_15_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of PyPartMC might be problematic. Click here for more details.

Binary file
Binary file
Binary file
Binary file
PyPartMC/__init__.py CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  # pylint: disable=invalid-name
6
6
  import importlib.metadata
7
+ import inspect
7
8
 
8
9
  # pylint: disable=invalid-name,wrong-import-position
9
10
  import os
@@ -79,8 +80,29 @@ from ._PyPartMC import ( # pylint: disable=import-error
79
80
  __versions_of_build_time_dependencies__,
80
81
  )
81
82
 
83
+ # Hacky workaround for missing docs in pdoc auto-generated documentation.
84
+ # After the switch to nanobind, the docs became empty despite "__doc__" being
85
+ # accessible in all of PyPartMC's objects. The code below manually populates
86
+ # the "__all__" atrribute of the package. Additionally, functions in the generated
87
+ # docs would be listed as nanobind objects with no additional documentation.
88
+ # To solve that, dummy functions of the same name are created, and their "__doc__"
89
+ # attribute is manually set to the "original" objects' "__doc__"
90
+ if os.getenv("PDOC_GENERATE_PYPARTMC_DOCS") == "1":
91
+ all_items = []
92
+ for name, obj in inspect.getmembers(
93
+ _PyPartMC # pylint: disable=undefined-variable
94
+ ):
95
+ if callable(obj):
96
+ if not inspect.isclass(obj):
97
+ exec(name + " = lambda : 0") # pylint: disable=exec-used
98
+ temp = "_PyPartMC." + name + ".__doc__"
99
+ setattr(eval(name), "__doc__", eval(temp)) # pylint: disable=eval-used
100
+ all_items.append(name)
101
+
102
+ __all__ = tuple([*all_items, "si"])
103
+
82
104
  __version__ = importlib.metadata.version(__package__)
83
105
 
84
- # walkaround for MATLAB bindings
106
+ # workaround for MATLAB bindings
85
107
  # pylint: disable=undefined-variable
86
108
  setattr(nanobind, "nb_type_0", type(_PyPartMC.AeroData))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPartMC
3
- Version: 2.0.0rc5
3
+ Version: 2.0.0rc7
4
4
  Summary: Python interface to PartMC
5
5
  Author-Email: "https://github.com/open-atmos/PyPartMC/graphs/contributors" <nriemer@illinois.edu>
6
6
  License-Expression: GPL-3.0
@@ -117,6 +117,11 @@ pip install PyPartMC[examples]
117
117
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/open-atmos/PyPartMC/blob/main/examples/cloud_parcel.ipynb)
118
118
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/open-atmos/PyPartMC.git/main?urlpath=lab/tree/examples/cloud_parcel.ipynb)
119
119
  [![ARM JupyterHub](https://img.shields.io/static/v1?label=launch%20in&logo=jupyter&color=lightblue&message=ARM+JupyterHub)](https://jupyterhub.arm.gov/hub/user-redirect/git-pull?repo=https%3A//github.com/open-atmos/PyPartMC&branch=main&urlPath=)
120
+ - Immersion freezing example:
121
+ [![View notebook](https://img.shields.io/static/v1?label=render%20on&logo=github&color=87ce3e&message=GitHub)](https://github.com/open-atmos/PyPartMC/blob/main/examples/immersion_freezing.ipynb)
122
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/open-atmos/PyPartMC/blob/main/examples/immersion_freezing.ipynb)
123
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/open-atmos/PyPartMC.git/main?urlpath=lab/tree/examples/immersion_freezing.ipynb)
124
+ [![ARM JupyterHub](https://img.shields.io/static/v1?label=launch%20in&logo=jupyter&color=lightblue&message=ARM+JupyterHub)](https://jupyterhub.arm.gov/hub/user-redirect/git-pull?repo=https%3A//github.com/open-atmos/PyPartMC&branch=main&urlPath=)
120
125
  - Coagulation model intercomparison for additive (Golovin) kernel with: PyPartMC, [PySDM](https://open-atmos.github.io/PySDM), [Droplets.jl](https://github.com/emmacware/droplets.jl) and [dustpy](https://stammler.github.io/dustpy/):
121
126
  [![View notebook](https://img.shields.io/static/v1?label=render%20on&logo=github&color=87ce3e&message=GitHub)](https://github.com/open-atmos/PyPartMC/blob/main/examples/additive_coag_comparison.ipynb)
122
127
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/open-atmos/PyPartMC/blob/main/examples/additive_coag_comparison.ipynb)
@@ -159,9 +164,9 @@ import PyPartMC as ppmc
159
164
  from PyPartMC import si
160
165
 
161
166
  aero_data = ppmc.AeroData((
162
- # [density, ions in solution, molecular weight, kappa]
163
- {"OC": [1000 *si.kg/si.m**3, 0, 1e-3 *si.kg/si.mol, 0.001]},
164
- {"BC": [1800 *si.kg/si.m**3, 0, 1e-3 *si.kg/si.mol, 0]},
167
+ # [density, ions in solution, molecular weight, kappa, abifm_m, abifm_c]
168
+ {"OC": [1000 *si.kg/si.m**3, 0, 1e-3 *si.kg/si.mol, 0.001, 0, 0]},
169
+ {"BC": [1800 *si.kg/si.m**3, 0, 1e-3 *si.kg/si.mol, 0, 0 , 0]},
165
170
  ))
166
171
 
167
172
  aero_dist = ppmc.AeroDist(
@@ -202,9 +207,9 @@ ppmc = pyimport("PyPartMC")
202
207
  si = ppmc["si"]
203
208
 
204
209
  aero_data = ppmc.AeroData((
205
- # (density, ions in solution, molecular weight, kappa)
206
- Dict("OC"=>(1000 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0.001)),
207
- Dict("BC"=>(1800 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0))
210
+ # (density, ions in solution, molecular weight, kappa, abifm_m, abifm_c)
211
+ Dict("OC"=>(1000 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0.001, 0, 0)),
212
+ Dict("BC"=>(1800 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0, 0, 0))
208
213
  ))
209
214
 
210
215
  aero_dist = ppmc.AeroDist(aero_data, (
@@ -245,8 +250,8 @@ ppmc = py.importlib.import_module('PyPartMC');
245
250
  si = py.importlib.import_module('PyPartMC').si;
246
251
 
247
252
  aero_data = ppmc.AeroData(py.tuple({ ...
248
- py.dict(pyargs("OC", py.tuple({1000 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0.001}))), ...
249
- py.dict(pyargs("BC", py.tuple({1800 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0}))) ...
253
+ py.dict(pyargs("OC", py.tuple({1000 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0.001, 0, 0}))), ...
254
+ py.dict(pyargs("BC", py.tuple({1800 * si.kg/si.m^3, 0, 1e-3 * si.kg/si.mol, 0, 0, 0}))) ...
250
255
  }));
251
256
 
252
257
  aero_dist = ppmc.AeroDist(aero_data, py.tuple({ ...
@@ -288,7 +293,7 @@ PyPartMC is used within the [test workflow of the PySDM project](https://github.
288
293
  ## Other packages with relevant feature scope
289
294
 
290
295
  - [aerosolGDEFoam](https://openaerosol.sourceforge.io/): OpenFOAM CFD-coupled aerosol dynamics including nucleation, coagulation, and surface growth
291
- - [AIOMFAC and AIOMFAC-web](http://www.aiomfac.caltech.edu/): Fortran-implemented aerosol thermodynamic model for calculation of activity coefficients in organic-inorganic mixtures – from simple binary solutions to complex multicomponent systems
296
+ - [AIOMFAC and AIOMFAC-web](http://web.archive.org/web/20250730204937/https://www.aiomfac.caltech.edu/): Fortran-implemented aerosol thermodynamic model for calculation of activity coefficients in organic-inorganic mixtures – from simple binary solutions to complex multicomponent systems
292
297
  - [DustPy](https://stammler.github.io/dustpy/): Python package for modelling dust evolution in protoplanetary disks (differences: focus on astrophysical applications vs. atmospheric aerosol)
293
298
  - [multilayerpy](https://github.com/tintin554/multilayerpy): kinetic multi-layer model for aerosol particles and films
294
299
  - [PyBox](https://pybox.readthedocs.io): aerosol simulation model featuring gas and particle chamistry (differences: PyBox focuses on chemical mechanisms; PyPartMC is an interface to PartMC which focuses on physics - e.g., collisions of aerosol particles - while chemical processes are handled with external software, e.g., CAMP or MOSAIC)
@@ -0,0 +1,9 @@
1
+ PyPartMC/__init__.py,sha256=iVz2ccwCEvjPu70_Uv0IKVC_fqYO248vWLunJ75ovok,3438
2
+ PyPartMC/_PyPartMC.abi3.so,sha256=hOK2YWBLTbe5BmtaBlKN-9snxgEMS696B_QLw-D25X8,7445872
3
+ PyPartMC/.dylibs/libgfortran.5.dylib,sha256=PGQGOjWoP-Id2Dk5GDTvS297P7PhCslktGRE3GQggx8,2161472
4
+ PyPartMC/.dylibs/libquadmath.0.dylib,sha256=_Cx_af4sxd6aroRB5cNlsrayMcZj05IqZmYhrKQs4VU,362768
5
+ PyPartMC/.dylibs/libgcc_s.1.1.dylib,sha256=tjGLv7spMSeFeb9htSpwVZNJdX0x0Y0zZQVbmjIuuqo,220288
6
+ pypartmc-2.0.0rc7.dist-info/RECORD,,
7
+ pypartmc-2.0.0rc7.dist-info/WHEEL,sha256=_Fb8-ydQXDLVs5LO-8i0dmGnvu1Osho0yB_dV-fAWsk,141
8
+ pypartmc-2.0.0rc7.dist-info/METADATA,sha256=ErzEX0DE_uDb_XCEtzweGtRu6MqUHQYcXhzKKJRYIo0,28527
9
+ pypartmc-2.0.0rc7.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
@@ -1,9 +0,0 @@
1
- pypartmc-2.0.0rc5.dist-info/RECORD,,
2
- pypartmc-2.0.0rc5.dist-info/WHEEL,sha256=_Fb8-ydQXDLVs5LO-8i0dmGnvu1Osho0yB_dV-fAWsk,141
3
- pypartmc-2.0.0rc5.dist-info/METADATA,sha256=WqRG5fZFB_rJnWZIb9B8VDPFRCICI85dCIHTb3-g7Ac,27597
4
- pypartmc-2.0.0rc5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
5
- PyPartMC/__init__.py,sha256=e1ngb8Sodfqneb__Vmf_K5eIOoOY11gvrSHmlIZbruM,2349
6
- PyPartMC/_PyPartMC.abi3.so,sha256=arP8Zio3h-Ew3FOrNK5mKerElPUs1L-IlEogMBQbDNU,7444016
7
- PyPartMC/.dylibs/libgfortran.5.dylib,sha256=onrysKpLqoxXXc_9Ku-Ho6VcVAR0LxFaQ0R3Oqmk0_s,2161472
8
- PyPartMC/.dylibs/libquadmath.0.dylib,sha256=mEkLZf2WGzCNY7K0dfgyPPvNlFtsa-Y_tAlyVg58WV0,362768
9
- PyPartMC/.dylibs/libgcc_s.1.1.dylib,sha256=gZ8ji1hG_7h15qveFPouhE1b-VgvzpZRM5exsqCoFaU,220288