source: trunk/LMDZ.MARS/libf/phymars/tcondco2.F90 @ 2156

Last change on this file since 2156 was 1932, checked in by aslmd, 6 years ago

corrected double exponent problem caught by picky compilers in tcondco2

File size: 694 bytes
RevLine 
[1816]1SUBROUTINE tcondco2(ngrid,nlay,p,q,tcond)
2       USE comcstfi_h
3       use conc_mod, only: mmean
4
5IMPLICIT NONE
6
7!---------------------------------------------------
8! Condensation temperature for co2 ice; based on
9! the saturation in co2sat.F JA17
10!--------------------------------------------------i
11
12integer, intent(in) :: ngrid,nlay
13real, intent(in), dimension(ngrid,nlay):: p,q
14double precision, intent(out), dimension(ngrid,nlay):: tcond ! CO2 condensation temperature     (atm)
15double precision:: A,B,pco2
16integer:: ig,l
17
[1932]18A=dlog(1.382d12)
[1816]19B=-3182.48
20
21DO l=1,nlay
22   DO ig=1,ngrid
23      pco2 = q(ig,l) * (mmean(ig,l)/44.01) * p(ig,l)
24      tcond(ig,l)=B/(dlog(pco2)-A)
25    enddo
26enddo
27
28end
Note: See TracBrowser for help on using the repository browser.