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

Last change on this file since 3026 was 2616, checked in by romain.vande, 3 years ago

LMDZ_MARS RV : Open_MP;
Put all the "save" variables as "!$OMP THREADPRIVATE" in phymars.
The code can now be tested, see README for more info

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