source: trunk/LMDZ.TITAN.old/libf/phytitan/cpdet_phy_mod.F90 @ 3303

Last change on this file since 3303 was 1621, checked in by emillour, 8 years ago

Further work on full dynamics/physics separation.

LMDZ.COMMON:

  • added phy_common/vertical_layers_mod.F90 to store information on vertical grid. This is where routines in the physics should get the information.
  • The contents of vertical_layers_mod intialized via dynphy_lonlat/inigeomphy_mod.F90.

LMDZ.MARS:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • created an "ini_tracer_mod" routine in module "tracer_mod" for a cleaner initialization of the later.
  • removed some purely dynamics-related outputs (etot0, zoom parameters, etc.) from diagfi.nc and stats.nc outputs as these informations are not available in the physics.

LMDZ.GENERIC:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • added nqtot to tracer_h.F90.
  • removed some purely dynamics-related outputs (etot0, zoom parameters, etc.) from diagfi.nc and stats.nc outputs as these informations are not available in the physics.

LMDZ.VENUS:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • added infotrac_phy.F90 to store information on tracers in the physics. Initialized via iniphysiq.
  • added cpdet_phy_mod.F90 to store t2tpot etc. functions to be used in the physics. Initialized via iniphysiq. IMPORTANT: there are some hard-coded constants! These should match what is in cpdet_mod.F90 in the dynamics.
  • got rid of references to moyzon_mod module within the physics. The required variables (tmoy, plevmoy) are passed to the physics as arguments to physiq.

LMDZ.TITAN:

  • added infotrac_phy.F90 to store information on tracers in the physics. Initialized via iniphysiq.
  • added cpdet_phy_mod.F90 to store t2tpot etc. functions to be used in the physics.
  • Extra work required to completely decouple physics and dynamics: moyzon_mod should be cleaned up and information passed from dynamics to physics as as arguments. Likewise moyzon_ch and moyzon_mu should not be queried from logic_mod (which is in the dynamics).

EM

File size: 1.9 KB
Line 
1module cpdet_phy_mod
2
3implicit none
4
5real,save :: cpp ! reference Cp
6
7contains
8
9      SUBROUTINE init_cpdet_phy(cpp_)
10      ! initialize module variables
11      REAL,INTENT(IN) :: cpp_ ! cpp from dynamics
12     
13      cpp=cpp_
14     
15      END SUBROUTINE init_cpdet_phy
16
17!======================================================================
18
19      FUNCTION cpdet(t)
20
21      IMPLICIT none
22
23! for now in Titan Cp does not change with temperature
24
25      real,intent(in) :: t
26      real cpdet
27
28      cpdet = cpp
29     
30      end function cpdet
31
32!======================================================================
33
34      SUBROUTINE t2tpot(npoints, yt, yteta, ypk)
35!======================================================================
36! Arguments:
37!
38! yt   --------input-R- Temperature
39! yteta-------output-R- Temperature potentielle
40! ypk  --------input-R- Fonction d'Exner: RCPD*(pplay/pref)**RKAPPA
41!
42!======================================================================
43
44      IMPLICIT NONE
45
46      integer,intent(in) :: npoints
47      REAL,intent(in) :: yt(npoints), ypk(npoints)
48      REAL,intent(out) :: yteta(npoints)
49     
50      yteta = yt * cpp/ypk
51
52      end subroutine t2tpot
53
54!======================================================================
55
56      SUBROUTINE tpot2t(npoints,yteta, yt, ypk)
57!======================================================================
58! Arguments:
59!
60! yteta--------input-R- Temperature potentielle
61! yt   -------output-R- Temperature
62! ypk  --------input-R- Fonction d'Exner: RCPD*(pplay/pref)**RKAPPA
63!
64!======================================================================
65
66      IMPLICIT NONE
67
68      integer,intent(in) :: npoints
69      REAL,intent(in) :: yteta(npoints), ypk(npoints)
70      REAL,intent(out) :: yt(npoints)
71     
72      yt = yteta * ypk/cpp
73
74      end subroutine tpot2t
75
76!======================================================================
77
78end module cpdet_phy_mod
Note: See TracBrowser for help on using the repository browser.