Changeset 2435 for LMDZ5/branches/testing/libf/phylmd/cosp/cosp_utils.F90
- Timestamp:
- Jan 28, 2016, 5:02:13 PM (9 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2397-2403,2405-2407,2410-2413,2415-2424,2426-2429,2431-2432,2434
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/cosp/cosp_utils.F90
r2298 r2435 1 1 ! (c) British Crown Copyright 2008, the Met Office. 2 2 ! All rights reserved. 3 ! $Revision: 23 $, $Date: 2011-03-31 15:41:37 +0200 (jeu. 31 mars 2011) $ 4 ! $URL: http://cfmip-obs-sim.googlecode.com/svn/stable/v1.4.0/cosp_utils.F90 $ 3 5 ! 4 6 ! Redistribution and use in source and binary forms, with or without modification, are permitted … … 45 47 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 46 48 SUBROUTINE 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 n_ax,n_bx,alpha_x,c_x,d_x,g_x,a_x,b_x,gamma1,gamma2,gamma3,gamma4, & 50 flux,mxratio,reff) 49 51 50 52 ! Input arguments, (IN) … … 52 54 real,intent(in),dimension(Npoints,Nlevels) :: p,T,flux 53 55 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_type56 real,intent(in) :: n_ax,n_bx,alpha_x,c_x,d_x,g_x,a_x,b_x,gamma1,gamma2,gamma3,gamma4,prec_type 55 57 ! Input arguments, (OUT) 56 58 real,intent(out),dimension(Npoints,Ncolumns,Nlevels) :: mxratio 59 real,intent(inout),dimension(Npoints,Ncolumns,Nlevels) :: reff 57 60 ! Local variables 58 61 integer :: i,j,k 59 real :: sigma,one_over_xip1,xi,rho0,rho 62 real :: sigma,one_over_xip1,xi,rho0,rho,lambda_x,gamma_4_3_2,delta 60 63 61 64 mxratio = 0.0 62 65 63 66 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 67 xi = d_x/(alpha_x + b_x - n_bx + 1.0) 67 68 rho0 = 1.29 68 69 sigma = (gamma2/(gamma1*c_x))*(n_ax*a_x*gamma2)**xi 69 70 one_over_xip1 = 1.0/(xi + 1.0) 71 gamma_4_3_2 = 0.5*gamma4/gamma3 72 delta = (alpha_x + b_x + d_x - n_bx + 1.0) 70 73 71 74 do k=1,Nlevels … … 76 79 mxratio(i,j,k)=(flux(i,k)*((rho/rho0)**g_x)*sigma)**one_over_xip1 77 80 mxratio(i,j,k)=mxratio(i,j,k)/rho 81 ! Compute effective radius 82 if ((reff(i,j,k) <= 0.0).and.(flux(i,k) /= 0.0)) then 83 lambda_x = (a_x*c_x*((rho0/rho)**g_x)*n_ax*gamma1/flux(i,k))**(1./delta) 84 reff(i,j,k) = gamma_4_3_2/lambda_x 85 endif 78 86 endif 79 87 enddo
Note: See TracChangeset
for help on using the changeset viewer.