Changeset 2343 for trunk/LMDZ.MARS/libf/phymars/co2sat.F
- Timestamp:
- Jun 9, 2020, 1:56:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/co2sat.F
r2341 r2343 1 SUBROUTINE co2sat(naersize,t,p,psat) 2 c SUBROUTINE co2sat(naersize,t,p,qsat) JA 3 IMPLICIT NONE 4 1 5 c======================================================================= 2 c SUBROUTINE co2sat 3 c----------------------------------------------------------------------- 4 c Aim: 5 c ---- 6 c Compute saturated steam pressure (from James et al, 1992) 6 c 7 c 8 c now: straight psat of CO2 (or qsat of CO2 but need of mmean) 9 c 7 10 c======================================================================= 8 subroutine co2sat(naersize, t, psat)9 10 implicit none11 c-----------------------------------------------------------------------12 c VARIABLES13 c-----------------------------------------------------------------------14 c Inputs:15 c -------16 integer, intent(in) ::17 & naersize ! dimension of tables t and psat18 19 real, intent(in) ::20 & t(naersize) ! temperature table21 11 22 c Output:23 c 24 real, intent(out) ::25 & psat(naersize) ! Saturated steam pressure (Pa) 12 c declarations: 13 c ------------- 14 c arguments: 15 c ---------- 26 16 27 c Local: 28 c ------ 29 integer :: 30 & i ! loop on naersize 31 c======================================================================= 32 c===== BEGIN 33 c======================================================================= 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======================================================================= 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 40 50 RETURN 41 51 END
Note: See TracChangeset
for help on using the changeset viewer.