Changeset 2350 for trunk/LMDZ.MARS/libf/phymars/co2sat.F
- Timestamp:
- Jun 9, 2020, 3:27:39 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/co2sat.F
r2349 r2350 1 SUBROUTINE co2sat(naersize,t,p,psat) 2 c SUBROUTINE co2sat(naersize,t,p,qsat) JA 3 IMPLICIT NONE 1 c======================================================================= 2 c SUBROUTINE co2sat 3 c----------------------------------------------------------------------- 4 c Aim: 5 c ---- 6 c Compute saturated steam pressure (from James et al, 1992) 7 c======================================================================= 8 subroutine co2sat(naersize, t, psat) 9 10 implicit none 11 c----------------------------------------------------------------------- 12 c VARIABLES 13 c----------------------------------------------------------------------- 14 c Inputs: 15 c ------- 16 integer, intent(in) :: 17 & naersize ! dimension of tables t and psat 18 19 real, intent(in) :: 20 & t(naersize) ! temperature table 4 21 22 c Output: 23 c ------- 24 real, intent(out) :: 25 & psat(naersize) ! Saturated steam pressure (Pa) 26 27 c Local: 28 c ------ 29 integer :: 30 & i ! loop on naersize 5 31 c======================================================================= 6 c 7 c 8 c now: straight psat of CO2 (or qsat of CO2 but need of mmean) 9 c 32 c===== BEGIN 10 33 c======================================================================= 11 12 c declarations: 13 c ------------- 14 c arguments: 15 c ---------- 16 17 c INPUT 18 integer naersize 19 real t(naersize) , p(naersize) 20 c OUTPUT 21 c real qsat(naersize) JA 22 real psat(naersize) 23 24 c local: 25 c ------ 26 INTEGER i 27 REAL r2,r3,r4 , To, es 28 SAVE r2,r3,r4 29 DATA r2,r3,r4/611.14,21.875,7.66/ 30 SAVE To 31 DATA To/273.16/ 32 33 do i=1,naersize 34 35 36 c pression de vapeur saturante (James et al. 1992): 37 38 psat(i) = 1.382 * 1e12 * exp(-3182.48/t(i)) !; (Pa) 39 40 c OR: 41 42 c qsat(i) = psat/p(i)*44.01/mmean ! Need of updated information on mmean 43 c qsat(i) = max(qsat(i), 1.e-30) 44 45 46 enddo 47 c qsat=psat JA 48 49 34 do i = 1, naersize 35 psat(i) = 1.382 * 1e12 * exp(-3182.48/t(i)) 36 end do 37 c======================================================================= 38 c===== END 39 c======================================================================= 50 40 RETURN 51 41 END
Note: See TracChangeset
for help on using the changeset viewer.