NCAR / icar

The Intermediate Complexity Atmospheric Research model (ICAR)
MIT License
72 stars 53 forks source link

inconsistent saturation vapor pressure formulas #33

Closed ghost closed 3 years ago

ghost commented 7 years ago

Is there a reason why the saturation vapor pressure formulas are different in the LSM driver (https://github.com/NCAR/icar/blob/master/physics/lsm_driver.f90#L110) and the the simple radiation code (https://github.com/NCAR/icar/blob/master/physics/ra_simple.f90#L88)?

If not, the ra_simple version could be updated for consistency.

gutmann commented 7 years ago

No, there is no good reason.

I (or someone) need to make a completely separate atm_functions module in the utilities directory to keep a number of common functions such as this so they can be called from anywhere in the code but only have to be updated in one place. I suspect I looked in different places when writing those codes, and then decided for the LSM that I needed to incorporate ice vs liquid saturation. This gets used in the open water routine, and probably a number of other places that it is duplicated too. Poor style I know...

https://github.com/NCAR/icar/blob/master/physics/water_simple.f90#L16

gutmann commented 3 years ago

This has actually been done for a while (in the v2 branch at least) so closing this now. Although more work could be done to make sure other physics are consistent, the physics parameterizations themselves are often written by others, and it may be important to keep their calculations the same as they are doing now.

trudeeidhammer commented 3 years ago

The microphysics codes has their own functions as well for saturation vapor calculations.

On Thu, Nov 12, 2020 at 9:44 PM Ethan Gutmann notifications@github.com wrote:

Closed #33 https://github.com/NCAR/icar/issues/33.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NCAR/icar/issues/33#event-3991768250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD24I5LP54LJ527IBFAD6ITSPS2R3ANCNFSM4DS5IU6A .

-- Dr. Trude Eidhammer Project Scientist II Research Applications Laboratory (RAL) National Center for Atmospheric Research (NCAR) P.O. Box 3000 Boulder, CO 80307-3000, USA