Ignore:
Timestamp:
Jul 15, 2010, 5:21:22 PM (14 years ago)
Author:
idelkadi
Message:

Passage a la version cosp.v1.3 pour le Lidar et ISCCP
Corrections de bugs pour ISCCP et optimisation pour le Lidar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/cosp/cosp_utils.F90

    r1279 r1414  
    4040  END INTERFACE
    4141CONTAINS
     42
     43!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     44!------------------- SUBROUTINE COSP_PRECIP_MXRATIO --------------
     45!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     46SUBROUTINE COSP_PRECIP_MXRATIO(Npoints,Nlevels,Ncolumns,p,T,prec_frac,prec_type, &
     47                          n_ax,n_bx,alpha_x,c_x,d_x,g_x,a_x,b_x,gamma1,gamma2, &
     48                          flux,mxratio)
     49
     50    ! Input arguments, (IN)
     51    integer,intent(in) :: Npoints,Nlevels,Ncolumns
     52    real,intent(in),dimension(Npoints,Nlevels) :: p,T,flux
     53    real,intent(in),dimension(Npoints,Ncolumns,Nlevels) :: prec_frac
     54    real,intent(in) :: n_ax,n_bx,alpha_x,c_x,d_x,g_x,a_x,b_x,gamma1,gamma2,prec_type
     55    ! Input arguments, (OUT)
     56    real,intent(out),dimension(Npoints,Ncolumns,Nlevels) :: mxratio
     57    ! Local variables
     58    integer :: i,j,k
     59    real :: sigma,one_over_xip1,xi,rho0,rho
     60   
     61    mxratio = 0.0
     62
     63    if (n_ax >= 0.0) then ! N_ax is used to control which hydrometeors need to be computed
     64        !gamma1  = gamma(alpha_x + b_x + d_x + 1.0)
     65        !gamma2  = gamma(alpha_x + b_x + 1.0)
     66        xi      = d_x/(alpha_x + b_x - n_bx + 1.0)
     67        rho0    = 1.29
     68        sigma   = (gamma2/(gamma1*c_x))*(n_ax*a_x*gamma2)**xi
     69        one_over_xip1 = 1.0/(xi + 1.0)
     70       
     71        do k=1,Nlevels
     72            do j=1,Ncolumns
     73                do i=1,Npoints
     74                    if ((prec_frac(i,j,k)==prec_type).or.(prec_frac(i,j,k)==3.)) then
     75                        rho = p(i,k)/(287.05*T(i,k))
     76                        mxratio(i,j,k)=(flux(i,k)*((rho/rho0)**g_x)*sigma)**one_over_xip1
     77                        mxratio(i,j,k)=mxratio(i,j,k)/rho
     78                    endif
     79                enddo
     80            enddo
     81        enddo
     82    endif
     83END SUBROUTINE COSP_PRECIP_MXRATIO
    4284
    4385
Note: See TracChangeset for help on using the changeset viewer.