Skip to content

Ideas for new features and examples

Sylwester Arabas edited this page Sep 17, 2021 · 76 revisions

Some of the ideas listed below are good candidates for individual or team projects or theses.

Physics:

  • mixed-phase processes
  • water isotopologues
  • radiative transfer
  • cloud biology: https://acp.copernicus.org/articles/20/1777/2020/acp-20-1777-2020.html
  • breakup
  • Ouzo (Ostwald ripening)
  • ventilation coefficient in condensation
  • turbulent kernels
  • drop temperatures
  • the initial water amount added to the system by r_wet_init - where and how to take into account/report
  • diffusion kinetics as in eq. 9 G&T'21: https://acp.copernicus.org/articles/21/4059/2021/
  • add checks for mass conservation in dry radius discretisation (if we are discretising number distribution, in the example (or even within initialisation logic) we should be able to impose a threshold on the acceptable level of incurred mass difference (between the one obtainable via moments of dry volume and the analytical value stemming from lognormal distribution parameters))

Chemistry:

  • support for >0D (not aware of any major reason it should not work!)
  • reproduce 2D setup simulations from J&P (but also Schmeller & Geresdi '19)
  • @njit for all methods
  • numba.prange where possible
  • better than Explicit Euler in oxidation
  • take Henry coefficients and other constants from chempy?
  • GPU support

New examples:

Unit test ideas

  • two-sd ripening test case
  • n=0 energy conservation test for parcel
  • unit test checking precipitation from other than lowest grid cell
  • 32-bit multiplicity overflows (see xfail in Berry smoke test)
  • tests for collision_deficit=0 with adaptivity=True (and !=0 for adaptivity=False) (i.e., min would not be needed in g = min(int(gamma[i]), prop) in compute_gamma_body() with adaptivity)
  • depict float/double difference case with a unit test (to check if fakeThrust is able to reproduce it) (this first need a big refactor around PrecisionResolver - currently switching the precision requires modifying source code!)

Refactors

  • around super().sync()/self.notify() magic in moist environments
  • common base class for kinematic envs
  • phase out precision resolver (precision field for Formulae?) + usage also for constants
  • unify ParticlesSizeSpectrum and ParticlesVolumeSpectrum products
  • combine fuse logic with dt_range in make_adapt_substeps(), i.e. set n_substeps_max = ... (fuse) instead of raising NotImplementedError()
  • remove length from backend methods (len(idx) enough)
  • remove all explicit types from C++ code in Thrust backend (decltype + auto should be enough)

Performance:

  • employ MergeShuffle for parallel permutations (https://github.com/axel-bacher/mergeshuffle)
  • lookup tables for speeding up physics
  • moments, moments, moments
  • use atomicAdd in Numba flag_precipitated
  • introduce times_max? (one loop less on GPU)
  • padding of arrays for ThrustRTC: idx size and relative storages sizes should be a multiple of 32 to ensure that all data of 1 super-droplets are in one GPU memory bank to avoid serialization
  • rethink if gamma vector should not be of integer type
  • gradually decrease the amount of shuffled numbers during adaptive coalescence substeps
  • parallel random shuffling on CPU (np.random.rand() within numba.prange), hint: https://github.com/numba/numba/issues/2486#issuecomment-320089562
  • one loop instead of two in coalescence normalize (without the need to use temporary memory for norm_factor)

Non-physics new features/refactors:

Visualisations, interactive notebooks, etc:

  • enhance out-of-the box settings in Paraview (netCDF output)
  • kernel plots
  • droplets in space with vtk-js: https://kitware.github.io/vtk-js/examples/
  • more controls in kinematic 2D GUI: spin-up, random seed, terminal velocity choice, kernel choice, backend choice, aerosol spectrum parameters, parallelisation controls, products, initialisation controls (constant multiplicity, ...)

New CI features (most also applies to PyMPDATA):

Packaging, dissemination, etc:

  • conda package
Clone this wiki locally