source: trunk/LMDZ.MARS/libf/phymars/swrayleigh.F @ 3740

Last change on this file since 3740 was 3740, checked in by emillour, 8 weeks ago

Mars PCM:
Code tidying; removed unused mufract.F (mucorr.F does the job); turned
ambiguously named sig.F to sig_h2o.F90 and make it a module.
EM

File size: 2.8 KB
Line 
1      MODULE swrayleigh_mod
2
3      IMPLICIT NONE
4     
5      CONTAINS
6     
7      SUBROUTINE swrayleigh(kdlon,knu,ppsol,prmu,prayl)
8
9       IMPLICIT NONE
10c=======================================================================
11c   subject:
12c   --------
13c   Computing total rayleigh scat atmospheric optical depth 
14c
15c   author: F.Forget
16c   ------
17c
18c   input:
19c   -----
20c   kdlon             Number of gridpoint of horizontal grid
21c    knu   :   Solar band # (1 or 2)
22c   ppsol             surface pressure (Pa)
23c   prmu         cos of solar zenith angle (=1 when sun at zenith)
24c           (CORRECTED for high zenith angle (atmosphere), unlike mu0)
25c
26c   output:
27c   -------
28c   prayl       column optical depth in each model column
29c
30c=======================================================================
31
32c-----------------------------------------------------------------------
33c
34c    Declarations :
35c    --------------
36c
37c    Input/Output
38c    ------------
39      INTEGER,INTENT(IN) :: kdlon, knu
40
41      real,intent(in) :: ppsol(kdlon),prmu(kdlon)
42      real,intent(out) :: prayl(kdlon)
43c
44c    Local variables :
45c    -----------------
46      integer JL, K
47c
48c   local saved variables
49c   ---------------------
50c     rayleigh scattering coefficients (from Morcrete et al.EARTH model !)
51      real cray(2,6)
52
53      DATA (CRAY(1,K),K=1,6) /
54     S     .428937E-01, .890743E+00,-.288555E+01,
55     S     .522744E+01,-.469173E+01, .161645E+01/
56
57      DATA (CRAY(2,K),K=1,6) /
58     S     .697200E-02, .173297E-01,-.850903E-01,
59     S     .248261E+00,-.302031E+00, .129662E+00/
60      save cray
61     
62!$OMP THREADPRIVATE(cray)
63     
64c----------------------------------------------------------------------
65
66      DO JL = 1 , KDLON
67
68c        Total Rayleigh Optical thickness on Earth at 101325 Pa level
69c        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70c        WARNING : the CRAY coefficients are only valid for
71c        Spectral interval used in Earth model !!!
72c        (i.e. 0.25-0.68 micron and 0.68-4.00 micron
73c         ---> should be modified for Mars model !!!
74
75         PRAYL(JL) = CRAY(KNU,1) + PRMU(JL) * (CRAY(KNU,2) + PRMU(JL)
76     S        * (CRAY(KNU,3) + PRMU(JL) * (CRAY(KNU,4) + PRMU(JL)
77     S        * (CRAY(KNU,5) + PRMU(JL) *   CRAY(KNU,6)       ))))
78
79c        Total local Rayleigh Optical thickness on Mars
80c        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81c           - PRAYL above is the total Rayleigh Optical thickness
82c             at  101325Pa for Earth atmosphere
83c           -> Total Rayleigh Optical thickness on Mars
84c              = PRAYL*(Psurf/101325)*9.81/g *2.5
85c              (Extinction coeff of CO2 = 2.5 * N2)
86
87c     (Comment the following line to get back bugged version before 01/2000)
88c        PRAYL(JL) = PRAYL(JL) * PPSOL(JL) * 2.42e-4/g
89
90      END DO
91
92      END SUBROUTINE swrayleigh
93
94      END MODULE swrayleigh_mod
Note: See TracBrowser for help on using the repository browser.