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