source: LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/cosp_lidar.F90 @ 5005

Last change on this file since 5005 was 3411, checked in by Laurent Fairhead, 6 years ago

Undoing merge with trunk (r3356) to properly register Yann's latest modifications

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 4.0 KB
Line 
1! (c) British Crown Copyright 2008, the Met Office.
2! All rights reserved.
3! $Revision: 88 $, $Date: 2013-11-13 15:08:38 +0100 (mer. 13 nov. 2013) $
4! $URL: http://cfmip-obs-sim.googlecode.com/svn/stable/v1.4.0/cosp_lidar.F90 $
5!
6! Redistribution and use in source and binary forms, with or without modification, are permitted
7! provided that the following conditions are met:
8!
9!     * Redistributions of source code must retain the above copyright notice, this list
10!       of conditions and the following disclaimer.
11!     * Redistributions in binary form must reproduce the above copyright notice, this list
12!       of conditions and the following disclaimer in the documentation and/or other materials
13!       provided with the distribution.
14!     * Neither the name of the Met Office nor the names of its contributors may be used
15!       to endorse or promote products derived from this software without specific prior written
16!       permission.
17!
18! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24! IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27!
28! History:
29! Jul 2007 - A. Bodas-Salcedo - Initial version
30! Oct 2008 - S. Bony          - Instructions "Call for large-scale cloud" removed  -> sgx%frac_out is used instead.
31!                               Call lidar_simulator changed (lsca, gbx%cca and depol removed;
32!                               frac_out changed in sgx%frac_out)
33! Jun 2011 - G. Cesana        - Added betaperp_tot argument
34!
35!
36MODULE MOD_COSP_LIDAR
37  USE MOD_COSP_CONSTANTS
38  USE MOD_COSP_TYPES
39  IMPLICIT NONE
40
41CONTAINS
42
43
44!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45!------------------- SUBROUTINE COSP_LIDAR ------------------------
46!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47SUBROUTINE COSP_LIDAR(gbx,sgx,sghydro,y)
48
49  ! Arguments
50  type(cosp_gridbox),intent(in) :: gbx  ! Gridbox info
51  type(cosp_subgrid),intent(in) :: sgx  ! Subgrid info
52  type(cosp_sghydro),intent(in) :: sghydro  ! Subgrid info for hydrometeors
53  type(cosp_sglidar),intent(inout) :: y ! Subgrid output
54
55  ! Local variables
56  integer :: i
57  real :: presf(sgx%Npoints, sgx%Nlevels + 1)
58  real,dimension(sgx%Npoints, sgx%Nlevels) :: lsca,mr_ll,mr_li,mr_cl,mr_ci
59  real,dimension(sgx%Npoints, sgx%Nlevels) :: beta_tot,tau_tot
60  real,dimension(sgx%Npoints, sgx%Nlevels) :: betaperp_tot
61  real,dimension(sgx%Npoints, PARASOL_NREFL)  :: refle
62
63  presf(:,1:sgx%Nlevels) = gbx%ph
64  presf(:,sgx%Nlevels + 1) = 0.0
65  lsca = gbx%tca-gbx%cca
66  do i=1,sgx%Ncolumns
67      ! Temporary arrays for simulator call
68      mr_ll(:,:) = sghydro%mr_hydro(:,i,:,I_LSCLIQ)
69      mr_li(:,:) = sghydro%mr_hydro(:,i,:,I_LSCICE)
70      mr_cl(:,:) = sghydro%mr_hydro(:,i,:,I_CVCLIQ)
71      mr_ci(:,:) = sghydro%mr_hydro(:,i,:,I_CVCICE)
72      call lidar_simulator(sgx%Npoints, sgx%Nlevels, 4, PARASOL_NREFL, LIDAR_UNDEF  &
73                 , gbx%p, presf, gbx%T, mr_ll, mr_li, mr_cl, mr_ci &
74                 , gbx%Reff(:,:,I_LSCLIQ), gbx%Reff(:,:,I_LSCICE) &
75                 , gbx%Reff(:,:,I_CVCLIQ), gbx%Reff(:,:,I_CVCICE) &
76                 , gbx%lidar_ice_type, y%beta_mol, beta_tot &
77                 , betaperp_tot, tau_tot, refle )
78
79      y%betaperp_tot(:,i,:) = betaperp_tot(:,:)
80      y%beta_tot(:,i,:) = beta_tot(:,:)
81      y%tau_tot(:,i,:)  = tau_tot(:,:)
82      y%refl(:,i,:)     = refle(:,:)
83  enddo
84
85END SUBROUTINE COSP_LIDAR
86
87END MODULE MOD_COSP_LIDAR
Note: See TracBrowser for help on using the repository browser.