source: trunk/LMDZ.PLUTO.old/libf/phypluto/cooling_hcn_c2h2.F @ 3436

Last change on this file since 3436 was 3175, checked in by emillour, 11 months ago

Pluto PCM:
Add the old Pluto LMDZ for reference (required prior step to making
an LMDZ.PLUTO using the same framework as the other physics packages).
TB+EM

File size: 2.2 KB
Line 
1      subroutine cooling_hcn_c2h2(ngrid,nlayer,pplay,pt,dtlw)
2         
3      implicit none
4
5!==================================================================
6!     Purpose
7!     -------
8!     Calculation of cooling rate for C2H2-HCN
9!     = f(pplay) * B(lambda,T)
10!
11!     Inputs
12!     ------
13!     ngrid                 Number of vertical columns
14!     nlayer                Number of layers
15!     pt
16!
17!     Outputs
18!     -------
19!
20!     dtlw       ! cooling rate
21!
22!     Authors
23!     -------
24!     Tanguy Bertrand (2016)
25!     FF (2016)
26!==================================================================
27!     Arguments
28      INTEGER ngrid, nlayer
29      REAL pplay(ngrid,nlayer)            ! pres. level in GCM mid of layer
30      REAL pt(ngrid,nlayer)
31      REAL dtlw(ngrid,nlayer)
32!     Local variables
33      INTEGER l,ig
34      REAL lonw
35      REAL alpha, alpha_top
36      REAL pref, deltap
37      REAL transition
38      REAL BB
39!-----------------------------------------------------------------------
40
41      lonw = 14.e-6  ! 14um
42      alpha_top=5.e-11  ! 1.e-13  ! cooling constant at top of atmosphere
43      !pref = 0.12      ! pressure at mid transition fo alpha_top (Pa)
44      pref = 0.02      ! pressure at mid transition fo alpha_top (Pa)
45      deltap = 0.1    ! width of transition to alpha_top (Pa) 
46      !lonw = 11.e-6  ! 14um
47      !alpha_top=1.e-9  ! 1.e-13  ! cooling constant at top of atmosphere
48      !pref = 0.06      ! pressure at mid transition fo alpha_top (Pa)
49      !deltap = 0.1    ! width of transition to alpha_top (Pa) 
50
51c     transition = 0 if p>pref+deltap/2 and 1 if p< pref-deltap/2
52      DO l = 1, nlayer
53         DO ig = 1, ngrid
54          transition  =  0.5*(1-tanh((pplay(ig,l)-pref)/deltap))
55          dtlw(ig,l)=-transition*alpha_top*BB(lonw,pt(ig,l))
56         ENDDO
57      ENDDO   
58      end
59
60c******************************************************
61c   FUNCTION Blackbody  (Planck)
62c**********************************************************
63      function BB (lw, T)
64c Variable declaration
65c --------------------
66c wavelenght (m), Temperature (K)
67      real lw,T
68c constant
69      real c1,c2
70      parameter ( c1=1.19103E-16 )
71      parameter (c2=1.43887E-2 )
72c function
73c---------
74      BB= (c1/lw**5)/(-1.+exp(c2/(lw*T)))
75      return
76      end
77
78
79
Note: See TracBrowser for help on using the repository browser.