Ignore:
Timestamp:
Jul 15, 2010, 5:34:00 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/branches/LMDZ4_AR5/libf/cosp/cosp.F90

    r1327 r1415  
    2323! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424
     25!!#include "cosp_defs.h"
    2526MODULE MOD_COSP
    2627  USE MOD_COSP_TYPES
     
    128129      !     and reff_zero    == .false.  Reff use in lidar and set to 0 for radar
    129130  endif
    130   if ((gbx%use_reff) .and. (reff_zero)) then ! Inconsistent choice. Want to use Reff but not inputs passed
    131         print *, '---------- COSP ERROR ------------'
    132         print *, ''
    133         print *, 'use_reff==.true. but Reff is always zero'
    134         print *, ''
    135         print *, '----------------------------------'
    136         stop
    137   endif
     131!  if ((gbx%use_reff) .and. (reff_zero)) then ! Inconsistent choice. Want to use Reff but not inputs passed
     132!        print *, '---------- COSP ERROR ------------'
     133!        print *, ''
     134!        print *, 'use_reff==.true. but Reff is always zero'
     135!        print *, ''
     136!        print *, '----------------------------------'
     137!        stop
     138!  endif
    138139  if ((.not. gbx%use_reff) .and. (reff_zero)) then ! No Reff in radar. Default in lidar
    139140        gbx%Reff = DEFAULT_LIDAR_REFF
     
    322323  integer :: Niter     ! Number of calls to cosp_simulator
    323324  integer :: i,j,k
     325  integer :: I_HYDRO
    324326  real,dimension(:,:),pointer :: column_frac_out ! Array with one column of frac_out
    325327  integer,parameter :: scops_debug=0    !  set to non-zero value to print out inputs for debugging in SCOPS
     
    330332  real,dimension(:,:),allocatable :: frac_ls,prec_ls,frac_cv,prec_cv ! Cloud/Precipitation fraction in each model level
    331333                                                                     ! Levels are from SURFACE to TOA
     334  real,dimension(:,:),allocatable :: rho ! (Npoints, Nlevels). Atmospheric dens
    332335  type(cosp_sghydro) :: sghydro   ! Subgrid info for hydrometeors en each iteration
    333336
     
    378381        do k=1,Nlevels,1
    379382            do i=1,Ncolumns,1
    380                 if (sgx%frac_out (j,i,Nlevels+1-k) .eq. 1) frac_ls(j,k)=frac_ls(j,k)+1.
    381                 if (sgx%frac_out (j,i,Nlevels+1-k) .eq. 2) frac_cv(j,k)=frac_cv(j,k)+1.
     383                if (sgx%frac_out (j,i,Nlevels+1-k) == I_LSC) frac_ls(j,k)=frac_ls(j,k)+1.
     384                if (sgx%frac_out (j,i,Nlevels+1-k) == I_CVC) frac_cv(j,k)=frac_cv(j,k)+1.
    382385                if (sgx%prec_frac(j,i,Nlevels+1-k) .eq. 1) prec_ls(j,k)=prec_ls(j,k)+1.
    383386                if (sgx%prec_frac(j,i,Nlevels+1-k) .eq. 2) prec_cv(j,k)=prec_cv(j,k)+1.
     
    414417            !--------- Mixing ratios for clouds and Reff for Clouds and precip -------
    415418            column_frac_out => sgx%frac_out(:,k,:)
    416             where (column_frac_out == 1)     !+++++++++++ LS clouds ++++++++
     419            where (column_frac_out == I_LSC)     !+++++++++++ LS clouds ++++++++
    417420                sghydro%mr_hydro(:,k,:,I_LSCLIQ) = gbx%mr_hydro(:,:,I_LSCLIQ)
    418421                sghydro%mr_hydro(:,k,:,I_LSCICE) = gbx%mr_hydro(:,:,I_LSCICE)
     
    423426                sghydro%Reff(:,k,:,I_LSSNOW)     = gbx%Reff(:,:,I_LSSNOW)
    424427                sghydro%Reff(:,k,:,I_LSGRPL)     = gbx%Reff(:,:,I_LSGRPL)
    425             elsewhere (column_frac_out == 2) !+++++++++++ CONV clouds ++++++++
     428            elsewhere (column_frac_out == I_CVC) !+++++++++++ CONV clouds ++++++++
    426429                sghydro%mr_hydro(:,k,:,I_CVCLIQ) = gbx%mr_hydro(:,:,I_CVCLIQ)
    427430                sghydro%mr_hydro(:,k,:,I_CVCICE) = gbx%mr_hydro(:,:,I_CVCICE)
     
    434437            !--------- Precip -------
    435438            if (.not. gbx%use_precipitation_fluxes) then
    436                 where (column_frac_out == 1)  !+++++++++++ LS Precipitation ++++++++
     439                where (column_frac_out == I_LSC)  !+++++++++++ LS Precipitation ++++++++
    437440                    sghydro%mr_hydro(:,k,:,I_LSRAIN) = gbx%mr_hydro(:,:,I_LSRAIN)
    438441                    sghydro%mr_hydro(:,k,:,I_LSSNOW) = gbx%mr_hydro(:,:,I_LSSNOW)
    439442                    sghydro%mr_hydro(:,k,:,I_LSGRPL) = gbx%mr_hydro(:,:,I_LSGRPL)
    440                 elsewhere (column_frac_out == 2) !+++++++++++ CONV Precipitation ++++++++
     443                elsewhere (column_frac_out == I_CVC) !+++++++++++ CONV Precipitation ++++++++
    441444                    sghydro%mr_hydro(:,k,:,I_CVRAIN) = gbx%mr_hydro(:,:,I_CVRAIN)
    442445                    sghydro%mr_hydro(:,k,:,I_CVSNOW) = gbx%mr_hydro(:,:,I_CVSNOW)
     
    488491                        sghydro%mr_hydro(:,:,:,I_LSRAIN),sghydro%mr_hydro(:,:,:,I_LSSNOW),sghydro%mr_hydro(:,:,:,I_LSGRPL), &
    489492                        sghydro%mr_hydro(:,:,:,I_CVRAIN),sghydro%mr_hydro(:,:,:,I_CVSNOW))
    490         endif
     493       endif
    491494   !++++++++++ CRM mode ++++++++++
    492495   else
Note: See TracChangeset for help on using the changeset viewer.