From 66aadb821325f605bc752515523f909cc2b8400a Mon Sep 17 00:00:00 2001
From: bjorn-stevens <64255981+bjorn-stevens@users.noreply.github.com>
Date: Sat, 20 Aug 2022 10:16:40 +0200
Subject: [PATCH] updated readme.md

---
 README.md               | 33 ++++++++++++++++++++---------
 examples/examples.ipynb | 47 +++++++++++++++++++++++++++++++----------
 2 files changed, 59 insertions(+), 21 deletions(-)

diff --git a/README.md b/README.md
index 4724642..6b20d5d 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,36 @@
 # moist_thermodynamics
 
 ## Description
-This repository contains constants and functions used for the analysis of moist thermodynamic processes.  An effort is made to be as accurate as possible given the assumption of a Rankine-Kirchoff fluid, i.e., zero condensate volume, perfect mixtures of perfect gases, perfect liquids and constancy of specific heats.  
+This repository contains a python module providing constants and functions used for the analysis of moist atmospheric thermodynamic processes.  An effort is made to be as accurate as possible given the assumption of a Rankine-Kirchoff fluid, i.e., zero condensate volume, perfect mixtures of perfect gases, perfect liquids and constancy of specific heats.  
 
-In some cases even more exact treatments will be desired, for instance the more accurate specifications of the saturation vapor pressure are not consistent with the assumptions of a Rankine-Kirchoff fluid, but these will generally be the exception.  More accurate formulations are available, for instansce, using the IAPWS package or its deriviatives. 
+In some cases even more exact treatments will be desired, for instance the more accurate specifications of the saturation vapor pressure are not consistent with the assumptions of a Rankine-Kirchoff fluid, but are useful references.  Those more generally interested in the most accurate treatment are referred to the [IAPWS](http://iapws.org), or the TEOS libraries, e.g., their sea-ice-air library is [available on github](https://github.com/TEOS-10/SIA-Fortran)
+
+The functionality is not meant to be exhaustive, but to provide the basic tools to treate moist thermodynamics in a consistent manner and in ways that allow the tools to be easily incorporated into other programmes, or used as references for simpler more analytically tractable approximations.   
 
 ## Usage
-Jupyter notebooks provide illustrative use cases and further informatino pursuant to choices made in structuring the code, and the functionality it enables.
+Jupyter notebooks are provided in the examples directory to provide illustrative use cases and further information pursuant to choices made in structuring the code, and the functionality it enables.  This includes analyses used in ([Marquet and Stevens (2021)](https://journals.ametsoc.org/view/journals/atsc/79/4/JAS-D-21-0095.1.xml).
+
+## References
+
+Marquet, P., & Stevens, B. (2022). On Moist Potential Temperatures and Their Ability to Characterize Differences in the Properties of Air Parcels, Journal of the Atmospheric Sciences, 79(4), 1089-1103. ([open access pdf version](https://arxiv.org/pdf/2104.01376.pdf)) 
+
+
+Romps, D.M. (2021), The Rankine–Kirchhoff approximations for moist thermodynamics. QJR Meteorol Soc, 147: 3493-3497. https://doi.org/10.1002/qj.4154
 
-## Support
-Contact bjorn.stevens@mpimet.mpg.de for support
+Siebesma, A., Bony, S., Jakob, C., & Stevens, B. (Eds.). (2020). Clouds and Climate: Climate Science's Greatest Challenge. Cambridge: Cambridge University Press. doi:10.1017/9781107447738
 
 ## Contributing
-Code contributions are welcome.  Please suggest changes on a branch and make a merge request.
+Code contributions are welcome.  Please suggest changes on a branch and make a merge request.  Format all changes using Black, and test docstrings using pytest before making merge requests.
 
 ## Authors and acknowledgment
-The code was written by Bjorn Stevens (MPI-M Hamburg).  
-
-Lukas Kluft and Tobias Kölling provided input and guidance in setting up the repository and on matters related to python.  Jiawei Bao, Geet George and Hauke Schulz provided feedback on the thermodynamic analysis.
+The code was written by Bjorn Stevens with contributions from Lukas Kluft and Tobias Kölling. LK and TK also are thanked for expert input in setting up the repository and on how best to structure and code the libraries in ways that enourage intuitive use.  They, also along with Jiawei Bao, Geet George and Hauke Schulz are thanked for their feedback on the thermodynamic analysis.
 
 ## License
-The code in this directory is all licensed as BSD-3C as stipulated by the LICENSE file in the root directory
\ No newline at end of file
+Copyright 2016-2021 MPI-M, Bjorn Stevens
+
+Code subject to BSD-3-C, SPDX short identifier: BSD-3-Clause, see [license file](LICENSE.md)
+
+
+## Contact
+bjorn.stevens@mpimet.mpg.de
+
diff --git a/examples/examples.ipynb b/examples/examples.ipynb
index c7babf2..4db12ab 100644
--- a/examples/examples.ipynb
+++ b/examples/examples.ipynb
@@ -60,7 +60,7 @@
     }
    ],
    "source": [
-    "?svp.make_analytic"
+    "svp.make_analytic?"
    ]
   },
   {
@@ -703,13 +703,7 @@
     "\n",
     "T = np.arange(273.0, 330.0)\n",
     "es_w1 = (svp.liq_analytic(T) / svp.liq_wagner_pruss(T) - 1.0) * 100.0\n",
-    "es_w2 = (\n",
-    "    lambda T: (\n",
-    "        svp.make_analytic(lx=constants.lvT, cx=4119.0)(T) / svp.liq_wagner_pruss(T)\n",
-    "        - 1.0\n",
-    "    )\n",
-    "    * 100.0\n",
-    ")\n",
+    "es_w2 = lambda T : (svp.make_analytic(lx=constants.lvT, cx=4119.0)(T)/ svp.liq_wagner_pruss(T) - 1.0) * 100.0\n",
     "es_w3 = (liq_tetens_new(T) / svp.liq_wagner_pruss(T) - 1.0) * 100.0\n",
     "es_w4 = ((svp.liq_tetens(T)) / svp.liq_wagner_pruss(T) - 1.0) * 100.0\n",
     "\n",
@@ -797,16 +791,47 @@
    ],
    "source": [
     "es = svp.make_tetens(Tref=constants.TvT, Pref=constants.PvT, a=22.0420, b=5.0)\n",
-    "es(np.asarray([273.15, 260.0]))\n",
-    "# array([611.21094488, 222.70984761])"
+    "es( np.asarray([273.15,260.]) )\n",
+    "#array([611.21094488, 222.70984761])"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 16,
    "id": "1b05e735-a4f5-46c0-b408-026a5155447d",
    "metadata": {},
    "outputs": [],
+   "source": [
+    "import moist_thermodynamics "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 21,
+   "id": "4e0faf41-7b8e-42a2-8a8a-253321cb7139",
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "'0.5.0'"
+      ]
+     },
+     "execution_count": 21,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "moist_thermodynamics.__version__"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "9b0bfdd7-33a3-4a2d-894c-38578bfe0a50",
+   "metadata": {},
+   "outputs": [],
    "source": []
   }
  ],
-- 
GitLab