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