source: LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_misr_simulator.F90 @ 4744

Last change on this file since 4744 was 3233, checked in by idelkadi, 7 years ago

Nettoyage du code :

  • changement de nomes des routines pour avoir les memes nome des modules
  • corrections
  • dos2unix appliquee aux fichiers
  • 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: 3.5 KB
Line 
1! (c) British Crown Copyright 2008, the Met Office.
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_misr_simulator.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! Nov 2008 - A. Bodas-Salcedo - Initial version
30!
31!
32
33MODULE MOD_COSP_MISR_SIMULATOR
34  USE MOD_COSP_CONSTANTS
35  USE MOD_COSP_TYPES
36  IMPLICIT NONE
37
38CONTAINS
39
40
41!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42!-------------- SUBROUTINE COSP_MISR_SIMULATOR -----------------
43!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44SUBROUTINE COSP_MISR_SIMULATOR(gbx,sgx,y)
45 
46  ! Arguments
47  type(cosp_gridbox),intent(in) :: gbx  ! Gridbox info
48  type(cosp_subgrid),intent(in) :: sgx  ! Subgridbox info
49  type(cosp_misr),intent(inout) :: y    ! MISR simulator output
50 
51  ! Local variables
52  integer :: Nlevels,Npoints
53  real :: dtau_s(gbx%Npoints, gbx%Nlevels)
54  real :: dtau_c(gbx%Npoints, gbx%Nlevels)
55  real :: at(gbx%Npoints, gbx%Nlevels)
56  real :: frac_out(gbx%Npoints, gbx%Ncolumns, gbx%Nlevels)
57  integer :: sunlit(gbx%Npoints)
58 
59  real :: zfull(gbx%Npoints, gbx%Nlevels) !  height (in meters) of full model levels (i.e. midpoints)
60                                          !  zfull(npoints,1)    is    top level of model
61                                          !  zfull(npoints,nlev) is bottom level of model
62     
63   
64  Nlevels = gbx%Nlevels
65  Npoints = gbx%Npoints
66  ! Levels from TOA to surface
67  zfull  = gbx%zlev(:,Nlevels:1:-1)
68  at     = gbx%T(:,Nlevels:1:-1)
69  dtau_s = gbx%dtau_s(:,Nlevels:1:-1)
70  dtau_c = gbx%dtau_c(:,Nlevels:1:-1)
71  frac_out(1:Npoints,:,1:Nlevels) = sgx%frac_out(1:Npoints,:,Nlevels:1:-1)
72  sunlit = int(gbx%sunlit)
73 
74  call MISR_simulator(gbx%npoints,gbx%nlevels,gbx%ncolumns,&
75                     sunlit,zfull,at,dtau_s,dtau_c,frac_out, R_UNDEF, &
76                     y%fq_MISR,y%MISR_dist_model_layertops,y%MISR_meanztop,y%MISR_cldarea)
77           
78END SUBROUTINE COSP_MISR_SIMULATOR
79
80END MODULE MOD_COSP_MISR_SIMULATOR
Note: See TracBrowser for help on using the repository browser.