source: LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/mod_cosp_lidar.F90 @ 5159

Last change on this file since 5159 was 5158, checked in by abarral, 5 months ago

Add missing klon on strataer_emiss_mod.F90
Correct various missing explicit declarations
Replace tabs by spaces (tabs are not part of the fortran charset)
Continue cleaning modules
Removed unused arguments and variables

  • 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! History:
28! Jul 2007 - A. Bodas-Salcedo - Initial version
29! Oct 2008 - S. Bony          - Instructions "Call for large-scale cloud" removed  -> sgx%frac_out is used instead.
30!                               Call lidar_simulator changed (lsca, gbx%cca and depol removed;
31!                               frac_out changed in sgx%frac_out)
32! Jun 2011 - G. Cesana        - Added betaperp_tot argument
33
34
35MODULE MOD_COSP_LIDAR
36  USE MOD_COSP_CONSTANTS
37  USE MOD_COSP_TYPES
38  IMPLICIT NONE
39
40CONTAINS
41
42
43!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44!------------------- SUBROUTINE COSP_LIDAR ------------------------
45!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46SUBROUTINE COSP_LIDAR(gbx,sgx,sghydro,y)
47
48  ! Arguments
49  type(cosp_gridbox),intent(in) :: gbx  ! Gridbox info
50  type(cosp_subgrid),intent(in) :: sgx  ! Subgrid info
51  type(cosp_sghydro),intent(in) :: sghydro  ! Subgrid info for hydrometeors
52  type(cosp_sglidar),intent(inout) :: y ! Subgrid output
53
54  ! Local variables
55  integer :: i
56  REAL :: presf(sgx%Npoints, sgx%Nlevels + 1)
57  real,dimension(sgx%Npoints, sgx%Nlevels) :: lsca,mr_ll,mr_li,mr_cl,mr_ci
58  real,dimension(sgx%Npoints, sgx%Nlevels) :: beta_tot,tau_tot
59  real,dimension(sgx%Npoints, sgx%Nlevels) :: betaperp_tot
60  real,dimension(sgx%Npoints, PARASOL_NREFL)  :: refle
61
62  presf(:,1:sgx%Nlevels) = gbx%ph
63  presf(:,sgx%Nlevels + 1) = 0.0
64  lsca = gbx%tca-gbx%cca
65  DO i=1,sgx%Ncolumns
66      ! Temporary arrays for simulator call
67      mr_ll(:,:) = sghydro%mr_hydro(:,i,:,I_LSCLIQ)
68      mr_li(:,:) = sghydro%mr_hydro(:,i,:,I_LSCICE)
69      mr_cl(:,:) = sghydro%mr_hydro(:,i,:,I_CVCLIQ)
70      mr_ci(:,:) = sghydro%mr_hydro(:,i,:,I_CVCICE)
71      call lidar_simulator(sgx%Npoints, sgx%Nlevels, 4, PARASOL_NREFL, LIDAR_UNDEF  &
72                 , gbx%p, presf, gbx%T, mr_ll, mr_li, mr_cl, mr_ci &
73                 , gbx%Reff(:,:,I_LSCLIQ), gbx%Reff(:,:,I_LSCICE) &
74                 , gbx%Reff(:,:,I_CVCLIQ), gbx%Reff(:,:,I_CVCICE) &
75                 , gbx%lidar_ice_type, y%beta_mol, beta_tot &
76                 , betaperp_tot, tau_tot, refle )
77
78      y%betaperp_tot(:,i,:) = betaperp_tot(:,:)
79      y%beta_tot(:,i,:) = beta_tot(:,:)
80      y%tau_tot(:,i,:)  = tau_tot(:,:)
81      y%refl(:,i,:)     = refle(:,:)
82  enddo
83
84END SUBROUTINE COSP_LIDAR
85
86END MODULE MOD_COSP_LIDAR
Note: See TracBrowser for help on using the repository browser.