source: trunk/LMDZ.PLUTO.old/libf/phypluto/cooling_hcn_c2h2.F_old @ 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.5 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
28!-----------------------------------------------------------------------
29
30!     Arguments
31
32      INTEGER ngrid, nlayer
33      REAL pplay(ngrid,nlayer)            ! pres. level in GCM mid of layer
34      REAL pt(ngrid,nlayer)
35      REAL dtlw(ngrid,nlayer)
36
37!-----------------------------------------------------------------------
38!     Local variables
39
40      INTEGER l,ig
41      REAL lonw
42      REAL alpha, alpha_top
43      REAL pref, deltap
44      REAL transition
45      REAL BB
46      REAL coeftan
47!-----------------------------------------------------------------------
48
49     
50      !alpha=(/0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,1.e-13,1.e-13,1.e-13,1.e-13,1.e-13,1.e-13,1.e-13/)
51!     alpha=(/0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,1.e-14,8.e-14,5.e-13,7.e-13,7.e-13,7.e-13,7.e-13,7.e-13,7.e-13,7.e-13,7.e-13/)
52
53      lonw = 11.e-6  ! 14um
54      alpha_top=1.e-9  ! 1.e-13  ! cooling constant at top of atmosphere
55      pref = 0.06      ! pressure at mid transition fo alpha_top (Pa)
56      deltap = 0.70    ! width of transition to alpha_top (Pa) 
57      coeftan= 7.5       
58
59c     transition = 0 if p>pref+deltap/2 and 1 if p< pref-deltap/2
60      DO l = 1, nlayer
61         DO ig = 1, ngrid
62          transition  =  0.5*(1-tanh(coeftan*(pplay(ig,l)-pref)/deltap))
63          dtlw(ig,l)=-transition*alpha_top*BB(lonw,pt(ig,l))
64         ENDDO
65c        write(*,*) pplay(1,l),transition,dtlw(1,l)
66      ENDDO   
67      end
68
69c******************************************************
70c   FUNCTION Blackbody  (Planck)
71c**********************************************************
72
73      function BB (lw, T)
74
75
76c Variable declaration
77c --------------------
78c wavelenght (m), Temperature (K)
79      real lw,T
80c constant
81      real c1,c2
82      parameter ( c1=1.19103E-16 )
83      parameter (c2=1.43887E-2 )
84
85
86c function
87c---------
88      BB= (c1/lw**5)/(-1.+exp(c2/(lw*T)))
89      return
90      end
91
92
93
Note: See TracBrowser for help on using the repository browser.