source: trunk/libf/phyvenus/cpdet.F @ 4

Last change on this file since 4 was 3, checked in by slebonnois, 15 years ago

Creation de repertoires:

  • chantiers : pour communiquer sur nos projets de modifs
  • documentation : pour stocker les docs

Ajout de:

  • libf/phytitan : physique de Titan
  • libf/chimtitan: chimie de Titan
  • libf/phyvenus : physique de Venus
File size: 3.4 KB
Line 
1! ADAPTATION GCM POUR CP(T)
2c======================================================================
3c S. Lebonnois, 10/2007:
4c
5c VENUS: Cp(T) = cpp*(T/T0)^nu
6c avec T0=460. et nu=0.35
7c cpp=RCPD=cp0 = 1000.
8c R/RCPD = RKAPPA
9c
10c La fonction d'Exner reste pk = RCPD*(play/pref)**RKAPPA
11c
12c T et teta (temperature potentielle) sont liees par:
13c
14c   integrale[teta a T](cp/T dT) = integrale[pref a p](R/p dp)
15c
16c Dans le cas de l'expression pour Venus, ca donne:
17c
18c   teta**nu = T**nu - nu * T0**nu * ln[ (p/pref)**RKAPPA ]
19c ou
20c   teta**nu = T**nu - nu * T0**nu * ln[pk/RCPD]
21c
22c On passe de T a teta par t2tpot(t,teta,pk)
23c On passe de teta a T par tpot2t(teta,t,pk)
24c
25c Pour DT <-> Dteta, on utilise: dteta = dT *(T/teta)**(nu-1)
26c -> routine dt2dtpot(dt,dteta,t,teta)
27c (utilisee seulement pour le contregradient)
28c
29c======================================================================
30
31      FUNCTION cpdet(t)
32      IMPLICIT none
33#include "cpdet.h"
34
35      real cpdet,t
36
37      cpdet = cp0*(t/t0)**nu
38
39      return
40      end
41     
42c======================================================================
43c======================================================================
44
45      SUBROUTINE t2tpot(npoints,yt, yteta, ypk)
46      IMPLICIT none
47c======================================================================
48c Arguments:
49c
50c yt   --------input-R- Temperature
51c yteta-------output-R- Temperature potentielle
52c ypk  --------input-R- Fonction d'Exner: RCPD*(pplay/pref)**RKAPPA
53c
54c======================================================================
55#include "cpdet.h"
56
57      integer npoints
58      REAL    yt(npoints), yteta(npoints), ypk(npoints)
59     
60      yteta = yt**nu - nu * t0**nu * log(ypk/cp0)
61      yteta = yteta**(1./nu)
62       
63      return
64      end
65
66c======================================================================
67c======================================================================
68
69      SUBROUTINE tpot2t(npoints,yteta, yt, ypk)
70      IMPLICIT none
71c======================================================================
72c Arguments:
73c
74c yteta--------input-R- Temperature potentielle
75c yt   -------output-R- Temperature
76c ypk  --------input-R- Fonction d'Exner: RCPD*(pplay/pref)**RKAPPA
77c
78c======================================================================
79#include "cpdet.h"
80
81      integer npoints
82      REAL yt(npoints), yteta(npoints), ypk(npoints)
83
84      yt = yteta**nu + nu * t0**nu * log(ypk/cp0)
85      yt = yt**(1./nu)
86     
87      return
88      end
89
90c======================================================================
91c======================================================================
92
93      SUBROUTINE dt2dtpot(npoints,ydt, ydteta, yt, yteta, ypk, ydpk)
94      IMPLICIT none
95c======================================================================
96c Arguments:
97c
98c ydt  --------input-R- D Temperature
99c ydteta------output-R- D Temperature potentielle
100c yt   --------input-R- Temperature
101c yteta--------input-R- Temperature potentielle
102c ypk  --------input-R- Fonction d'Exner: RCPD*(pplay/pref)**RKAPPA
103c ydpk  -------input-R- D Fonction d'Exner
104c
105c======================================================================
106#include "cpdet.h"
107
108      integer npoints
109      REAL    ydt(npoints), ydteta(npoints), ydpk(npoints)
110      REAL    yt(npoints), yteta(npoints), ypk(npoints)
111     
112      ydteta =  yteta**(1.-nu)* (ydt * yt**(nu-1.)
113     .                           - t0**nu * ydpk / ypk)
114       
115      return
116      end
117
Note: See TracBrowser for help on using the repository browser.