source: trunk/LMDZ.VENUS/libf/phyvenus/lw_venus_ve.F @ 3556

Last change on this file since 3556 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: 3.3 KB
Line 
1      SUBROUTINE LW_venus_ve(
2     S              PPB, pt, psi, deltapsi,
3     S              PCOOL,
4     S              PTOPLW,PSOLLW,PSOLLWDN,
5     S              ZFLNET)
6     
7      use dimphy
8      use cpdet_phy_mod, only: cpdet
9      IMPLICIT none
10
11#include "YOMCST.h"
12C
13C     ------------------------------------------------------------------
14C
15C     PURPOSE.
16C     --------
17C
18c     This routine uses the NER matrix
19c     (computed for a given cell and temp profile in radlwsw)
20c     to compute cooling rates and radiative fluxes.
21c
22C     AUTHOR.
23C     -------
24C        Sebastien Lebonnois
25C
26C     MODIFICATIONS.
27C     --------------
28C        ORIGINAL : 27/07/2005
29C        version multimatrice (topographie, sommet nuages): 20/12/2006
30C     ------------------------------------------------------------------
31C
32C* ARGUMENTS:
33C
34c inputs
35
36      REAL    PPB(klev+1)  ! inter-couches PRESSURE (bar)
37      REAL    pt(klev)     ! mid-layer temperature
38      real    psi(0:klev+1,0:klev+1)      ! NER in W/m**2
39      real    deltapsi(0:klev+1,0:klev+1) ! D NER / DT in W/m**2/K
40C
41c output
42
43      REAL   PCOOL(klev)  ! LONGWAVE COOLING (K/s) within each layer
44      REAL   PTOPLW       ! LONGWAVE FLUX AT T.O.A. (net, + vers le haut)
45      REAL   PSOLLW       ! LONGWAVE FLUX AT SURFACE (net, + vers le haut)
46      REAL   PSOLLWDN     ! LONGWAVE FLUX AT SURFACE (down, + vers le bas)
47      REAL   ZFLNET(klev+1) ! net thermal flux at ppb levels (+ vers le haut)
48
49C
50C* LOCAL VARIABLES:
51C
52      integer i,j,p
53      real   zlnet(klev+1)    ! net thermal flux (W/m**2)
54      real   dzlnet(0:klev)   ! Radiative budget (W/m**2)
55      real   pdp(klev)        ! epaisseur de la couche en pression (Pa)
56
57c --------------------------
58c Calculation of the fluxes
59c --------------------------
60
61c flux aux intercouches:
62c zlnet(i+1) est le flux net traversant le plafond de la couche i (+ vers le haut)
63      do p=0,klev ! numero de la couche
64        zlnet(p+1) = 0.0
65        do j=p+1,klev+1
66         do i=0,p
67           zlnet(p+1) = zlnet(p+1)+ psi(i,j)
68         enddo
69        enddo
70      enddo
71
72c flux net au sol, + vers le haut:
73      PSOLLW = zlnet(1)
74c flux vers le bas au sol, + vers le bas:
75      PSOLLWDN = 0.0
76      do i=1,klev+1
77        PSOLLWDN = PSOLLWDN+max(psi(i,0),0.0)
78      enddo
79
80c dfluxnet = radiative budget (W m-2)
81      do p=0,klev ! numero de la couche
82        dzlnet(p) = 0.0
83        do j=0,klev+1
84           dzlnet(p) = dzlnet(p)+psi(p,j)
85        enddo
86      enddo
87     
88c --------------------------------------
89c Interpolation in the GCM vertical grid
90c --------------------------------------
91
92c Flux net
93c --------
94     
95      do j=1,klev+1
96        ZFLNET(j) =  zlnet(j)
97      enddo
98      PTOPLW   = ZFLNET(klev+1)
99     
100c Heating rates
101c -------------
102
103c  cool (K/s) = dfluxnet (W/m2)    ! positif quand nrj sort de la couche
104c              *g        (m/s2)
105c              /(-dp)  (epaisseur couche, en Pa=kg/m/s2)
106c              /cp  (J/kg/K)
107     
108      do j=1,klev
109        pdp(j)=(PPB(j)-PPB(j+1))*1.e5
110      enddo
111
112c calcul direct OU calcul par schema implicit
113      if (1.eq.1) then
114        do j=1,klev
115! ADAPTATION GCM POUR CP(T)
116         PCOOL(j) = dzlnet(j) *RG/cpdet(pt(j)) / pdp(j)
117        enddo
118      else
119        call lwi(klev,dzlnet,deltapsi,pdp,pt,PCOOL)
120      endif
121c     print*,dzlnet
122c     print*,pdp
123c     print*,PCOOL
124
125      return
126      end
127
Note: See TracBrowser for help on using the repository browser.