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