source: LMDZ6/branches/Ocean_skin/libf/phylmd/o3cm.F90 @ 3627

Last change on this file since 3627 was 2311, checked in by Ehouarn Millour, 9 years ago

Further modifications to enforce physics/dynamics separation:

  • moved iniprint.h and misc_mod back to dyn3d_common, as these should only be used by dynamics.
  • created print_control_mod in the physics to store flags prt_level, lunout, debug to be local to physics (should be used rather than iniprint.h)
  • created abort_physic.F90 , which does the same job as abort_gcm() did, but should be used instead when in physics.
  • reactivated inifis (turned it into a module, inifis_mod.F90) to initialize physical constants and print_control_mod flags.

EM

  • 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1
2! $Id: o3cm.F90 2311 2015-06-25 07:45:24Z lguez $
3
4SUBROUTINE o3cm(amb, bmb, sortie, ntab)
5  IMPLICIT NONE
6  ! ======================================================================
7  ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19930818
8  ! Objet: Ce programme calcule le contenu en ozone "sortie"
9  ! (unite: cm.atm) entre deux niveaux "amb" et "bmb" (unite: mb)
10  ! "ntab" est le nombre d'intervalles pour l'integration, sa
11  ! valeur depend bien sur de l'epaisseur de la couche et de
12  ! la precision qu'on souhaite a obtenir
13  ! ======================================================================
14  REAL amb, bmb, sortie
15  INTEGER ntab
16  ! ======================================================================
17  INTEGER n
18  REAL xtab(500), xa, xb, ya, yb, xincr
19  ! ======================================================================
20  EXTERNAL mbtozm
21  CHARACTER (LEN=20) :: modname = ''
22  CHARACTER (LEN=80) :: abort_message
23  ! ======================================================================
24  ! la fonction en ligne w(x) donne le profil de l'ozone en fonction
25  ! de l'altitude (unite: cm.atm / km)
26  ! (Green 1964, Appl. Opt. 3: 203-208)
27  REAL wp, xp, h, x, w, con
28  PARAMETER (wp=0.218, xp=23.25, h=4.63, con=1.0)
29
30  w(x) = wp/h*exp((x-xp)/h)/(con+exp((x-xp)/h))**2
31  ! ======================================================================
32  IF (ntab>499) THEN
33    abort_message = 'BIG ntab'
34    CALL abort_physic(modname, abort_message, 1)
35  END IF
36  xincr = (bmb-amb)/real(ntab)
37  xtab(1) = amb
38  DO n = 2, ntab
39    xtab(n) = xtab(n-1) + xincr
40  END DO
41  xtab(ntab+1) = bmb
42  sortie = 0.0
43  DO n = 1, ntab
44    CALL mbtozm(xtab(n), xa)
45    CALL mbtozm(xtab(n+1), xb)
46    xa = xa/1000.
47    xb = xb/1000.
48    ya = w(xa)
49    yb = w(xb)
50    sortie = sortie + (ya+yb)/2.0*abs(xb-xa)
51  END DO
52  RETURN
53END SUBROUTINE o3cm
54SUBROUTINE mbtozm(rmb, zm)
55  IMPLICIT NONE
56  ! ======================================================================
57  ! Auteur(s): Z.X. Li (LMD/CNRS)
58  ! Objet: transformer une hauteur de mb (rmb) en metre (zm)
59  ! ======================================================================
60  REAL rmb, zm
61  ! ======================================================================
62  REAL gama, tzero, pzero, g, r
63  PARAMETER (gama=6.5E-3, tzero=288., pzero=1013.25)
64  PARAMETER (g=9.81, r=287.0)
65
66  zm = tzero/gama*(1.-(rmb/pzero)**(r*gama/g))
67  RETURN
68END SUBROUTINE mbtozm
Note: See TracBrowser for help on using the repository browser.