Skip to content

New formulation for vapour pressure at saturation - #445

Open
mpaiao wants to merge 3 commits into
EDmodel:masterfrom
mpaiao:mpaiao-pr-ambaum2020
Open

mpaiao wants to merge 3 commits into
EDmodel:masterfrom
mpaiao:mpaiao-pr-ambaum2020

Conversation

@mpaiao

@mpaiao mpaiao commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Description

This addresses issue #442, by implementing a new set of equations for saturation vapour pressure following Ambaum (2020). The main motivation for this switch is that the Ambaum's formulation is entirely consistent with the ED2 thermodynamics, and ensures the derivative of the saturation vapour pressure reduces to the Clausius-Clapeyron equation, and thus consistent with the second law of thermodynamics.

For now I made this an optional configuration, so I added a new flag NL%ESAT_METHOD to ED2IN, which can take the following options:

  • 0 The ED-2.0 default equation, based on Flatau et al. (1992). I kept it for now, but this is deprecated as the empirical functions are not continuous. I think we could remove it because I don't think anyone is using this (see the newthermo remark below).
  • 1 The default ED-2.2 equation, based on Murphy and Koop (2005).
  • 2 The new formulation based on Ambaum (2020), which could become the new default.

As I edited the thermodynamics modules, I eliminated the newthermo flag. This was a legacy from when we were refactoring the prognostic variables in ED-2.2. This flag was hardcoded and buried in the thermodynamic modules and the newthermo = .false. configuration is known for not conserving enthalpy, so I don't see the point in maintaining it. Setting newthermo = .false. would also replace the Murphy and Koop (2005) equation with Flatau et al. (1992).

I also fixed a few minor bugs as I was updating the thermodynamic library and related subroutines.

Collaborators

Types of changes

  • Hot fix (emergential bug fix to make ED2 run again)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (fix or feature that would cause existing functionality to change)

Changes in Settings, Input Files or Output Files

  • This feature requires changes in ED2IN
  • This feature requires changes in the XML parameter file
  • This feature requires changes in other input files
  • This feature will change output files

I added a new ED2IN flag as the choice of saturation vapour pressure (NL%ESAT_METHOD because the different approaches require different equations.

Expectation of Answer Changes:

  • No changes expected (bit-for-bit compatibility)
  • Changes expected with specific configurations (see details below)
  • Changes expected in all simulations (see details below)

Setting NL%ESAT_METHOD=1 should not impact the results. Using NL%ESAT_METHOD=2 will change results, but I do not expect major differences. My suggestion for the new formulation is simply to improve self consistency across various thermodynamic equations.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • ED2 Wiki update:

I will add information on the ESAT_METHOD on the Wiki if this pull request is merged to main.

Testing :

  • All new and existing tests passed.

… This is a more

elegant approach that, by definition, conforms with the Clausius-Clapeyron equation. For now
this is an optional approach (new ED2IN variable ESAT_METHOD), but in the long-term this
could become the only option.

I also removed the "newthermo" flag. Running ED2 with newthermo=.false. would  break energy
conservation, so there is no good scientific reason to keep it.

I also fixed a few minor bugs as I was updating the thermodynamic library and related
subroutines.
…lable. I did not

change any dependency linked to libcurl, I think it is just some issue with the new version
of Ubuntu. I tried to add an apt-get update to see if it helps...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant