Changeset 2428 for LMDZ5/trunk/libf/phylmd/cosp/gases.F90
- Timestamp:
- Jan 27, 2016, 10:42:32 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/cosp/gases.F90
r1907 r2428 1 ! $Revision: 88 $, $Date: 2013-11-13 15:08:38 +0100 (mer. 13 nov. 2013) $ 2 ! $URL: http://cfmip-obs-sim.googlecode.com/svn/stable/v1.4.0/quickbeam/gases.f90 $ 1 3 function gases(PRES_mb,T,RH,f) 2 4 implicit none … … 30 32 real*8, dimension(nbands_o2) :: v0, a1, a2, a3, a4, a5, a6 31 33 real*8, dimension(nbands_h2o) :: v1, b1, b2, b3 34 real*8 :: e_th,one_th,pth3,eth35,aux1,aux2,aux3,aux4 35 real*8 :: gm,delt,x,y,gm2 36 real*8 :: fpp_o2,fpp_h2o,s_o2,s_h2o 32 37 integer :: i 33 38 … … 110 115 111 116 ! // conversions 112 th = 300./T ! unitless 113 e = (RH*th**5)/(41.45*10**(9.834*th-10)) ! kPa 114 p = PRES_mb/10.-e ! kPa 117 th = 300./T ! unitless 118 e = (RH*th**5)/(41.45*10**(9.834*th-10)) ! kPa 119 p = PRES_mb/10.-e ! kPa 120 e_th = e*th 121 one_th = 1 - th 122 pth3 = p*th**(3) 123 eth35 = e*th**(3.5) 115 124 116 125 ! // term1 117 126 sumo = 0. 127 aux1 = 1.1*e_th 118 128 do i=1,nbands_o2 119 sumo = sumo + fpp_o2(p,th,e,a3(i),a4(i),a5(i),a6(i),f,v0(i)) & 120 * s_o2(p,th,a1(i),a2(i)) 129 aux2 = f/v0(i) 130 aux3 = v0(i)-f 131 aux4 = v0(i)+f 132 gm = a3(i)*(p*th**(0.8-a4(i))+aux1) 133 gm2 = gm**2 134 delt = a5(i)*p*th**a6(i) 135 x = aux3**2+gm2 136 y = aux4**2+gm2 137 fpp_o2 = (((1./x)+(1./y))*(gm*aux2) - (delt*aux2)*((aux3/(x))-(aux4/(x)))) 138 s_o2 = a1(i)*pth3*exp(a2(i)*one_th) 139 sumo = sumo + fpp_o2 * s_o2 121 140 enddo 122 141 term1 = sumo … … 131 150 ! // term3 132 151 sumo = 0. 152 aux1 = 4.8*e_th 133 153 do i=1,nbands_h2o 134 sumo = sumo + fpp_h2o(p,th,e,b3(i),f,v1(i)) & 135 * s_h2o(th,e,b1(i),b2(i)) 154 aux2 = f/v1(i) 155 aux3 = v1(i)-f 156 aux4 = v1(i)+f 157 gm = b3(i)*(p*th**(0.8)+aux1) 158 gm2 = gm**2 159 x = aux3**2+gm2 160 y = aux4**2+gm2 161 !delt = 0. 162 fpp_h2o = ((1./x)+(1./y))*(gm*aux2) ! - (delt*aux2)*((aux3/(x))-(aux4/(x))) 163 s_h2o = b1(i)*eth35*exp(b2(i)*one_th) 164 sumo = sumo + fpp_h2o * s_h2o 136 165 enddo 137 166 term3 = sumo … … 146 175 gases = 0.182*f*npp 147 176 148 ! ----- SUB FUNCTIONS -----149 150 contains151 152 function fpp_o2(p,th,e,a3,a4,a5,a6,f,v0)153 real*8 :: fpp_o2,p,th,e,a3,a4,a5,a6,f,v0154 real*8 :: gm, delt, x, y155 gm = a3*(p*th**(0.8-a4)+1.1*e*th)156 delt = a5*p*th**(a6)157 x = (v0-f)**2+gm**2158 y = (v0+f)**2+gm**2159 fpp_o2 = ((1./x)+(1./y))*(gm*f/v0) - (delt*f/v0)*(((v0-f)/(x))-((v0+f)/(x)))160 end function fpp_o2161 162 function fpp_h2o(p,th,e,b3,f,v0)163 real*8 :: fpp_h2o,p,th,e,b3,f,v0164 real*8 :: gm, delt, x, y165 gm = b3*(p*th**(0.8)+4.8*e*th)166 delt = 0.167 x = (v0-f)**2+gm**2168 y = (v0+f)**2+gm**2169 fpp_h2o = ((1./x)+(1./y))*(gm*f/v0) - (delt*f/v0)*(((v0-f)/(x))-((v0+f)/(x)))170 end function fpp_h2o171 172 function s_o2(p,th,a1,a2)173 real*8 :: s_o2,p,th,a1,a2174 s_o2 = a1*p*th**(3)*exp(a2*(1-th))175 end function s_o2176 177 function s_h2o(th,e,b1,b2)178 real*8 :: s_h2o,th,e,b1,b2179 s_h2o = b1*e*th**(3.5)*exp(b2*(1-th))180 end function s_h2o181 182 177 end function gases
Note: See TracChangeset
for help on using the changeset viewer.