subroutine methanesat(nsize,t,p,qsat,qsurf_n2) ! use callkeys_mod use dimphy, only: klon IMPLICIT NONE !======================================================================= ! ! Methane mass mixing ratio at saturation (kg/kg) for a given pressure (Pa) ! and Temperature (K) array ! !======================================================================= #include "dimensions.h" ! INPUT integer nsize real t(nsize) , p(nsize) ! OUTPUT real qsat(nsize),qsurf_n2(nsize) INTEGER i do i=1,nsize ! from Fray and schmitt fit by formulation L = 6.125e5 J/kg ! qsat(i)=0.117*exp((16*612.5/8.314)*(1/90.7-1/t(i)))*100000 qsat(i)=0.117*exp((1178.734664)*(0.01102536-1/t(i)))*100000 qsat(i)=qsat(i)* 16.0 / (28.0*p(i)) ! security : qsat(i)=min(qsat(i),0.99) enddo ! Raoult law if mixte in N2 ice : assume 0.5% CH4 in N2 if (nsize.le.klon) then do i=1,nsize if (qsurf_n2(i).gt.0.001) qsat(i)=qsat(i)*0.005 !*(1.-dayfrac) ! .5 /100 end do endif return end subroutine methanesat