Skip to content
Snippets Groups Projects
  1. Aug 17, 2022
  2. Aug 16, 2022
    • Bjorn Stevens's avatar
      Merge branch 'add_sat_module' into 'main' · 29a519cc
      Bjorn Stevens authored
      restructured treatment of saturation vapor pressure
      
      See merge request !3
      29a519cc
    • bjorn-stevens's avatar
      v0.5 renamed and cleaned up functions and vars · 0d73c83d
      bjorn-stevens authored
      Replaced use of es_liq by es_liq_default, likewise for ice to make the
      intent clear.
      
      Replaced use of TK and PPa by T and P to ensure consistency.
      0d73c83d
    • bjorn-stevens's avatar
      v0.4: includes reformatting of svp analytic · a5a67e9b
      bjorn-stevens authored
      Released as version 0.4, includes reformatting of analytic formulation
      of saturation vapor pressure to better emphasize the commont form of the
      calculation for ice and liquid, similar to what is done for teten's
      formulas.  Now both it and Teten's serve as 'master' formlae, with liq
      and ice being particular implementations.
      a5a67e9b
    • bjorn-stevens's avatar
      fixed error in documentation · 351111ce
      bjorn-stevens authored
      351111ce
    • bjorn-stevens's avatar
      revised analytic saturation vapor pressures · 43dc7989
      bjorn-stevens authored
      Attempted to clean up the presentation of the Teten's and Romps formulae
      for saturation vapor pressuer, incorporating improved fitting constants
      for the former.  These were derived by fitting to Wagner and Pruss for
      the temperature range 270 K to 310 K and to Wagner et al for ice over
      the range 230K to 260 K.  The fitting is not particular sensitive and
      fitting with noice leads to slight changes in the fits, but the new
      constants are robustly an improvement over the old ones, which had
      inconsistent triple points vapor pressures over ice and liquid. I also
      double checked the 'Romp's' formulae, and refrained from calling these
      Romps as they are just straightforward integrations of the
      Clausius-Clapeyron equation under the Rankine-Kirchoff assumptions.
      43dc7989
  3. Aug 15, 2022
    • bjorn-stevens's avatar
      restructure treatment of saturation vapor pressure · 2927145a
      bjorn-stevens authored
      In this branch additional impelmentations of the saturation vapor
      pressure were impelmented.  These different treatments are not meant to
      be exhaustive, but the teten's murray formulations were introduced
      because these are used by ICON.  The murphy-koop formulation is the
      standard for super-cooled liquid water.  The examples ipynb script was
      augmented to present the new functionality.
      2927145a
  4. Aug 14, 2022
    • bjorn-stevens's avatar
      added a function to calculate (moist) static energy · 46445d34
      bjorn-stevens authored
      in the atmospheric sciences there are many different moist static
      energies.  They differ due to the choice of reference enthalpies for
      water phases, which are connected by the phase change enthalpies, and
      thus have a single degree of freedom.  This we give to the reference
      enthalpy (enthalpy at T0) for vapor.  The choice of hv0 matters because
      not all reference quantities can be zero for all phases of water, and so
      the choice influences how the reference quantity weights different water
      phases.
      
      the function has been defined in a rather expressive way to bring out
      this property and make it possible to compute one or the other of the
      moist static energies by choosing a different reference state for the
      vapor enthalpy.
      46445d34
  5. Aug 13, 2022
    • bjorn-stevens's avatar
      generic functions to invert state functions · 5bbcc5e9
      bjorn-stevens authored
      By passing the function that is to be inverted it is possible to write a
      generic inversion function, which we call invert_for_temperature and
      invert_for_pressure respectively.  These work for all off the
      thermodynamic funcions, i.e., theta_e, theta_l, etc.
      
      I experimented with an invert_for_humidity, but this often did nto
      converge so I did not introduce this functionality.
      5bbcc5e9
  6. Aug 12, 2022
  7. Aug 11, 2022
  8. Aug 10, 2022
    • bjorn-stevens's avatar
      added plot directory to repository · 05a6abde
      bjorn-stevens authored
      Some of the routines assume the existence of a directory to
      collect plots.  This adds the directory to the repository.
      05a6abde
    • bjorn-stevens's avatar
      0.2 release (cleanup and additional examples) · 9a6e141d
      bjorn-stevens authored
      This is a new release.  In addition to cleaning up existing code,
      it adds error checking (which identified a few bugs), and a number
      of examples taken from my archived (unreleased) library.  This
      includes an analysis of different saturation vapor pressure
      formulations, the effect of the saturation vapor pressure formulation
      on the potential temperatures, and differences in calculations of ths
      lifting condensation level.
      9a6e141d
    • bjorn-stevens's avatar
      clean up · 83bffa9c
      bjorn-stevens authored
      renamed funcitons with shorter names as longer descriptions are part of
      documentation. Began checking functions and documenting expected
      answers, which also led to some bug corrections.
      83bffa9c
    • bjorn-stevens's avatar
      clean release with relative module references · 9514823d
      bjorn-stevens authored
      resolves m219063/aes_thermo#1
      Updated the release so that the module references are now relative
      references to avoid conflicts.  This was the last outstanding open
      point of the above referenced issue
      9514823d
    • bjorn-stevens's avatar
      [rename] renamed repository · 0d7f6c40
      bjorn-stevens authored
      renamed respository, changing from aes_thermo to moist_thermodynamics.
      This resulted in changes in directory and file names
      0d7f6c40
    • bjorn-stevens's avatar
    • bjorn-stevens's avatar
      [feature] modified calls to sat vapor pressure · 8d3d268b
      bjorn-stevens authored
      Resolves issue m219063/aes_thermo#2
      
      Initially saturation vapor pressure calls could select which formulation
      to use based on a string argument.  Now all calls are made explicitly
      visible and a default form is passed to functions that depend on it.
      Calls to these functions can however substitute a different form for the
      default form.
      8d3d268b
    • bjorn-stevens's avatar
      [feature] modified calls to sat vapor pressure · 283f3d54
      bjorn-stevens authored
      Initially saturation vapor pressure calls could select which formulation
      to use based on a string argument.  Now all calls are made explicitly
      visible and a default form is passed to functions that depend on it.
      Calls to these functions can however substitute a different form for the
      default form.
      283f3d54
    • bjorn-stevens's avatar
      [bugfix] modified import of constants in functions · 1e1f0412
      bjorn-stevens authored
      Originally I had imported the module constants using an absolute
      path, now this is modified for a relative import
      1e1f0412
    • bjorn-stevens's avatar
      [feature] added an example script · f0115327
      bjorn-stevens authored
      Added a ipython notebook script with a first example of using the
      functions to plot a moist adiabat.
      f0115327
    • bjorn-stevens's avatar
      cleaned up functions and constants · 815bc7c1
      bjorn-stevens authored
      1. The constants were redefined with sybmols and expressive names to
      make their use more intuitive and expressive
      
      2. Functions names were made more expressive and small modifications
      were made to consistently used previously defined functionality
      815bc7c1
  9. Aug 07, 2022
    • bjorn-stevens's avatar
      [bugfix] fixed bugs arising from separation of constants and functions · 0b444c3d
      bjorn-stevens authored
      When separating the constants from the functions the constants were no
      longer automatically seen by the functions.  The functions module has
      been modified to explicitly access the constants in the constants
      module.  The latter also has some inquiry functions that make it easy
      to access many constants at once, grouped by usecase.
      0b444c3d
Loading