Ignore:
Timestamp:
Jan 27, 2016, 10:42:32 AM (8 years ago)
Author:
idelkadi
Message:

Mise a jour du simulateur COSP (passage de la version v3.2 a la version v1.4) :

  • mise a jour des sources pour ISCCP, CALIPSO et PARASOL
  • prise en compte des changements de phases pour les nuages (Calipso)
  • rajout de plusieurs diagnostiques (fraction nuageuse en fonction de la temperature, ...)

http://lmdz.lmd.jussieu.fr/Members/aidelkadi/cosp

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 $
    13  function gases(PRES_mb,T,RH,f)
    24  implicit none
     
    3032  real*8, dimension(nbands_o2) :: v0, a1, a2, a3, a4, a5, a6
    3133  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
    3237  integer :: i
    3338 
     
    110115 
    111116! // 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)
    115124
    116125! // term1
    117126  sumo = 0.
     127  aux1 = 1.1*e_th
    118128  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
    121140  enddo
    122141  term1 = sumo
     
    131150! // term3
    132151  sumo = 0.
     152  aux1 = 4.8*e_th
    133153  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
    136165  enddo
    137166  term3 = sumo
     
    146175  gases = 0.182*f*npp
    147176
    148 ! ----- SUB FUNCTIONS -----
    149    
    150   contains
    151  
    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,v0
    154   real*8 :: gm, delt, x, y
    155   gm = a3*(p*th**(0.8-a4)+1.1*e*th)
    156   delt = a5*p*th**(a6)
    157   x = (v0-f)**2+gm**2
    158   y = (v0+f)**2+gm**2
    159   fpp_o2 = ((1./x)+(1./y))*(gm*f/v0) - (delt*f/v0)*(((v0-f)/(x))-((v0+f)/(x))) 
    160   end function fpp_o2
    161  
    162   function fpp_h2o(p,th,e,b3,f,v0)
    163   real*8 :: fpp_h2o,p,th,e,b3,f,v0
    164   real*8 :: gm, delt, x, y
    165   gm = b3*(p*th**(0.8)+4.8*e*th)
    166   delt = 0.
    167   x = (v0-f)**2+gm**2
    168   y = (v0+f)**2+gm**2
    169   fpp_h2o = ((1./x)+(1./y))*(gm*f/v0) - (delt*f/v0)*(((v0-f)/(x))-((v0+f)/(x)))
    170   end function fpp_h2o
    171  
    172   function s_o2(p,th,a1,a2)
    173   real*8 :: s_o2,p,th,a1,a2
    174   s_o2 = a1*p*th**(3)*exp(a2*(1-th))
    175   end function s_o2
    176 
    177   function s_h2o(th,e,b1,b2)
    178   real*8 :: s_h2o,th,e,b1,b2
    179   s_h2o = b1*e*th**(3.5)*exp(b2*(1-th))
    180   end function s_h2o
    181  
    182177  end function gases
Note: See TracChangeset for help on using the changeset viewer.