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

Last change on this file since 1198 was 1017, checked in by emillour, 11 years ago

Common dynamics: (and collateral adaptations in Venus physics)
Improved cpdet routines in and additional sponge mode:

  • Additionnal sponge mode (trigered with "callsponge" flag), in line with the one used in the Generic and Martian GCM. This sponge is called whenever there is a dissipation step.
  • Improvement of the cpdet routines : created routines tpot2t_glo_p and t2tpot_glo_p which handle fields on the whole dynamics (scaler) grid, which are more efficient than calling tpot2t_p or t2tpot_p with slabs of data (generated use of intermediate copies of these chunks of data at every call)
  • Turned cpdet.F into a module cpdet_mod.F90 (and correspondingly adapted all routines in the Venus physics).

EM

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