Last change
on this file since 222 was
222,
checked in by ymipsl, 10 years ago
|
Creating temporary dynamico/lmdz/saturn branche
YM
|
File size:
1.2 KB
|
Rev | Line | |
---|
[222] | 1 | subroutine watersat(T,p,qsat) |
---|
| 2 | |
---|
| 3 | use watercommon_h, only: T_h2O_ice_liq, epsi |
---|
| 4 | implicit none |
---|
| 5 | |
---|
| 6 | !================================================================== |
---|
| 7 | ! Purpose |
---|
| 8 | ! ------- |
---|
| 9 | ! Compute the water mass mixing ratio at saturation (kg/kg) |
---|
| 10 | ! for a given pressure (Pa) and temperature (K) |
---|
| 11 | ! A replacement for the old watersat.F in the Martian GCM. |
---|
| 12 | ! Based on FCTTRE.h in the LMDTERRE model. |
---|
| 13 | ! |
---|
| 14 | ! Authors |
---|
| 15 | ! ------- |
---|
| 16 | ! Robin Wordsworth (2010) |
---|
| 17 | ! |
---|
| 18 | !================================================================== |
---|
| 19 | |
---|
| 20 | ! input |
---|
| 21 | real T, p |
---|
| 22 | |
---|
| 23 | ! output |
---|
| 24 | real qsat |
---|
| 25 | |
---|
| 26 | ! checked vs. NIST data 22/06/2010 by RW. |
---|
| 27 | ! / by p gives partial pressure |
---|
| 28 | ! x by epsi converts to mass mixing ratio |
---|
| 29 | |
---|
| 30 | if (T.lt.T_h2O_ice_liq) then ! solid / vapour |
---|
| 31 | qsat = 100.0 * 10**(2.07023 - 0.00320991 & |
---|
| 32 | * T - 2484.896 / T + 3.56654 * alog10(T)) |
---|
| 33 | else ! liquid / vapour |
---|
| 34 | qsat = 100.0 * 10**(23.8319 - 2948.964 / T - 5.028 & |
---|
| 35 | * alog10(T) - 29810.16 * exp( -0.0699382 * T) & |
---|
| 36 | + 25.21935 * exp(-2999.924/T)) |
---|
| 37 | endif |
---|
| 38 | ! qsat=epsi*qsat/p |
---|
| 39 | if(qsat.gt.p) then |
---|
| 40 | qsat=1. |
---|
| 41 | else |
---|
| 42 | qsat=epsi*qsat/(p-(1.-epsi)*qsat) |
---|
| 43 | endif |
---|
| 44 | return |
---|
| 45 | end subroutine watersat |
---|
Note: See
TracBrowser
for help on using the repository browser.