source: trunk/LMDZ.PLUTO.old/libf/phypluto/kastprof_fn.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: 1.2 KB
Line 
1      subroutine kastprof_fn(tsurf,temp,play,plev)
2      IMPLICIT NONE
3
4c     creates a kasting temperature profile
5
6#include "dimensions.h"
7#include "dimphys.h"
8#include "comcstfi.h"
9
10
11      REAL play(nlayermx)   ! Pressure at the middle of the layers (Pa)
12      REAL plev(nlayermx+1) ! intermediate pressure levels (pa)
13      REAL psurf,tsurf     
14      REAL tcond (nlayermx)
15      REAL temp(nlayermx)   ! temperature at the middle of the layers
16
17      real*8 Gamma, dz
18      integer l
19
20!     dTdp = (-RT/gp)*Gamma
21
22!     ideal gas lapse rate
23      Gamma = -5.0556 ! K / km
24
25!     1st layer
26      dz = (plev(1) - play(1)) * (R * tsurf / (g*play(1)))
27      temp(1)=tsurf+dz*Gamma/1000
28
29!     other layers
30      DO l=2,nlayermx
31         dz = (play(l-1) - play(l)) * (R * temp(l-1) / (g*play(l)))
32         temp(l)=temp(l-1)+dz*Gamma/1000 ! convective lower troposphere
33
34!        FORMULE FANALE POUR 100% N2
35!         tcond(l)=(-3167.8)/(log(.01*play(l))-23.23)
36         tcond(1) = (1.)/(0.026315-0.0011877*log(.7143*play(1)))
37         if (temp(l) .lt. tcond(l)) temp(l)= tcond(l) ! condensing upper troposphere
38!         if (temp(l) .lt. 167.) temp(l)= 167.0 ! isothermal stratosphere
39
40      ENDDO
41
42      return
43      end
Note: See TracBrowser for help on using the repository browser.